Chef Overview

how-chef-works-ipcisco

Chef Software

Chef Software is an Automation Software like Ansible and Puppet that is developed by Opscode. It is written  by Ruby DSL (Domain Specific Language). The name of Chef is the name of the company that has developed Chef. It has one more product on this area but the automation software product is called as Chef. This automation tool is also used to reduce manual works and overcome repetitive routine tasks in a network.

 


You can check also Ansible vs Puppet vs Chef Lesson that we compare three Network Automation Tools.


 

chef-automation-program 

Chef Components

Chef Software has different components. Three of them are main Chef Software components. These Chef components are :

 

  • Chef Server
  • Workstations
  • Nodes

 

Cheff Server is the central of the Chef operations. It stores,  manages and provides all the required configurations to the Chef components.

 

Workstations are the devices that the codes, configurations are developed, created, tested and changed. It is configure with Chef CLI tools. We can test recipes, cookbooks with workstations.

 

Nodes are the devices that are managed by Chef Software. These devices can be physical devices, cloud devices, virtual devices etc. On these devices Chef Client is installed. Chef Client is used to pull coockbokks from the Chef Server.

 

chef-components-communication

 

Beside this, there are also key building blocks of Chef Software. These are:

  • Recipe
  • Cookbook
  • Resource
  • Attribute
  • File
  • Templates
  • Metadata.rb
  • Chef-repo
  • Knife
  • Run List
  • Ohai

 

Recipe is the collection of attributes with which we manage infrastrcuture. We can set any of the network device with the attributes stored in this recipes. Recipes are writtten in Ruby. Everything that we need to run, create or change are defined with Recipes. Recipes are the collection of Resources.

 

Cookbook is the place that Recipes are grouped and stored. It is basically the collection of Recipes. There are scenarios defined in cookbook and the required  actions for these scenarios are also in Cookbook. In other words the values and the infomation for the desired states of a node are stored in Cookbook.

 

Resource is the configuration objects in a Recipe. There can be many resources in a Recipe. These resources can be users, services, groups, files etc.

Attribute is the key value pair settings.

File is a subdirectory in the cookbook and they are static.

Template is similar to file but they are not static.

Metadata.rb is used to manage package metadata.

Chef-repo is the Workstation area where cookbookes are maintained and resources are stored.

Knife is the command line with which Workstation communicates the content of Chef-repo directory with Chef Server.

Run List is the ordered list of all roles and recipes that Chef Clients pull from Chef Server. After that it runs them on Node.

Ohai is the part that collects information about the nodes for Chef Client. This infoarmation can be memory/cpu usage, hostnames etc.

 


You can check also Ansible vs Puppet vs Chef Lesson that we compare three Network Automation Tools.


 

Chef Software Operation

The operation of Chef Software is like Puppet Software. As in Puppet, in Chef Automation, there are Agents. These agents pull recipes and resources from Chef Server. In Chef Software, the name of this agents are Chef Client. So, how Chef works? Let’s see.

 

  1. The configuration code is written and tested in Workstation.
  2. The code is sent to Chef Server.
  3. Chef Server distributes Cookbooks to managed nodes.
  4. Nodes converges and syncronizes with Chef Server. By doing this, it pulls the updates from the Chef Server.

how-chef-works-ipcisco

You can also visit Chef Website, here.

Lesson tags: network automation, ansible, puppet, chef
Back to: CCNA 200-301 v1.1 > Automation and Programmability

Leave a Reply

Your email address will not be published. Required fields are marked *

CCNA 200-301 v1.1

Collapse
Expand