Over a million developers have joined DZone.

An Introduction to Beginning with Chef (Part 1)

· Cloud Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database on AWS. Try it now! Brought to you in partnership with MongoDB.

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.

Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.


The best of DZone straight to your inbox.

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.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}