Information Technology Reference
In-Depth Information
README.md
Every cookbook should come with documentation. The README.md is a text file that
contains documentation in markdown format. Markdown is a simple way of adding
formatting to plain text so that you have the option of converting it to HTML. Markdown
is a popular format for README files because the text files are readable as is, without
the clutter of HTML tags and formatting instructions. Many popular source control tools
will render README.md in HTML when viewing source, including GitHub , GitLib ,
Stash , and Bitbucket .
attributes
You can provide your own custom attributes in a cookbook to complement (or override)
the attributes generated automatically by ohai . Attributes are commonly used to define
application distribution paths, platform-specific values, or software versions to install on
a given node. The attributes/ directory can contain multiple .rb files with attribute defini-
tions in them. When there is more than one attribute file, they are evaluated in alphabetic-
al order. By convention, if it makes sense to store your attributes in one file, the file
should be named default.rb .
chefignore
This file contains a list of files that should be ignored when uploading the cookbook to a
Chef Server, when a Chef server is being used. By default, all files in a cookbook direct-
ory are uploaded to the Chef Server. There is no need, however, to upload things such as
editor swapfiles or source control tracking files to a Chef Server. References to these files
are commonly placed in a chefignore file so they won't be uploaded.
files
The files folder is a centralized store in the cookbook for files to be distributed to nodes.
Files can be plain text, images, zip files, and so on. These files can be deployed to a tar-
get node using the cookbook_file resource. A directory structure underneath files/ con-
trols whether files are copied to particular nodes. For more information on this structure,
refer to http://docs.opscode.com/essentials_cookbook_files.html . When files should be
distributed to all nodes, they are expected to be in the files/default/ subdirectory.
metadata.rb
The metadata.rb file contains all the information (metadata) about a cookbook. Every
cookbook must have a metadata.rb file containing the name of the cookbook, version,
dependencies, and other helpful information.
Search WWH ::




Custom Search