Created
December 20, 2011 11:47
-
-
Save doitian/1501318 to your computer and use it in GitHub Desktop.
Configuration files for chef-solo and knife, so they all use directories inside the chef repo, instead of default global pathes such as /etc, /var
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log_level :info | |
| log_location STDOUT | |
| node_name 'solo' | |
| client_key File.expand_path('../solo.pem', __FILE__) | |
| cache_type 'BasicFile' | |
| cache_options( :path => File.expand_path('../checksums', __FILE__)) | |
| cookbook_path [ File.expand_path('../../cookbooks', __FILE__) ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You can generate this file using `ssh-keygen -f .chef/solo.pem`. It is really not used but must be here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node_name 'solo' | |
| file_cache_path File.expand_path('../cache', __FILE__) | |
| file_backup_path File.expand_path('../backup', __FILE__) | |
| cookbook_path File.expand_path('../cookbooks', __FILE__) | |
| role_path File.expand_path('../roles', __FILE__) |
Thanks for sharing this, appreciated!
glad I found this opscode documentation is confusing. They really want you to configure chef hosted or chef server !
you should also add
data_bag_path File.expand_path('../data_bags', __FILE__)
it's really helpfull with https://github.com/thbishop/knife-solo_data_bag
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After check out chef-repo and installed gem
chef. The default pathes used bychef-soloandknifeare in some global locations, such as /etc, /var. This gist demonstrats how to put all configuration files, data files and cache files just inside chef repo.solo.rbin top directory of chef repo. Runchef-solousing option-cknife.rbinto subdirectory.chef(create it if it is not there)..chef/sola.pem