Skip to content
Browse files

update readmes for info on cookbook_path and knife locations

  • Loading branch information...
1 parent b60986b commit e7ca82d2383d68d0e7a8f7d2a26f7f20dc7404b8 @jtimberman jtimberman committed Oct 23, 2010
Showing with 14 additions and 1 deletion.
  1. +2 −0 README.md
  2. +12 −1 cookbooks/README.md
View
2 README.md
@@ -58,6 +58,8 @@ If you use the `ssl_cert` task, change the values in the `config/rake.rb` file a
The second config file, `.chef/knife.rb` is a repository specific configuration file for knife. If you're using the Opscode Platform, you can download one for your organization from the management console. If you're using the Open Source Chef Server, you can generate a new one with `knife configure`. For more information about configuring Knife, see the Knife documentation.
+http://help.opscode.com/faqs/chefbasics/knife
+
Next Steps
==========
View
13 cookbooks/README.md
@@ -1,6 +1,17 @@
This directory contains the cookbooks used to configure systems in your infrastructure with Chef.
-Configure knife to use your preferred copyright holder, email contact and license. Add the following lines to `~/chef-repo/.chef/knife.rb`.
+Knife needs to be configured to know where the cookbooks are located with the `cookbook_path` setting. If this is not set, then several cookbook operations will fail to work properly.
+
+ cookbook_path ["./cookbooks"]
+
+This setting tells knife to look for the cookbooks directory in the present working directory. This means the knife cookbook subcommands need to be run in the `chef-repo` directory itself. To make sure that the cookbooks can be found elsewhere inside the repository, use an absolute path. This is a Ruby file, so something like the following can be used:
+
+ current_dir = File.dirname(__FILE__)
+ cookbook_path ["#{current_dir}/../cookbooks"]
+
+Which will set `current_dir` to the location of the knife.rb file itself (e.g. `~/chef-repo/.chef/knife.rb`).
+
+Configure knife to use your preferred copyright holder, email contact and license. Add the following lines to `.chef/knife.rb`.
cookbook_copyright "Example, Com."
cookbook_email "cookbooks@example.com"

0 comments on commit e7ca82d

Please sign in to comment.
Something went wrong with that request. Please try again.