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

Understanding recipes

As we have already discussed, recipes are fundamental units of cookbooks and contain step-by-step instructions to configure the machine.

Our goal is to install WordPress, PHP, and Apache2. There are some defined tasks when we install any Linux distribution. The most common task is to update the packages of an operating system. An apt cookbook provides us with the facility to update packages automatically. We will include an apt cookbook to ensure that all the packages are updated.

Open the metadata.rb file in wpblog and add the following dependencies:

depends        'rvm'
depends        'apt'
depends        'apache2'
depends        'php'
depends        'mysql'

Let's include the php, mysql, and apache2 recipes in our wpblog recipe and provision the machine.

The ...

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