Information Technology Reference
In-Depth Information
We are now done with this cookbook and virtual machine. Run the kitchen destroy com-
mand 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.95s).
-----> Kitchen is finished. (0m3.43s)
Summary
In this chapter, we introduced the concept of a cookbook. Chef needs more than recipe files
with code to automate the configuration of nodes. A cookbook contains all the other associ-
ated information, packing everything together into a single unit of deployment. We covered
three of these additional components of a cookbook in this chapter: the metadata.rb file, the
files folder, and the templates folder. We also showed you that Chef code resides in the re-
cipes folder.
We introduced you to the four essential resources you'll find yourself using over and over
again in your recipe code:
package
Installs a package using the system package manager
service
Manages the lifecycle of any daemons/services installed by the package resource
cookbook_file
Transfers a file from the files folder of a cookbook to a path on the node
template
A variant of the cookbook_file resource that lets you create file content from variables
using an Embedded Ruby (ERB) template. Templates are located in the templates folder
of a cookbook
Search WWH ::




Custom Search