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

Exploring policies


One of the best things about cookbooks is that they can be versioned. And as you have learned, the best application of cookbooks is to combine them into roles. Unfortunately, there is no concept of version for roles. The proper application of roles to your infrastructure obscures the desirable standard of versions.

Enter policies. Policies allow you to group all of the various resources into a high-level object that defines the specific versions that are used to create the object. Policies combine the best parts of roles, environments, and tools such as Berkshelf, into a single-versioned resource. You can apply a policy in a development environment, test it thoroughly, and promote that policy into the stage and then production environments, progressing your infrastructure code through its lifecycle in a safe, reliable way.

What exactly is a policy?

A policy is built by creating a policyfile. A policyfile is kind of like a Chef role mixed with a Berkshelf berksfile. Policyfiles...