Database Reference
In-Depth Information
Hadoop Integration API Compatible
Chef is designed to ease the burden of managing the configuration of your infrastructure. It
follows an “imperative” syntax that is familiar to many software developers, allowing them
to write software configuration the same we they write software code.
Chef configurations are written as resources, recipes, and cookbooks. A resource is the most
basic unit of configuration and describes how to configure a specific thing. For example, a
resource might tell Chef to create a specific directory and to make sure that everyone is able
to view its contents, but that the contents can only be altered by the system administrator.
The next level of configuration is a recipe. A recipe is a group of related resources. For ex-
ample, a recipe may say that installing your application takes two steps: first you must install
a specific package, and then you must create a configuration directory.
A cookbook is a logical group of related, but separate, recipes. For example, a module for
our application might contain one recipe that installs our application, another recipe that con-
figures our application to work with an HBase instance (described here ) , and a third recipe
that configures our application to work with an Accumulo instance (described here ) . All
three of these manifests relate to installing and configuring our application, but we need to be
be able to control which of these manifests is actually run without being required to run them
all.
Tutorial
Opscode provides a variety of resources for getting started on its wiki page .
Example Code
Chef recipes are written in Ruby and follow typical Ruby syntax rules.
Our example manifest to install our application and ensure the configuration directory exists
would look like this:
# 'default.rb'
package "test_application" ddo
action :install
end
Search WWH ::




Custom Search