O'Reilly logo

Configuration Management with Chef-Solo by Naveed ur Rahman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing recipes and cookbooks

Cookbooks are collections of recipes, and contain each step of instructions. As we already have Knife installed on our machine, let's create a basic folder schema for a cookbook. Our goal is to develop a recipe that will install PHP, MySQL, Apache2, and WordPress.

The name of our cookbook is wpblog:

$ knife cookbook create wpblog

By default, the preceding command will generate the cookbook structure in the /var/chef folder. In case of any other folder path, use the -o flag.

$ knife cookbook create wpblog -o <cookbooks_folder_path>

The preceding command will yield an output as shown in the following screenshot:

Developing recipes and cookbooks

Now ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required