Recipes

Recipes are where all the magic happens with Chef; they are the secret sauce, the man behind the mask. They are the workhorses of configuring hosts with Chef. Recipes are scripts written in Ruby using Chef's DSL that contain the instructions to be executed on end hosts when the Chef client is run. Every time the client is executed on the end host, a few things happen:

  1. The end host makes a request to the Chef server saying, "I need to do some work".
  2. The Chef server looks at the requesting host's identity and determines:
    • Which recipes need to be run and in what order (the run list)
    • The computed configuration data for that host
  3. This information is passed back to the end host along with the necessary artifacts it needs (recipes, templates, and ...

Get Chef: Powerful Infrastructure Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.