[Puppet-users] Pupppet Ruby DSL

Matthew Palmer
Sat, 29 Jul 2006 07:11:15 -0000

On Sat, Jul 29, 2006 at 03:37:10PM +0200, David Schmitt
wrote:
> On Saturday 29 July 2006 09:11, Matthew Palmer wrote:
> > > And last but not least, it''s probably not much trouble
to write a grammar
> > > that accepts .pp files and does something sensible with them
(translating
> > > to xml, creating statistics, querying a configuration of a host,
cross
> > > references) using ruby as DSL one can use the ruby tools for
that, but
> > > only them. This seems to balance out...
> >
> > This is a valid concern.  It is almost certainly going to be harder to
> > parse a Ruby script than a .pp file.  However, with the .pp language
> > growing more complex to support more operations, you''d have a
bit of a job
> > making sure you had a completely valid parser in another language
anyway.
> > I''d suggest, if you''re looking for a data form of a
manifest to read, just
> > use the localconfig.yaml file.
>
> As soon as the puppetmaster serializes the manifest for the client ...

Actually, I would expect that the wrapper code to invoke the Ruby manifest
and get something useful out would be maybe 3 lines.

> * De-/Serializer: translation from/to a static string representation of a
> configuration
> ** yaml for "native" clients
> ** XML for others

Define "native" here -- YAML is a well-specified standard for the
serialization of data that compares quite well to XML for most data
representation tasks.  It isn''t even a Ruby thing, really -- it started
in
the Perl world, IIRC.

> Currently these parts are not very separated. Exposing interfaces for these

I don''t know the code base backwards, but so far I''ve been
pretty happy with
the low coupling present in the various parts of Puppet.

- Matt

--
New Yankee Workshop isn''t a "how to" for home hobbyists,
it''s "Baywatch" for
powertool fetishists.
		-- Geoff Kinnel, ASR