Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Configuration Management with Chef-Solo

You're reading from   Configuration Management with Chef-Solo A comprehensive guide to get you up and running with Chef-Solo.

Arrow left icon
Product type Paperback
Published in Jun 2014
Publisher
ISBN-13 9781783982462
Length 116 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Naveed ur Rahman Naveed ur Rahman
Author Profile Icon Naveed ur Rahman
Naveed ur Rahman
Arrow right icon
View More author details
Toc

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 final code of default.rb will look like the following lines of code:

include_recipe "apt"
include_recipe "apache2"
include_recipe "apache2::mod_php5"
include_recipe "mysql::client"
include_recipe "mysql::server"
include_recipe...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime