Information Technology Reference
In-Depth Information
[vagrant@default-centos65 ~]$
exit
logout
Connection to 127.0.0.1 closed.
Now run the
kitchen destroy
command to shut down the virtual machine and release all
the associated system resources:
$
kitchen destroy default-centos65
-----> Starting Kitchen (v1.2.2.dev)
-----> Destroying <default-centos65>...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Vagrant instance <default-centos65> destroyed.
Finished destroying <default-centos65> (0m2.91s).
-----> Kitchen is finished. (0m3.37s)
NOTE
We will be creating a lot of different sandbox environments in this topic. Don't forget to
kitchen destroy
your environments when they are done so they won't take up memory
and disk space when you aren't using them. (But just in case you forget to run
kitchen
destroy
, we'll keep reminding you.)
If you'd like to get a global overview of all the sandbox environments running on your
machine from the command line, run
vagrant global-status
.
Anatomy of a Chef Run
kitchen converge
performs a
Chef run
on your test node from your host. Pretty conveni-
ent! You can still use
kitchen login
to ssh into the node and poke around if you like, but
the
kitchen converge
command is designed to give you fast feedback as you develop your
cookbook. We'll rely on
kitchen converge
for the rest of the hands-on exercises in this
book.
In production,
chef-client
is typically run in daemonized mode as a service on the node,
performing Chef runs at regular intervals; for example, once every 15 minutes. It checks in
with Chef Server for any changes to cookbooks or the list of recipes to run on the node,
which are stored on Chef Server. We'll discuss this more in
Chapter 9
.