Last active
December 16, 2015 08:09
-
-
Save apinstein/5404162 to your computer and use it in GitHub Desktop.
Using shef (with chef-solo) to debug chef runs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from inside a "chef-managed" instance (in this case, vagrant) | |
sudo shef -s -j /tmp/vagrant-chef-1/dna.json -c /tmp/vagrant-chef-1/solo.rb | |
=> will have nothing in the run list, but all cookbooks loaded. | |
=> http://stevendanna.github.com/blog/2012/01/28/shef-debugging-tips-1/ | |
# add recipe from source | |
load_recipe "apache2::mod_fastcgi" | |
# run chef... | |
run_chef | |
# debug/edit code... | |
# reset run list to "empty" | |
run_context.resource_collection = Chef::ResourceCollection.new | |
# re-load recipe and run again... | |
# rinse & repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment