How can I develop and debug Chef cookbooks and recipes in an IDE (like Eclipse)?

gene_wood picture gene_wood · Oct 18, 2011 · Viewed 16.2k times · Source

I'm new to ruby and Chef. I've been developing cookbooks, committing them, uploading them to the Chef Server then deploying them to a Chef client with a role change followed by a "chef-client" run on the client. This process is slow.

How can I, using an IDE (Eclipse in my case), develop cookbooks and be able to debug (set breakpoints, watch variables etc) and run them without uploading them to the Chef Server and then pulling them back down with a chef-client run?

  • I'm using Eclipse 3.7 Indigo with the "Dynamic Languages Toolkit - Ruby Development Tools 3.0.0.v20110424-7Z--E_EkMYXO4k101442" plugin
  • I'm developing Opscode Chef cookbooks with the 10.x Chef codeline
  • I'm working on an Ubuntu 10.10 system developing cookbooks to be run on RHEL/Centos 5 servers
  • We run our own Chef Server (open source)

Answer

Autodidact picture Autodidact · Feb 9, 2012

I was also searching for this kind of tool.

Found this one that shows the shef to do it.

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