Chef cheat sheet

SamJain
2 min readDec 11, 2022

Few secret ingredients :)

Terminology

  • Node: A managed machine that executes the configuration for the node when the client runs
  • Client: An authorised user in the Chef API
  • Cookbook: A collection of recipes, resources, attributes, and definitions to configure a service or an application.
  • Recipe: A list of resources to be added to a node. As it is written in Ruby, it gives us control over anything we would do in Ruby.
  • Run-list: A run-list provides recipes and roles required for a node. Unlike the other config management tools, it makes us define a relationship between resources. Hence, an ordered list is easier to understand and use.
  • Kitchen: Test Kitchen runs tests against any combination of platforms using any combination of test suites. it will create a VM or cloud instance, install Chef Infra Client to that system, and converge Chef Infra Client with your local cookbook
  • Resources: Resouces are Ruby objects with code behind them to config the system. Each resource contains providers that tell the system how to run it.

Components

  • Knife: A system admin tool used to interact with the server to take cookbooks and custom config and load them into the server. Bootstrapping certain servers is also possible with this component.
  • Chef client: It runs on managed servers, gathers information about itself, syncs the cookbooks, and compiles the collection of resources and converges it with the machine state.
  • Web UI: A web-based interface that allows us to browse and edit cookbooks, nodes, and clients.
  • Server/API: The heart of the system that exposes a REST API that is used by others and manages the knife, web interfaces, and nodes.
  • Chef Workstation: Configurations are developed and installed on the local machine.
  • Chef Server: It is the centre of the Chef setup. Contitues of all the Config files. Some are hosted, and some are built on-premises.
  • Chef Nodes: It is the end machine managed by the server. It contains the client that sets communication between the server and the node.
  • Ohai: is another component of Chef Node, which returns the current state of any node.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

SamJain
SamJain

Written by SamJain

Hi, I am Sampada Jain, a system and Cloud Technologies enthusiast. I find learning technologies easy and love to trouble-shoot errors. Passionate Linux learner.

No responses yet

Write a response