Information Technology Reference
In-Depth Information
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. You should see the following:
$
knife client list
chef-validator
chef-webui
If you get an error, check the following:
1. You can access
https://192.168.33.36:443
from a web browser.
2. You are running commands from inside the
chef-repo
.
3. The
.chef
directory contains two
.pem
files and a
knife.rb
.
4. Your authentication files have the correct file permissions (they should be only user
readable).
If you have confirmed the preceding steps and are still unable to connect to Chef Server,
please consult the
Chef online documentation
.
Now that you have verified that your host can connect to Chef Server, let's create another
cookbook for a node instance and register it to be managed by Chef Server. If you created
Chef Server locally in a sandbox environment in this chapter, leave it running—we'll be us-
ing it in the next chapter.