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