Skip to content
This repository has been archived by the owner on Apr 7, 2018. It is now read-only.

Commit

Permalink
Enabling Analytics to use chef-ingredient
Browse files Browse the repository at this point in the history
Also reported issue: chef-cookbooks/chef-ingredient#26

Fix chefspec to work with `reporting`
  • Loading branch information
Salim Afiune committed Aug 11, 2015
1 parent 9535f42 commit af234c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DEPENDENCIES
chef-ingredient
git: https://github.com/chef-cookbooks/chef-ingredient.git
revision: 060e429fe92c312a6495e840ca6a7caee98d3085
revision: 215873838e420fb6760cd5a8055cedc90ed74e4e
branch: master
chef-server-12
path: vendor/chef-server-12
Expand All @@ -21,7 +21,7 @@ GRAPH
apt-chef (0.1.0)
apt (>= 0.0.0)
build-essential (2.2.3)
chef-ingredient (0.9.0)
chef-ingredient (0.9.1)
apt-chef (>= 0.0.0)
yum-chef (>= 0.0.0)
chef-server-12 (0.1.7)
Expand Down
18 changes: 5 additions & 13 deletions recipes/analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,15 @@
# limitations under the License.
#

directory '/etc/opscode' do
recursive true
end

directory '/etc/opscode-analytics' do
recursive true
end

file '/etc/opscode-analytics/opscode-analytics.rb' do
content <<-EOF
chef_ingredient 'analytics' do
config <<-EOF
topology 'standalone'
analytics_fqdn '#{node['delivery-cluster']['analytics']['fqdn']}'
features['integration'] = #{node['delivery-cluster']['analytics']['features']}
EOF
notifies :reconfigure, 'chef_server_ingredient[opscode-analytics]'
EOF
action :install
end

chef_ingredient 'analytics' do
ingredient_config 'analytics' do
notifies :reconfigure, 'chef_ingredient[analytics]'
end
2 changes: 1 addition & 1 deletion spec/unit/libraries/helpers_chef_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'api_fqdn' => 'chef-server.chef.io',
'store_keys_databag' => false,
'plugin' => {
'opscode-reporting' => true
'reporting' => true
}
}
end
Expand Down
6 changes: 2 additions & 4 deletions vendor/chef-server-12/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@
recursive true
end

chef_ingredient 'chef-server' do
notifies :reconfigure, 'chef_ingredient[chef-server]'
end
chef_ingredient 'chef-server'

template "/etc/opscode/chef-server.rb" do
owner "root"
mode "0644"
notifies :run, "execute[reconfigure chef]", :immediately
notifies :reconfigure, "chef_ingredient[chef-server]", :immediately
end

execute "reconfigure chef" do
Expand Down

0 comments on commit af234c5

Please sign in to comment.