Book Image

Mastering Chef

By : Mayank Joshi
Book Image

Mastering Chef

By: Mayank Joshi

Overview of this book

Table of Contents (20 chapters)
Mastering Chef
About the Author
About the Reviewers
Knife and Its Associated Plugins
Data Bags and Templates

Chapter 5. Starting the Journey to the World of Recipes

We have our Chef server setup done by now. You must be itching to get your hands dirty with writing Chef code and bootstrapping your infrastructure using it. We'll look into the different components that can be managed through Chef using the concept of resources. Once we are familiar with different resources, we'll see how we can utilize them in our recipes. We'll also see some best practices in writing recipes.

Before we start off, we need to understand what the term "recipe" really means.

In the world of Chef, a recipe is the most fundamental unit of code that is executed. It can be considered as the most fundamental configuration element within an organization. A recipe is a piece of code written in Ruby and it defines everything that is required to configure a system or part of it. A system can comprise of different components. For example, you may have a machine that is acting as a database and web server simultaneously. You can...