Configuration Management started in the late 1960s in the US Military. They specified exactly how mainframe systems needed to be setup.

In the last few years Configuration Management has become more popular in enterprises. A certain configuration for a system (e.g. database server) is defined. This describes a list of software, libraries or behavior this system should have installed. A central software tool processes this configuration.

If you add another server you can apply the same configuration to it too. The management tool will then proceed to setup the new node according to your configuration.

The result: a perfectly configured system”

Why would you use this?

  • No more setting up 100 servers manually
  • Even the dependencies between Virtual Maschines can be written in code (e.g. Load Balancer)
  • Define the setup once, run it as often as you want
  • The amount of time saved is enormous
  • Is therefore a perfect match for Virtualization and Infrastructure as Service like Amazon EC2, Windows Azure, OpenStack

Chef Website

Chef

  • Chef is a configuration management tool written in Ruby and Erlang
  • Chef is used for writing system configurations
  • Chef is used to streamline the task of configuring & maintaining a company’s servers, and can integrate with platforms, like OpenStack, Amazon EC2, Windows Azure, to automatically provision and configure new machines
  • Chef uses a number of terms to describe its configurations

Recipe: Is a single configuration (e.g. create database “my_db”)

Cookbook: A full set of configurations (e.g. setup database server)

Roles: Is a way to define certain patterns and processes that exist across nodes

Environments: Is a way to map an organization’s real-life workflow to what can be configured and managed when using Chef server (e.g Test/Staging/Production)

Chef Cookbook

Example Recipe

package 'apache2' do
  action :install
end

service 'apache2' do
  action [ :enable, :start ]
end

cookbook_file '/var/www/index.html' do
  source 'index.html'
  mode '0644'
end

How Chef sets up your environment

How Chef works together with Virtualization