Chef →A DevOps tool (Part-2 →Architecture)

Aakib
2 min readMar 21, 2023

--

Architecture of chef

Chef follows a 3 tier Architecture →In above image there is chef workstation which is connected to chef server that is further connected different no. of nodes

chef workstation sends any update such as installing new application or update the current application to different no. of nodes via chef server

nodes on the other side matches the current configuration with the update if they same update as the chef workstation sends than nodes doesn’t perform any action otherwise they tried to match the current configuration with the updated one

Some of the keyterms in chef →

  1. Bootstrap → It is the process through which node connect to servers so that they update them in future
  2. Knife(tool) → This tool is used to connect chef workstation to chef server
  3. Chef is must be install on both workstation or node
  4. Chef-client →It is the tool which matches the current configuration with the updated and bring code to node to make them update
  5. Ohai → It is the database which stores the current configuration of the nodes
  6. Chef — client ask Ohai which version used by node
  7. Then client go to user for update and bring the updated code
  8. Idempotency →It works on do not repeat yourself principal means if updated code is present on the node than chef-client ignored the notification of updation by chef workstation

How to create cookbook and recipe →

Cookbooks is the Folder and recipe is .rb file in which we define what work need to be done in nodes and recipe is created inside cookbooks

see image below →

Commands to Install and Setup chef

  1. Go to google→ www.chef.io
  2. Go to downloads→chef workstation
  3. Enter name email→it automatically starts downloading go to downloads copy the URL
  4. Now go to linux machine
  5. Wget <copied url>
  6. apt install <name of downloaded package > -y
  7. Which chef
  8. Chef — version

Cookbook-->It is a collection of recipe and some other files and folders

--

--

Aakib

Cloud computing and DevOps Engineer and to be as a fresher I am learning and gaining experiance by doing some hands on projects on DevOps and in AWS OR GCP