Book Image

Chef Infrastructure Automation Cookbook Second Edition

By : Matthias Marschall
Book Image

Chef Infrastructure Automation Cookbook Second Edition

By: Matthias Marschall

Overview of this book

Table of Contents (14 chapters)
Chef Infrastructure Automation Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Loading your Chef infrastructure from a file with spiceweasel and knife


Having all your cookbooks, roles, and data bags as code under version control is great, but having your repository alone is not enough to be able to spin up your complete environment from scratch again. Starting from the repository alone, you will need to spin up nodes, upload cookbooks to your Chef server, and recreate data bags there.

Especially when you use a Cloud provider to spin up your nodes, it would be great if you could spin up your nodes automatically and hook them up to your freshly created and filled Chef server.

The spiceweasel tool lets you define all your cookbooks, data bags, and nodes, and generates all the necessary knife commands to recreate your complete environment, including spinning up nodes and populating your empty Chef server or organization on the hosted Chef.

Let's see how to dump our current repository to spiceweasel and how to recreate our infrastructure with it.

Getting ready

Make sure that...