Book Image

Mastering Chef Provisioning

By : Earl Waud
Book Image

Mastering Chef Provisioning

By: Earl Waud

Overview of this book

This book will show you the best practices to describe your entire infrastructure as code. With the help of this book you can expand your knowledge of Chef because and implement robust and scalable automation solutions. You can automate and document every aspect of your network, from the hardware to software, middleware, and all your containers. You will become familiar with the Chef’s Chef Provisioning tool. You will be able to make a perfect model system where everything is represented as code beneath your fingertips. Make the best possible use of your resources, and deliver infrastructure as code, making it as versionable, testable and repeatable as application software
Table of Contents (17 chapters)
Mastering Chef Provisioning
Credits
Foreword
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

How to use Chef Provisioning


Now that you have a picture of what Chef provisioning is and how you might use it to turn an application's cluster infrastructure into code, let's take a look at how to actually use it. Like other aspects of Chef, we create recipes for Chef provisioning. And like the recipes in our other cookbooks, these recipes will contain resource definitions that will describe the desired state of our application cluster.

So, let's begin by learning about the resources that we can create in our Chef provisioning recipes.

Chef Provisioning resources

A Chef Provisioning recipe can contain the definitions of the following resources:

  • with_driver: This resource tells Chef Provisioning the name of the driver to use with subsequent machine resources. The driver name corresponds to the hosting provider, such as Vagrant, AWS, and Docker. More than one with_driver resource can be used in a recipe, providing for the ability to deploy subsets of machines to different hosting providers within...