Information Technology Reference
In-Depth Information
Chef Development Kit users, remember to make sure this is correct, due to the current bug
that incorrectly sets the
run list
to
recipe[bar::default]
.
Now you know that the run list
recipe[apache::default]
is just shorthand indicating that
Chef code needs to be executed in the
recipes/default.rb
file of the apache cookbook.
Chef-
client
executes the code when we run
kitchen converge
.
To make sure your
.kitchen.yml
has no syntax errors, run
kitchen list
. If there are issues,
correct them:
$
kitchen list
Instance Driver Provisioner Last Action
default-centos65 Vagrant ChefZero <Not Created>
Edit the
README.md
File
Your
README.md
file should drive the cookbook development, based on the prerequisites
you defined in
Define Prerequisites
.
Example 7-8
shows a suggested
README.md
for your
apache
cookbook.
Example 7-8. chefdk/apache/README.md
# apache cookbook
This cookbook installs and configures a simple web site using the Apache HTTPD server.
Requirements
============
Supports only CentOS or other RHEL variants that use the +httpd+ package.
Usage
=====
Add `apache` to your node's `run_list`.
Testing
=======
A `.kitchen.yml` file is provided. Run +kitchen converge+ to verify this cookbook.
Update
Metadata.rb
Here's the
metadata.rb
file that was generated in your cookbook skeleton: