Start Automation with Chef?

Configuration Management Tools to Automate Infrastructure

Configuration Management tools like Puppet, Chef, Ansible, SaltStack, CFengine and many other are becoming very famous to automate Infrastructure as a code in DevOps. Sometimes it become very difficult for Admins and/or developers to understand what exactly these tools are doing and how to start with these tools. And here starts the race on google with multiple weblinks and finally ends in a big mess sometimes.

What is Configuration Management

Let us try to explain in simple layman language what actually is Configuration Management in Infrastructure – Let’s take an example where you get multiple requests to create a similar filesystems, users, groups, files, directories, packages, services etc. and hence an application which is a combination all of these terms we just mentioned. In traditional approach we will login into the server and perform all these tasks manually which is fine, but what if we have 10 server to do the same thing or 50 servers to perform the same operations. One pointer would be use of custom scripts which is again acceptable as far as the initial installations and configurations are concerned, but what if someone have intentionally or by mistake have removed some files/users/services/packages which were configured using scripts.

Chef Automation

The only answer is “unintended downtime” and hence business loss. In order to avoid such situations, Configuration Management tools are developed to Deploy, Manage and Monitor your complete infrastructure. If there are any deviations in the defined configuration for a running client, the Configuration Management server will force to change the configurations in defined state and hence no deviations in the running configuration for 1 day, 1 year, 10 years till the time server lives (unless you don’t change the configuration in the master server).

How to start Chef Journey

Now lets understand what would be the best approach to start learning Chef, the setup for Chef is complex as compare to other Configuration Management Tools present in the market. The Chef setup is divided majorly into three parts:

  • Chef Workstation (where much of the coding part will take place)
  • Chef Server (centralized place for chef) – which again have multiple options and additional packages for enhanced features like “Reporting, Web-Console, Analytics etc.”
  • Chef Client (which is our node)

To directly start with the complete setup is troublesome sometimes, so we suggest to start learning chef with the simplest environment (only Chef Workstation) and get familiar with chef terms like “resources” “recipe” “cookbook” “run-list” “cookbook files” “utilities like Ohai, Knife” etc. and then start moving towards complex setups with Chef servers and chef clients.

To start with Chef Workstation, download the chefDK (Chef Development Kit) package, install it anywhere (on VM, Cloud instance) and start getting familiar with chef terms.

In our next post we will present Chef terms and some of the simple examples to start automation using Chef.

6 thoughts on “Start Automation with Chef?”

  1. Pingback: Chef objects and Recipes? – Thinknyx

  2. Pingback: Chef Cookbooks? – Thinknyx

  3. Pingback: Chef Cookbooks Part-II – Thinknyx

  4. Pingback: Chef run-list? – Thinknyx

  5. Pingback: Testing cookbooks? – Thinknyx

  6. Pingback: Chef Server 12 Installation and Configuration – Thinknyx

Leave a Comment

Your email address will not be published.