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 with cookstyle and Rubocop
- Flagging problems in your Chef cookbooks with Foodcritic
- Test-driven development for cookbooks using ChefSpec
- Compliance testing with InSpec
- 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 chef-shell
- Using why-run mode to find out what a recipe might do
- Debugging Chef client runs
- Inspecting the results of your last Chef run
- Using Reporting to keep track of all your Chef client runs
- Raising and logging exceptions in recipes
- Diff-ing cookbooks with knife
- Using community exception and...