Sitemap

Chef tutorial-1 : Introduction To Configuration Management Tool (CMT) - Chef

2 min readAug 21, 2020

--

Configuration is nothing but keep each and every minute details of your machine i.e Server , Storage , OS.Before the DevOps the system administrator was responsible for do this job . Just think your comapany has 1000 servers and you want to install a new OS on all the servers ,How time consuming it will and how much manpower it will need ? . The DevOps has made this work easy.

There are two types of configuration tools available:

  1. Push based CMT : Here Push configuration sever pushes the configuration to your machine.In easy word you can say that whats up application has updated its version ,it will notify and update your application . Here Server asks you to update your system.It is important when you need a machines control in your hand because you are deciding here when to update configuration. exp. Ansible is push based configuration tool
  2. Pull based CMT : Here your machine will check with the server periodically and if there new configuration available it will fetch it from there.Here the controls goes to the machines. exp. Chef is pull based CMT

Chef :

Chef is an administration tool.whatever system administrator used to do manually ,now we are automating all the task by using chef.Configuration management is the method through which we automate admin tasks . It turns your code into infrastructure i.e it uses a term IAC (infrastructure as code) which means you are using code to create your infrastructure.Your code is now repeatable and testable .

Press enter or click to view image in full size

Get Omkar More’s stories in your inbox

Join Medium for free to get updates from this writer.

From fig-1 you can easily understand how chef works . Let take detail introduction of components of chef -:

  1. Workstation : Workstation are personal computer or virtual server where configuration code is created,tested or changed.The devops engineer actually sits here.
  2. Recipe : Code written by the devops engineer in workstations is called as Recipes.
  3. Cookbook : The collection of recipes called as a cookbook.
  4. Knife : Workstation to sever and server to machines communications are created by knife.Knife is command line tool that upload a cookbook to the sever .
  5. Chef-server : Chef-server is middle-man between workstation and machines . This sever may be hosted locally or remote.
  6. Machine /Nodes : Nodes are the systems that require configurations. Ohai is small part where current configurations details of the node remains. Chef-client and Ohai is a part of nodes. Chef client fetches the current state of node from ohai and then chef-client communicate with the chef-sever . If there is new configuration is avaiable .withe the help of knife it will take it and install it on node.
  7. Bootstrap:The process that connects chef-server to nodes called bootstrap

--

--

Omkar More
Omkar More

Written by Omkar More

Software Engineer || Python || BigData || Data Engineer || Full Stack