Chef 101

In Chef, individual program files are called Recipes. When you group multiple Recipe programs in an organized folder structure, we call that as Cookbook.

A chef code example looks like this:

  1. package apache2 do
  2. action :install
  3. end

 

And you save it as a file named for example: apache.rb

.rb is the extension of a chef recipe file

To run this code, one can execute this command:

  1. chef-apply apache.rb

 

This execution will result into installation of apache software on the machine where the command is executed. (apache2 is the name of the package for apache software on ubuntu platform).


Leave a Reply

Your email address will not be published. Required fields are marked *

Skip to toolbar