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 ...

Get Chef: Powerful Infrastructure Automation now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.