Shef question

Hey all,

Shef is pretty awesome for interactively developing a new recipe/cookbook…

But since shef -z loads up my full runlist, I’m a little confused by the fact
that ‘run_chef’ doesn’t then do a run of my full runlist from the server.

It claims to load all the cookbooks and shows me a full runlist, but if I then
do ‘cookbooks.all’ I get an array of nils which is … weird.

Am I missing something here? It’d be really useful to have my entire set
runlist, be able to add a breakpoint somewhere (something like “recipe
foo::default; template “/etc/blabla” do; breakpoint; end; run_chef” where
"foo::default" is an existing and loaded recipe, and /etc/blabla is a template
created by it. I feel like that functionality is already there but I haven’t
figured out how to do it yet.

Any pointers would be helpful, thanks.


Phil Dibowitz phil@ipom.com
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/

“Be who you are and say what you feel, because those who mind don’t matter
and those who matter don’t mind.”

  • Dr. Seuss

Hi,

On Tue, Mar 6, 2012 at 3:07 PM, Phil Dibowitz phil@ipom.com wrote:

Any pointers would be helpful, thanks.

You might be interested in my blog post here:

http://stevendanna.github.com/blog/2012/01/28/shef-debugging-tips-1/

The tl;dr is that client mode downloads the cookbooks and loads all
the attributes and providers, but it doesn't to the equivalent of the
"compile" phase for the recipes. From recipe mode you can call
include_recipe to lead the resources from any recipe that was in
your expanded run_list and downloaded to the file_cache. The blog
post has some further functions for calling include_recipe for every
recipe in the expanded run list and inserting breakpoints into the
existing resource collection.

Cheers,

Steve

On 03/06/2012 11:35 PM, Steven Danna wrote:

Hi,

On Tue, Mar 6, 2012 at 3:07 PM, Phil Dibowitz phil@ipom.com wrote:

Any pointers would be helpful, thanks.

You might be interested in my blog post here:

http://stevendanna.github.com/blog/2012/01/28/shef-debugging-tips-1/

This blog post is exactly what I was looking for. Awesome, thanks!

--
Phil Dibowitz phil@ipom.com
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."

  • Dr. Seuss

this behaviour should be built in
On Mar 7, 2012 9:13 PM, "Phil Dibowitz" phil@ipom.com wrote:

On 03/06/2012 11:35 PM, Steven Danna wrote:

Hi,

On Tue, Mar 6, 2012 at 3:07 PM, Phil Dibowitz phil@ipom.com wrote:

Any pointers would be helpful, thanks.

You might be interested in my blog post here:

http://stevendanna.github.com/blog/2012/01/28/shef-debugging-tips-1/

This blog post is exactly what I was looking for. Awesome, thanks!

--
Phil Dibowitz phil@ipom.com
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."

  • Dr. Seuss

On 03/07/2012 12:14 AM, AJ Christensen wrote:

this behaviour should be built in

I'm not sure what you mean... the behavior is built into shef... but the
documentation is lacking. The blog post just showed me how to do what I want.

Steven, your blog post can/should almost certainly be amended to the Shef page
in the opscode/chef wiki, it continues right where that left off (OK, you can
drop the part about the knife plugin since it's not relevant, but the rest is
just usage examples for shef).

--
Phil Dibowitz phil@ipom.com
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."

  • Dr. Seuss