Recommended Workflows

Length: 00:07:33

Lesson Summary:

To this point, we’ve only partially been following the preferred Chef workflow. In this lesson, we’ll learn about what we should add to our process to adhere to the recommended Chef workflow.

Documentation For This Video

The Preferred Workflow

There are a few things to think about when it comes to the preferred Chef workflow, and here’s a simple list to remember:

  1. Use source control (git, mercurial, svn, etc).
  2. Utilize Test Driven Development (TDD) using ChefSpec, InSpec, and Test-Kitchen.
  3. Opt to use “wrapper cookbooks”.

We’re going to tackle the test-driven development in a different video, and the entire topic of how to use source control is outside the scope of this course. The idea of a “wrapper cookbook” isn’t something that we’ve directly discussed. For a wrapper cookbook, we shouldn’t fork cookbooks, we should instead have dependencies on other cookbooks and then utilize the recipes and resources that the other cookbook provides while adding our own customizations through attributes and other recipes. Here’s an official Chef blog post that explains different ways to use wrapper cookbooks.

More and more cookbooks are being created that only include resources for writing our own configuration that we’ll pull into our own cookbooks. We already have an example of this in our bcf_users cookbook that utilizes the users cookbook.

This lesson is only available to Linux Academy members.

Sign Up To View This Lesson
Or Log In

Looking For Team Training?

Learn More