How to test custom Chef cookbooks and recipes?

If you custom Chef cookbooks and recipes fail it is tedious to stop and start the instance to check your changes.

You can test your cookbooks faster by re-running the Chef run and edit the cookbooks locally on a running instance. Once you've fixed your recipes, make sure to commit them to your cookbook repository.

Your custom cookbooks are in /root/scalarium-agent/site-cookbooks

If you want to repeat a chef run (setup or deployment), use the following command as root:

# /root/scalarium-agent/bin/chef-solo -c /root/scalarium-agent/config/solo.rb -j /root/scalarium-agent/log/chef/TIMESTAMP.json

Where TIMESTAMP is the timestamp of the command you want to repeat.