include_recipe "apache::ssl"
-chef_platform = case node[:platform_version]
- when "12.10" then "12.04"
- when "14.04" then "12.04"
- else node[:platform_version]
- end
-
-chef_package = "chef-server_#{node[:chef][:server][:version]}_amd64.deb"
-
-directory "/var/cache/chef" do
- owner "root"
- group "root"
- mode 0755
-end
-
-Dir.glob("/var/cache/chef/chef-server_*.deb").each do |deb|
- next if deb == "/var/cache/chef/#{chef_package}"
-
- file deb do
- action :delete
- backup false
- end
-end
-
-remote_file "/var/cache/chef/#{chef_package}" do
- source "https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/#{chef_platform}/x86_64/#{chef_package}"
- owner "root"
- group "root"
- mode 0644
- backup false
-end
-
-dpkg_package "chef-erver" do
- source "/var/cache/chef/#{chef_package}"
- version node[:chef][:server][:version]
- notifies :run, "execute[chef-server-reconfigure]"
-end
-
-ruby_block "/opt/chef-server/embedded/service/chef-server-webui/app/controllers/status_controller.rb" do
- block do
- rc = Chef::Util::FileEdit.new("/opt/chef-server/embedded/service/chef-server-webui/app/controllers/status_controller.rb")
- rc.search_file_delete(/&rows=20/)
- rc.write_file
-
- if rc.file_edited?
- resources(:execute => "chef-server-reconfigure").run_action(:run)
- end
- end
-end
+# chef_package = "chef-server-core_#{node[:chef][:server][:version]}_amd64.deb"
+#
+# directory "/var/cache/chef" do
+# owner "root"
+# group "root"
+# mode 0755
+# end
+#
+# Dir.glob("/var/cache/chef/chef-server-core_*.deb").each do |deb|
+# next if deb == "/var/cache/chef/#{chef_package}"
+
+# file deb do
+# action :delete
+# backup false
+# end
+# end
+#
+# remote_file "/var/cache/chef/#{chef_package}" do
+# source "https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/#{node[:lsb][:codename]}/#{chef_package}"
+# owner "root"
+# group "root"
+# mode 0644
+# backup false
+# end
+#
+# dpkg_package "chef-server-core" do
+# source "/var/cache/chef/#{chef_package}"
+# version node[:chef][:server][:version]
+# notifies :run, "execute[chef-server-reconfigure]"
+# end
-template "/etc/chef-server/chef-server.rb" do
+template "/etc/opscode/chef-server.rb" do
source "server.rb.erb"
owner "root"
group "root"
group "root"
end
-service "chef-server-runsvdir" do
+service "private-chef-runsvdir" do
provider Chef::Provider::Service::Upstart
action [:enable, :start]
supports :status => true, :restart => true, :reload => true
mkdir $T/chef-server-$D
chgrp opscode-pgsql $T $T/chef-server-$D
chmod g+rwx $T $T/chef-server-$D
-sudo -u opscode-pgsql /opt/chef-server/embedded/bin/pg_dump --file=$T/chef-server-$D/chef.dmp --clean opscode_chef
-ln -s /var/opt/chef-server/bookshelf/data $T/chef-server-$D/bookshelf
+sudo -u opscode-pgsql /opt/opscode/embedded/bin/pg_dumpall --file=$T/chef-server-$D/chef.dmp --clean
+ln -s /var/opt/opscode/bookshelf/data $T/chef-server-$D/bookshelf
export GZIP="--rsyncable -9"
# DO NOT EDIT - This file is being maintained by Chef
-nginx['enable_non_ssl'] = true
-nginx['non_ssl_port'] = 4000
+api_fqdn "chef.openstreetmap.org"
+default_orgname "openstreetmap"
+
+addons['install'] = false
+
+bookshelf['url'] = "https://chef.openstreetmap.org:443"
+bookshelf['vip'] = "chef.openstreetmap.org"
+
+lb['api_fqdn'] = "chef.openstreetmap.org"
+lb['web_ui_fqdn'] = "chef.openstreetmap.org"
+
+nginx['non_ssl_port'] = false
nginx['ssl_port'] = 4443
nginx['ssl_certificate'] = '/etc/ssl/certs/openstreetmap.pem'
nginx['ssl_certificate_key'] = '/etc/ssl/private/openstreetmap.key'
nginx['server_name'] = "chef.openstreetmap.org"
nginx['url'] = "http://chef.openstreetmap.org:4000"
-bookshelf['url'] = "https://chef.openstreetmap.org:443"
-bookshelf['vip'] = "chef.openstreetmap.org"
-lb['api_fqdn'] = "chef.openstreetmap.org"
-lb['web_ui_fqdn'] = "chef.openstreetmap.org"
-erchef['base_resource_url'] = "https://chef.openstreetmap.org"
+
+opscode_erchef['base_resource_url'] = "https://chef.openstreetmap.org"