Introducing ShadowPuppet
We’ve been using Puppet here at Rails Machine to manage our internal infrastructure for quite a while now, and it’s been great solution. Unfortunately, Puppet’s external DSL can be unfamiliar to Rubyists used to other Ruby-based DSLs like Rails, Rake, and Capistrano. But fortunately, Puppet actually has had a proof-of-concept Ruby DSL since July of 2006.
Last week we announced Moonshine, an opensource configuration management and deployment system being released in February (you can download the slides from the presentation Jesse Newland gave at ATLRUG here). Rather than re-implement those parts of Puppet, we decided to improve on the DSL included in Puppet, and build upon it.
While we’re hard at work finishing up the Moonshine release, we wanted to extract the work we’ve done on the Puppet Ruby DSL and release it so that people can experiment with it right now. We’re sharing ShadowPuppet with the Puppet development community early-on with the hope of improving and extending the existing, best of breed tools that are already available today.
Enter: ShadowPuppet
ShadowPuppet is a re-implementation of Puppet::DSL designed for use by Rubyists. There’s actually not very much DSL in ShadowPuppet at all: manifests are Classes, groups of resources are instance methods, and ‘plugins’ are implemented as Modules.
You can review, checkout, and fork the ShadowPuppet project on Github, and you can see the RDoc here.
You can install the ShadowPuppet gem with the gem install shadow_puppet command.
There are a few difference worth mentioning between ShadowPuppet and Puppet itself:
- ShadowPuppet doesn’t use a puppetmaster (Puppet’s central server), but you can use Capistrano for remote execution.
- You configure ShadowPuppet with a manifest (like this one)
- You execute ShadowPuppet with the included
shadow_puppetbinary
ShadowFacter
In addition to the Ruby DSL for Puppet, we’ve also been working to make it easier for Ruby developers to integrate the gathering of system and application facts. So today we’re also introducing ShadowFacter, a DSL wrapper around the pre-existing project, Facter, used by Puppet.
As with ShadowPuppet, you can install the gem with the gem install shadow_facter command, checkout and the ShadowFacter project on Github, and you can see the RDoc here.
Let us know what you think, we’d love your feedback on these projects.
Update: You can learn a bit more about ShadowFacter from our post in the Puppet group.


Comments
Sean
2009-01-30 at 04:21 PM
This looks pretty cool. How do you think it compares with Chef?
Bradley Taylor
2009-02-02 at 08:42 PM
How do the DSLs compare? Or how do Puppet and Chef compare?
Nate Murray
2009-02-12 at 09:26 PM
Ari Lerner has also written a DSL for deployment of EC2 instances that uses Puppet for the provisioning called PoolParty (http://github.com/auser/poolparty/tree/master). A significant portion of PoolParty's code is dedicated to creating resources that are converted into Puppet's native language.
I wonder if there is a good way to collaborate on this and unify the implementations. At the very least, I'd recommend checking out his DSL format as it is very well written and readable.
Bradley Taylor
2009-02-12 at 10:08 PM
We're collaborating with the Puppet development team on merging a lot of the ideas of ShadowPuppet into Puppet's internal DSL.
Discussion here:
http://groups.google.com/group/puppet-dev/browse_thread/thread/842957b5c61ccbc3/31e7c21e889de8c7?lnk=gst&q=shadow_puppet#31e7c21e889de8c7.
The PoolParty syntax is definitely interesting for higher level concepts like "clouds".