Information Technology Reference
In-Depth Information
As you can see, the knife.rb file sets some default configuration values, such as the log level,
caching options, and cookbook paths. Additionally, the knife.rb configures the files cli-
ent_key , validation_client_name , and validation_key . These values were automatically con-
figured when you downloaded your starter kit. The chef_server_url configures the end-
point for Chef Server. Because we are using Hosted Enterprise Chef, this points to Opscode's
Chef API. If you were using Enterprise Chef or Open Source Chef Server, the URL would
point to your Chef Server installation.
You can add other values to the knife.rb , such as EC2 credentials, proxy information, and en-
crypted data bag settings. Although certain pieces of the knife.rb will be common across your
team, the contents of the file generally should be unique to you and your machine. However,
unless you have access keys and passwords in your knife.rb , you do not need to treat it like a
password.
Testing the Connection
You should run the following commands from inside the Chef repo. Open your terminal or
command prompt, and make chef-repo the current working directory. If you placed your
Chef repo in a different location, use that instead:
$ cd ~/chef-repo
Now you can use knife , the command-line tool for Chef Server, to test your connection and
authentication against Chef Server. At the time of this writing, Chef does not provide a “con-
nection test” command. However, asking Chef Server to list the clients will verify:
▪ Your network can connect to Chef Server.
▪ The authentication files are in the correct location.
▪ The authentication files can be read by Chef.
▪ The response from Chef Server is received by your workstation.
Issue the knife client list command on your terminal:
$ knife client list
Search WWH ::




Custom Search