Information Technology Reference
In-Depth Information
Edit the
.kitchen.yml
file as shown in
Example 6-1
,
and make it resemble the state of the final
.kitchen.yml
when you finished
Chapter 5
.
Example 6-1. node/.kitchen.yml
---
driver
:
name
:
vagrant
provisioner
:
name
:
chef_solo
platforms
:
-
name
:
centos65
driver
:
box
:
learningchef
/
centos65
box_url
:
learningchef
/
centos65
suites
:
-
name
:
default
run_list
:
attributes
:
Then run
kitchen create
to spin up a new sandbox environment to serve as your node. As
before, it will use the cached version of the
learningchef/centos65
box, and Test Kitchen
will not try to download the box again if it sees the box in the cache. So the sandbox environ-
ment should start fairly quickly, in less than a minute:
$
kitchen create default-centos65
Installing Chef Client with Test Kitchen
Use the
kitchen login
command to connect to your node (a.k.a. the sandbox environment),
and access the command prompt of the node running CentOS 6. Then, check to see if the
Chef Client is installed on the node by running
chef-client --version
:
$
kitchen login default-centos65
Last login: Fri Jul 4 14:48:27 2014 from 10.0.2.2
Welcome to your Packer-built virtual machine.
[vagrant@default-centos65 ~]$
chef-client --version
-bash: chef-client: command not found