Information Technology Reference
In-Depth Information
Bootstrapping a Node
In Chef, the term “bootstrapping” refers to the process by which a remote system is prepared
to be managed by Chef. This process includes installing Chef Client and registering the tar-
get node with Chef Server.
Create a Node
Let's use Test Kitchen to define a project that spins up a node in a sandbox environment,
similar to what we did back in Chapter 5 before we learned how to create cookbooks.
Create a node directory alongside the chef-server cookbook you created in Chapter 9 . This
technically isn't a cookbook—it's just a Test Kitchen project—but putting it beside the
chef-server cookbook directory makes it convenient to go back and forth between the two.
Create the directory ~/chef-repo/cookbooks/node , and make it the current working directory:
$ cd ~/chef-repo/cookbooks
$ mkdir node
$ cd node
Assuming that you set up knife to communicate with your Chef Server following either the
instructions in Chapter 9 or Appendix B , the knife client list command should work
even in this subdirectory. Verify this now:
$ knife client list
chef-validator
chef-webui
This node directory will just be a test kitchen project, not a cookbook, so run the following
commands to create a .kitchen.yml file for Test Kitchen:
$ kitchen init --create-gemfile
$ bundle install
Edit the .kitchen.yml file to use the CentOS 6.5 basebox we prepared specifically for this
book. Also assign a private network address like we did in Chapter 7 . This time, we're going
Search WWH ::




Custom Search