
How to deploy chef cookbooks without chef server? โ Answer is โ Chef Solo
What is Chef Solo?
chef-solo is a command that executes Chef Infra Client in a way that does not require the Chef Infra Server to converge cookbooks. chef-solo uses Chef Infra Clientโs Chef local mode, and does not support the following functionality present in Chef Infra Client / server configurations:
Centralized distribution of cookbooks
A centralized API that interacts with and integrates infrastructure components
Authentication or authorization
How Chef solo Works?

chef-solo supports two locations from which cookbooks can be run:
- A local directory.
- A URL at which a tar.gz archive is located.
Before running Chef-Solo on the local machine, one needs to install the following two files on the local machine.
- Solo.rb โ This file tells Chef about where to find cookbooks, roles, and data bags.
- Node.json โ This file sets the run list and any node-specific attribute, if required.
A small chef-solo example
sdanna@gaius ~/tmp/example > tree
.
โโโ cookbooks
โ โโโ foobar
โ โโโ CHANGELOG.md
โ โโโ README.md
โ โโโ attributes
โ โโโ definitions
โ โโโ files
โ โ โโโ default
โ โโโ libraries
โ โโโ metadata.rb
โ โโโ providers
โ โโโ recipes
โ โ โโโ default.rb
โ โโโ resources
โ โโโ templates
โ โโโ default
โโโ solo.rb
12 directories, 5 files
sdanna@gaius ~/tmp/example > cat solo.rb
cookbook_path '/Users/sdanna/tmp/example/cookbooks'
sdanna@gaius ~/tmp/example > cat cookbooks/foobar/recipes/default.rb
#
# Cookbook Name:: foobar
# Recipe:: default
#
# Copyright 2013, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
log "I'm Running Chef"
sdanna@gaius ~/tmp/example > sudo chef-solo -c solo.rb -o 'recipe[foobar]'
Starting Chef Client, version 11.4.4
[2013-05-09T21:10:11-07:00] WARN: Run List override has been provided.
[2013-05-09T21:10:11-07:00] WARN: Original Run List: []
[2013-05-09T21:10:11-07:00] WARN: Overridden Run List: [recipe[foobar]]
Compiling Cookbooks...
Converging 1 resources
Recipe: foobar::default
* log[I'm Running Chef] action write
Chef Client finished, 1 resources updated
Reference
- https://docs.chef.io/chef_solo/
- https://www.devopsschool.com/blog/difference-between-chef-infra-server-vs-chef-zero-vs-chef-solo/
- https://docs.chef.io/ctl_chef_solo/





Iโm a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND