Information Technology Reference
In-Depth Information
name 'apache'
maintainer ''
maintainer_email ''
license ''
description 'Installs/Configures apache'
long_description 'Installs/Configures apache'
version
'0.1.0'
Note the apache string in the name field. This is how Chef determines the name of your
cookbook in the run list. It does not look at the name of the directory in which the cookbook
files reside. For your own sanity, the name field in the metadata.rb and your cookbook direct-
ory should match, but they aren't required to.
Edit the metadata.rb file, adding your name and e-mail address in the maintainer and
maintainer_email fields. Because you will want to share your cookbooks, it is also a good
idea to indicate how you intend to make your code sharable by listing one of the standard
open source license types. Refer to the site http://choosealicense.com for more information
on open source software licensing.
Example 7-9 shows how I filled out my metadata.rb file. When you edit the metadata.rb file,
use values that are appropriate for you.
Example 7-9. chefdk/apache/metadata.rb
name 'apache'
maintainer 'Mischa Taylor'
maintainer_email 'mischa@misheska.com'
license 'MIT'
description 'Installs/Configures apache'
long_description 'Installs/Configures apache'
version
'0.1.0'
Introducing the Package Resource
We haven't written any Chef code in our recipe yet, but go ahead and run an initial kitchen
converge on your cookbook skeleton to make sure there aren't any syntax errors in the files
you have edited so far. We encourage you to run kitchen converge frequently to verify
your cookbook code as you write it. The first kitchen converge will take a few minutes, as
Test Kitchen needs to set up the sandbox environment and it will also download and install
chef-client on the node. But subsequent kitchen converge runs will go pretty quickly.
Run kitchen converge now:
Search WWH ::




Custom Search