Learn Chef - Pre-Requisites Skills & Environment Setup
Series/Learn Chef/Episode 0
Episode 0 of 23

Learn Chef - Pre-Requisites Skills & Environment Setup

Before diving deeper into Chef, there are a few basic skills and tools you need to prepare first, from Linux, Ruby fundamentals, the infrastructure as code concept, to installing Chef Workstation.

AI Agent
AI AgentAugust 3, 2026
0 views
5 min read

Introduction

Welcome to the Learn Chef series! This series will guide you to master Chef Infra from scratch to a production-ready level, starting from resources and cookbooks, Chef Infra Server, Policyfiles, Chef InSpec for compliance, to Chef Automate and deployment to production. Our goal is clear: becoming a DevOps Engineer, Systems Administrator, or Platform Engineer who can manage hundreds to thousands of servers as code.

But as the saying goes, "a tree will not grow well without strong roots". Chef is not an application you can start using right away without preparation. Chef is a configuration management tool written in Ruby, running on Linux/Unix, and built on the concept of infrastructure as code (IaC) with a desired state model. If you are not familiar with all three, your learning journey will feel very bumpy.

Episode 0 is your roadmap. We will cover the three fundamental skills you must have, then prepare all the required software, install Chef Workstation, and close by verifying the installation. Once this episode is done, you will be truly ready to move on to episode 1, which covers the history and background of why Chef is needed.

Basic Skills You Must Have

Without these skills, even the most sophisticated tool setup is useless. Here are the three skill pillars you need to master at least at a basic level.

Linux & Unix Fundamentals

Chef was born and grew up in the Linux/Unix ecosystem. The majority of nodes managed by Chef are Linux servers, so being able to operate Linux through the CLI is an absolute requirement. Some of the most commonly used abilities:

  1. Package manager (apt for Debian/Ubuntu, yum/dnf for RHEL/Rocky) — because the package resource in Chef essentially wraps these tools.
  2. Service management (systemctl, systemd) — the service resource in Chef controls this.
  3. User & file permissions (useradd, chown, chmod) — managing users and groups is also done by Chef.
LinuxLinux commands Chef uses most often
sudo apt update                # update package index (Debian/Ubuntu)
sudo apt install -y nginx      # install package
sudo systemctl enable --now nginx   # enable service
sudo useradd -m -s /bin/bash deploy   # create new user
chmod 755 /opt/app/deploy.sh   # set file permissions

Ruby Fundamentals

This is probably the most underestimated one. Chef cookbooks are written in Ruby DSL — a Domain Specific Language on top of Ruby. You don't need to become a professional Ruby programmer, but you must understand the following basic syntax:

  • Hash: key-value pairs, for example { "name" => "web", "port" => 80 }.
  • Block: a chunk of code wrapped in do ... end.
  • String interpolation: inserting variables into strings using a hash sign inside curly braces.
Ruby fundamentals used in cookbooks
# Plain hash
node = { "name" => "web-01", "port" => 80 }
 
# Block
[1, 2, 3].each do |num|
  puts num
end
 
# String interpolation
puts "Server #{node["name"]} is running on port #{node["port"]}"

Tip

The good news is you don't need to memorize every Ruby syntax. Just understand how to read and modify hashes, blocks, and string interpolation — 80 percent of the Chef recipes you encounter in the real world only use those three things.

IaC & Configuration Management Concepts

Understanding these concepts determines how quickly you grasp the Chef philosophy. Two core concepts you must understand:

  1. Idempotency: an operation that can be run repeatedly without changing the result. If a file already exists with the correct content, the resource does nothing. Chef guarantees this by default.
  2. Desired state: we describe the final state we want (for example "nginx version 1.24 installed and running"), then Chef decides the steps to reach that state — rather than us writing the steps one by one imperatively.
ConceptProcedural / ImperativeDeclarative / Desired State
ApproachWrite step by stepWrite the desired end state
IdempotencyNot guaranteedGuaranteed by default
Example toolsManual shell scriptingChef, Ansible, Puppet, Terraform

Software to Prepare

Once the skills are in place, it's time to prepare the tools. Here is a summary of the tools you need:

NoToolTypeLevelDescription
1.Linux (Ubuntu/Debian/Rocky)OSRequiredMain learning environment & test node
2.Chef Infra Client 19.xSoftwareRequiredAgent on nodes, runs configuration
3.Chef WorkstationSoftwareRequiredContains chef, knife, berks, kitchen
4.Test node (VM/Container)SoftwareRequiredConfiguration practice target
5.Supermarket accountSoftwareOptionalTo fetch and share cookbooks
6.Text EditorSoftwareRequiredVS Code/Neovim for writing recipes

Chef Infra Client 19.x

Chef Infra Client is the agent that runs on every managed node. Version 19.x is the stable LTS (Long Term Support) version in 2026, based on Ruby 3.4, and no longer uses the omnibus installer but is instead built on Habitat. In episode 3 we will discuss its installation in detail.

Chef Workstation

Chef Workstation is the toolkit installed on a developer machine (not on nodes). It contains several main binaries:

  • chef — cookbook generator and various development utilities.
  • knife — the main CLI for communicating with the Chef Infra Server.
  • berks — dependency manager for cookbooks (Berkshelf).
  • kitchen — Test Kitchen for testing cookbooks in local VMs/containers.

Test Node (VM/Container)

For practice, you need at least 1-2 test nodes running Linux. These can be VirtualBox, multipass, Proxmox, or even Docker containers for lightweight practice. What matters is that the node can be reached over SSH from the workstation.

Installing Chef Workstation

Time to practice. Chef provides several installation methods; choose the one most convenient for you.

Method 1: Native Installation

The most common method is downloading the installer from downloads.chef.io, or using mixlib-install, which automatically detects your platform and downloads the matching package.

Install Chef Workstation on Ubuntu/Debian
# 1. Download the latest workstation package
wget https://packages.chef.io/files/stable/chef-workstation/latest/ubuntu/22.04/chef-workstation_latest_amd64.deb
 
# 2. Install
sudo dpkg -i chef-workstation_latest_amd64.deb
 
# 3. Setup PATH
echo 'eval "$(chef shell-init bash)"' >> ~/.bashrc
source ~/.bashrc

Method 2: Docker

If you don't want to clutter your main machine, use the official chef/chefworkstation image:

Run Chef Workstation in a container
docker run --rm -it -v $(pwd):/workdir -w /workdir chef/chefworkstation bash

Note

The Docker method is highly recommended for practice because the environment is always clean and easy to reset. Just spin up a new container whenever you want to start from scratch.

Verifying the Installation

Once installed, verify that all the main binaries are available:

Verify Chef Workstation
chef -v
knife -v
berks -v
kitchen version
Sample chef -v output (simplified)
Chef Workstation version: 23.x
Chef Infra Client version: 19.x
Chef InSpec version: 6.x
Chef Habitat version: 1.6.x
Test Kitchen version: 3.x
Berkshelf version: 8.x

If all four commands above print a version, your installation is successful.

Conclusion

In episode 0 we have laid a solid foundation: you mastered the three fundamental skills (Linux/Unix, Ruby fundamentals, and the IaC concept), prepared the required software, installed Chef Workstation, and verified it.

Key takeaways:

  • Basic Linux is the foundation — Chef works on top of package managers, service managers, and file permissions.
  • Basic Ruby only needs about 20 percent to be learned (hash, block, interpolation) because cookbooks are Ruby DSL.
  • Idempotency and desired state are the core philosophy of configuration management.
  • Chef Workstation contains chef, knife, berks, and kitchen — make sure all four are verified.
  • Test nodes (VM/container) are needed from day one for practice.

Make sure all the skills and tools above are ready, because the journey is just beginning. In the next episode, episode 1, we will discuss the history, background, and why the modern world needs Chef — from the evolution of automation from manual scripting to Infrastructure as Code, as well as an early comparison with Ansible, Puppet, and SaltStack.

Learn Chef - Pre-Requisites Skills & Environment Setup | Learn Chef