Information Technology Reference
In-Depth Information
Chef Client:
$
knife cookbook create enterprise-chef --cookbook-path .
$
cd enterprise-chef
$
kitchen init --create-gemfile
$
bundle install
As shown in
Example 9-1
,
edit the
.kitchen.yml
file to use the CentOS 6.5 basebox we pre-
pared specifically for this topic. Also, assign a private network address like we did in
an address already being used on your local network, change it to a nonconflicting one. We
also need more memory than the default 512 MB allocated, so add a
customize:
block with
a
memory:
statement to increase the memory to 1.5 GB (memory is specified in megabytes
only).
NOTE
Make sure that you use the
chef_solo
provisioner for this cookbook, as the in-memory
Chef Server the
chef_zero
provisioner spawns will cause a conflict with the hands-on
exercises coming up in
Chapter 10
.
As of this writing, if you want to automate the install-
ation of a Chef Server with Chef cookbooks, using Chef Solo is recommended so that the
deployment code doesn't get confused by the presence of the in-memory Chef Server
used in Chef Zero.
Example 9-1. chefdk/chef-repo/cookbooks/enterprise-chef/.kitchen.yml
---
driver
:
name
:
vagrant
provisioner
:
name
:
chef_solo
platforms
:
-
name
:
centos65
driver
:
box
:
learningchef
/
centos65
box_url
:
learningchef
/
centos65
network
: