Information Technology Reference
In-Depth Information
Finally, create a file in chef-repo/.chef called knife.rb . Example A-5 shows what our knife.rb
file looks like; change the node_name and client_key fields in your version of the file to
match your username for <username>.pem . Also, if you used a different IP address for your
Chef Server, change the chef_server_url field accordingly.
Example A-5. chefdk/chef-repo/.chef/knife.rb
current_dir = File . dirname ( __FILE__ )
log_level :info
log_location STDOUT
node_name "misheska"
client_key " #{ current_dir } /misheska.pem"
validation_client_name "chef-validator"
validation_key " #{ current_dir } /chef-validator.pem"
chef_server_url "https://default-centos65.vagrantup.com:443"
cache_type "BasicFile"
cache_options ( :path => " #{ ENV [ 'HOME' ] } /.chef/checksums" )
cookbook_path
[ " #{ current_dir } /../cookbooks" ]
Once you have finished creating the <user>.pem , chef-validator.pem , and knife.rb files, your
chef-repo/.chef directory should resemble the following:
chef-repo/.chef
├── chef-validator.pem
├── knife.rb
└── misheska.pem
The .chef directory now contains three important files:
<username>.pem
chef-validator.pem
knife.rb
<username> is the username you created in the Chef Server web admin tool. The <user-
name>.pem file is a unique identifier used to authenticate you against Chef Server. This
should be treated like a password; do not share it with anyone, and do not alter the contents
of the file.
The chef-validator.pem file is a unique identifier used to authenticate your organization
against Chef Server. This should be treated like a password, but it must also be shared among
Search WWH ::




Custom Search