Information Technology Reference
In-Depth Information
Chapter 6. Manage Nodes with Chef
Client
Now that you have a sandbox environment in which to experiment with Chef, let's set up
your guest system to be managed by Chef. In this chapter, you will use Test Kitchen to install
Chef Client on your guest virtual machine so it can run Chef recipes. As a reminder, in
Chapter 4 you learned that a Chef recipe is a file that contains Chef code.
What Is a Node?
Before we show you how to install Chef Client on the guest with Test Kitchen, let's first in-
troduce some Chef-specific terminology to describe the different types of machines that we
are now using.
The machine on which you author Chef code is referred to as the Chef Developer's Worksta-
tion or Chef Administrator's Workstation . Your host machine is your Chef Developer Work-
station. In Chapter 2 you installed the Chef Development Kit on your host so that you have
all the tools necessary to write Chef recipes using a programmer's editor and to manage
changes to your Chef code with a source control system.
A machine that is managed by Chef is called a node . A machine is managed by Chef when it
runs Chef recipes to ensure the machine is in a desired configuration, as shown in Chapter 4 .
A node can be a physical machine, a virtual machine, a cloud instance, or a container in-
stance—it makes no difference to Chef. As long as the node has Chef Client installed, it can
be managed by Chef and it can run Chef recipes.
Because the Chef Development Kit is a superset of Chef Client, you could install the Chef
Development Kit on a node. This is what we did in Chapter 4 , making your host act as both a
Chef Developer Workstation and as a node managed by Chef. However, the Chef Develop-
ment Kit is about double the footprint of Chef Client. All of the extra tools included with the
Chef Development Kit are for writing Chef code, not running Chef code. In Chapter 5 we
made the case that in real-world production environments, these roles are split between two
different machines because you do not write Chef code on every machine in your infrastruc-
Search WWH ::




Custom Search