On Nov 17, 2009, at 9:12 AM, A. Rich wrote:

> I'm thinking that we're going to move from cfengine 2 to puppet.  This is
> going to be a big architectural shift as well as a programming language shift.
> There seem to be a lot of ruby books out there and one puppet book.  If I had
> to pick, say, three books to delve into ruby and its uses for puppet, which
> ones should I pick?

Hi Amy - in fact I've just gone through this process myself. Let me say up 
front that using Puppet doesn't require knowledge of Ruby. You can be quite 
effective in it just learning the Puppet DSL (domain-specific language) 
configuration syntax, which is akin to (but way less crazy than) cfengine's 
config file syntax.

But as you've probably gathered, there is rather a thinner skin separating the 
'userland' parts of Puppet (the DSL) from the 'guts' of it (the Ruby codebase) 
and it is definitely helpful to know some ruby to be able to troubleshoot, 
debug and extend Puppet. It is also lots of fun to hack on. 

So in that spirit, the book I turn to the most is "The Ruby Programming 
Language" by Dave Flanagan and Yukihiro Matsumoto ("matz", who wrote Ruby). It 
has both in-depth descriptions of the core/stdlib classes and methods and a 
super helpful reference section Ch 9 that is always open on my desk.  Unlike a 
lot of people I don't find the Pickaxe book ("Programming Ruby" by Dave Thomas) 
particularly helpful, but perhaps that's because my main experience with it is 
the older online edition from ruby-doc.org which is really tough to navigate.

Probably #2 for me is André Ben Hamou's "Practical Ruby for Systems 
Administration" (Apress which I bought as an e-book).  The section on 
one-liners really opened my eyes and has probably done more for me to get 
comfortable with Ruby than anything else -- I've just been forcing myself to do 
all my one-off shell pipelines or perl one-liners in Ruby instead. 

But I think getting used to Ruby is sort of a separate thing from converting 
Cfengine to Puppet. It's worth doing on its own but not required for your 
infrastructure.  For learning Puppet, the best resources out there are the (1) 
the mailing lists, just subscribe and skim the incoming mail stream for 
problems similar to your own and you'll get a lot of good syntax examples and 
ideas about what does and doesn't work, (2) the #puppet freenode irc channel, 
and (3) the LanguageTutorial, TypeReference and FunctionReference pages on the 
wiki.  If you are (as I am) very used to cfengine's ways it will be a bit of 
work to wrap your head around puppet but your life will almost certainly 
improve as a result. :)

-=Eric

- Eric Sorenson - N37 17.255 W121 55.738  - http://twitter.com/ahpook  -

_______________________________________________
Tech mailing list
[email protected]
http://lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to