Book Image

Chef Infrastructure Automation Cookbook

By : Matthias Marschall
Book Image

Chef Infrastructure Automation Cookbook

By: Matthias Marschall

Overview of this book

Table of Contents (14 chapters)
Chef Infrastructure Automation Cookbook Second Edition
About the Author
About the Reviewers

Chapter 2. Evaluating and Troubleshooting Cookbooks and Chef Runs

"Most people spend more time and energy going around problems than in trying to solve them."

Henry Ford

In this chapter, we'll cover the following recipes:

  • Testing your Chef cookbooks

  • Flagging problems in your Chef cookbooks

  • Test-driven development for cookbooks using ChefSpec

  • Integration testing your Chef cookbooks with Test Kitchen

  • Showing affected nodes before uploading cookbooks

  • Overriding a node's run list to execute a single recipe

  • Using why-run mode to find out what a recipe might do

  • Debugging Chef client runs

  • Inspecting the results of your last Chef run

  • Raising and logging exceptions in recipes

  • Diff-ing cookbooks with knife

  • Using community exception and report handlers

  • Creating custom handlers