Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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

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:

Now that we have successfully created a folder structure of a cookbook, let's take a look at it and add some files to get started.

The folder structure of wpblog will look like the following screenshot:

As our folder structure is already created, let's create a default recipe using the following steps to execute and create Vagrant box to test our...

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
Banner background image