Over a million developers have joined DZone.

An Introduction to Beginning with Chef (Part 1)

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

Anirudh Bhatnagar, a blogger over at Xebia, has started a series for beginner users of Chef, a configuration management tool. Chef's use for creating infrastructure as code for cloud automation is well known, and a good guide for getting started in this realm is a big plus for many developers.

Anirudh describes Chef as having three main components:

1.) Work station: This is the developer's machine will be used to author cookbooks and recipes and upload them to the chef-server using the command line utility called knife.
2.) Chef-Server: This is the main server on which all the cookbooks, roles, policies are uploaded.
3.) Node: This is the instance which would be provisioned by applying the cookbooks uploaded on the chef-server.
Apart from these, there are few basic build blocks of chef like cookbooks,recipes,roles,environemts,run-lists,policies etc. The complete documentation and architecture of chef can be found here.
The author provides eight steps for the basic introduction element of the Chef series. I've briefly summarized the eight steps below, but you will need to see the full introduction for detailed procedure.

  1. Set up the workstation by installing Chef.
  2. Register on Chef's site and set up hosted Chef.
  3. Download and install chef-repo.
  4. Setup a node with a cloud provider and bootstrap any instance.
  5. Download a cookbook (a unit of configuration and policy distribution).
  6. Update the cookbook and upload it to the server node.
  7. Apply the run-list to the node.
  8. Run the Chef client on the node.

The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}