Information Technology Reference
In-Depth Information
Chapter 5. Manage Sandbox
Environments with Test Kitchen
For the rest of this topic, we're going to want to deploy to sandbox environments that closely
simulate a production environment. Running Chef on your local development workstation,
like we did in Chapter 4 , is not the best approach. Your development workstation probably
doesn't match your production operating environment. Even if your development worksta-
tion does match your production environment, you probably don't want to take the risk of
running untested Chef code locally. Untested Chef code might make unintended configura-
tion changes to your local development environment. Neither is it a good idea to run your ex-
perimental Chef code in your production environment before it is validated, for similar reas-
ons.
We'll use Test Kitchen to create a sandbox environment that simulates a production environ-
ment. Test Kitchen works in concert with two other tools, Vagrant and VirtualBox, to pro-
duce a sandbox locally in a virtual machine. This sandbox environment is a safe, isolated
place in which to experiment with Chef.
The CentOS 6 operating system will be used in our sandbox environment. CentOS is a free
operating system compatible with RedHat Enterprise Linux. RedHat Enterprise Linux is a
popular choice for a production environment. CentOS is a compatible variant of RedHat in-
tended for open source projects. CentOS does not require the purchase of a commercial li-
cense for use. The skills you will learn in this topic aren't specific to RedHat Enterprise
Linux, however. You should be able to translate what you learn to your operating system of
choice.
If you would like to easily follow along with the examples in this topic, use the Vagrant and
VirtualBox setup as outlined in this chapter. If you would prefer to use an alternative method,
you can still follow the exercises in the topic—all you really need is a separate machine,
cloud instance, or virtual machine that is not your main development workstation. Refer to
the website for this topic for more information on alternative setups in which you can create
sandbox environments with Test Kitchen.
Search WWH ::




Custom Search