diff --git a/Rakefile b/Rakefile index cdfe63098..814245a50 100644 --- a/Rakefile +++ b/Rakefile @@ -63,4 +63,3 @@ task :bundle_cookbook, :cookbook do |t, args| FileUtils.rm_rf temp_dir end - diff --git a/certificates/README b/certificates/README index 988022540..27d9a1607 100644 --- a/certificates/README +++ b/certificates/README @@ -1,3 +1,6 @@ Creating SSL certificates is a common task done in web application infrastructures, so a rake task is provided to generate certificates. -These certificates are stored here by the ssl_cert task. +These certificates are stored here by the ssl_cert task. To generate a +certificate set for a new monitoring server, for example: + + rake ssl_cert FQDN=monitoring.example.com diff --git a/config/client.rb.example b/config/client.rb.example index a846e117c..f023566ad 100644 --- a/config/client.rb.example +++ b/config/client.rb.example @@ -1,21 +1,15 @@ # # Example Chef Client Config File # -# Use Opscode's chef cookbook for managing chef itself, -# instead of using this file. It is provided as an example. +# You can generate the client.rb with correct settings with knife: +# +# knife configure client ./config log_level :info log_location STDOUT ssl_verify_mode :verify_none -chef_server_url "http://chef.example.com:4000" +chef_server_url "https://api.opscode.com/organizations/ORGNAME" -validation_client_name "chef-validator" -validation_key "/etc/chef/validation.pem" client_key "/etc/chef/client.pem" -file_store_path "/srv/chef/file_store" -file_cache_path "/srv/chef/cache" - -pid_file "/var/run/chef/chef-client.pid" - -Mixlib::Log::Formatter.show_time = true +validation_client_name "ORGNAME-validator" diff --git a/config/knife.rb.example b/config/knife.rb.example index 98a6ced0e..b742fa4dd 100644 --- a/config/knife.rb.example +++ b/config/knife.rb.example @@ -1,12 +1,18 @@ -# This file provided as an example. Run 'knife configure' to generate a -# config file for your local user. +# This file is provided as an example when using the Opscode Platform +# as the Chef Server. You were prompted to download a config file +# when you signed up for the Opscode Platform that looks like this. +# +# Replace USERNAME with your Opscode username and ORGNAME +# with your Opscode Platform organization name. +# +current_dir = File.dirname(__FILE__) log_level :info log_location STDOUT -node_name 'chef_admin' -client_key '/home/chef_admin/.chef/chef_admin.pem' -validation_client_name 'chef-validator' -validation_key '/home/chef_admin/.chef/chef-validator.pem' -chef_server_url 'http://chef.example.com:4000' +node_name "USERNAME" +client_key "#{current_dir}/USERNAME.pem" +validation_client_name "ORGANIZATION-validator" +validation_key "#{current_dir}/ORGANIZATION-validator.pem" +chef_server_url "https://api.opscode.com/organizations/ORGANIZATION" cache_type 'BasicFile' -cache_options( :path => '/home/chef_admin/.chef/checksums' ) -cookbook_path [ './cookbooks', './site-cookbooks' ] +cache_options( :path => "#{ENV['HOME']}/.chef/checksums" ) +cookbook_path ["#{current_dir}/../cookbooks"] diff --git a/config/rake.rb b/config/rake.rb index 561d2ab7d..00f28d576 100644 --- a/config/rake.rb +++ b/config/rake.rb @@ -1,5 +1,8 @@ +# Configure the Rakefile's tasks. + ### # Company and SSL Details +# Used with the ssl_cert task. ### # The company name - used for SSL certificates, and in srvious other places @@ -24,28 +27,6 @@ # Can be :apachev2 or :none NEW_COOKBOOK_LICENSE = :apachev2 -########################## -# Chef Repository Layout # -########################## - -# Where to install upstream cookbooks for serving -COOKBOOK_PATH = "/srv/chef/cookbooks" - -# Where to install site-local modifications to upstream cookbooks -SITE_COOKBOOK_PATH = "/srv/chef/site-cookbooks" - -# Where to install roles -ROLE_PATH = "/srv/chef/roles" - -# Chef Config Path -CHEF_CONFIG_PATH = "/etc/chef" - -# The location of the Chef Server Config file (on the server) -CHEF_SERVER_CONFIG = File.join(CHEF_CONFIG_PATH, "server.rb") - -# The location of the Chef Client Config file (on the client) -CHEF_CLIENT_CONFIG = File.join(CHEF_CONFIG_PATH, "client.rb") - ### # Useful Extras (which you probably don't need to change) ### @@ -55,6 +36,3 @@ # Where to store certificates generated with ssl_cert CADIR = File.expand_path(File.join(TOPDIR, "certificates")) - -# Where to store the mtime cache for the recipe/template syntax check -TEST_CACHE = File.expand_path(File.join(TOPDIR, ".rake_test_cache")) \ No newline at end of file diff --git a/config/server.rb.example b/config/server.rb.example deleted file mode 100644 index 2b9eb6b4b..000000000 --- a/config/server.rb.example +++ /dev/null @@ -1,42 +0,0 @@ -# -# Chef Server Config File -# -# Use Opscode's chef cookbook for managing chef itself, -# instead of using this file. It is provided as an example. - -log_level :info -log_location STDOUT -ssl_verify_mode :verify_none -chef_server_url "http://chef.example.com:4000" - -signing_ca_path "/srv/chef/ca" -couchdb_database 'chef' - -cookbook_path [ "/srv/chef/cookbooks", "/srv/chef/site-cookbooks" ] - -file_cache_path "/srv/chef/cache" -node_path "/srv/chef/nodes" -openid_store_path "/srv/chef/openid/store" -openid_cstore_path "/srv/chef/openid/cstore" -search_index_path "/srv/chef/search_index" -role_path "/srv/chef/roles" - -validation_client_name "chef-validator" -validation_key "/etc/chef/validation.pem" -client_key "/etc/chef/client.pem" -web_ui_client_name "chef-webui" -web_ui_key "/etc/chef/webui.pem" - -# change this as required. -#web_ui_admin_user_name "admin" -#web_ui_admin_default_password "replace_with_something_secure" - -supportdir = "/srv/chef/support" -solr_jetty_path File.join(supportdir, "solr", "jetty") -solr_data_path File.join(supportdir, "solr", "data") -solr_home_path File.join(supportdir, "solr", "home") -solr_heap_size "256M" - -umask 0022 - -Mixlib::Log::Formatter.show_time = false diff --git a/config/solo.rb.example b/config/solo.rb.example index b74566559..36546850b 100644 --- a/config/solo.rb.example +++ b/config/solo.rb.example @@ -1,6 +1,7 @@ # # Chef Solo Config File # +# This file is provided as an example of /etc/chef/solo.rb. log_level :info log_location STDOUT @@ -9,5 +10,3 @@ file_cache_path "/var/chef/cookbooks" # Optionally store your JSON data file and a tarball of cookbooks remotely. #json_attribs "http://chef.example.com/dna.json" #recipe_url "http://chef.example.com/cookbooks.tar.gz" - -Mixlib::Log::Formatter.show_time = false diff --git a/cookbooks/README b/cookbooks/README index 5ea404ac5..2dcf2fdbb 100644 --- a/cookbooks/README +++ b/cookbooks/README @@ -1 +1,2 @@ -Remove this file to clone an upstream git repository of cookbooks +Download cookbooks into this directory from the Opscode Cookbooks site +using knife, or remove this file to clone an upstream Git Repository.