Quoting Luke Kanies <[EMAIL PROTECTED]>:
[EMAIL PROTECTED] wrote:
It is now 3 days since I thought what a shame it was. In that time,
I have written a little over 2.5k lines of code, and I have a tool
called mcfg. I can't make too many claims about mcfg. It probably
leaks memory... i spent at least a few hours running it through
valgrind and efence but I doubt that caught all the holes. It's
really very simple, and it lacks a lot of nice features that e.g.
the lcfg compiler has. However, it is small, independent, possibly
clean and standard compliant.
Nb one glaring error (apart from the horrors of my spelling at 4am) is
that mcfg doesn't escape values for inclusion in xml. This means that
while it is quite legitimate to use characters like &,",<,> in a quoted
value, at the moment it'll probably generate invalid xml. I don't have
time to fix this right now, but I will do so asap.
In looking at the html you sent (I got the attachment on the first
email, btw), the only two sticking points I see right now for Puppet
are these:
First, I took the lazy way out with Puppet and I use a YAML dump of a
simple hash-like Ruby class, so I'd have to write a simple tool to
convert from XML to YAML (I've been meaning to add XML support for a
while, but it's never been a priority for anyone). Given some
example output, I could have this tool written in minutes, I expect.
Second, the resources described in your compiler seem to be in a flat
list, where Puppet resources are all typed -- you can talk about
files, packages, or services, for instance, but you can't talk about
generic resources. Does mcfg support some kind of type/name tuple
for resources? Could you provide an example configuration, just so I
can get an idea of what this would actually look like?
I must admit I haven't read the puppet docs in some time. I have
targetted the exact straw-man proposal in the paper. It isn't a flat
list, and it isn't typed in detail, its a set of trees of scalars
(alternatively you can see it as a set of maps, each of which may
contain other maps). Detailed typing is a nice feature, but its also an
expensive feature and after all this is called the minimal aspect
compiler - I wasn't trying to outcompete everyone else on features,
just to make some example high level tool that might be interesting.
If so, then I could get mcfg compiling Puppet configurations
lickety-split, and I'd be interested in doing this when I have a few
minutes.
You'd still need a client and server for transferring the
configuration, but that's pretty straightforward; in looking at my
code, I could probably swap out Puppet's compiler for mcfg in only a
few lines of code (just create a different Interpreter class to load
with the same methods).
I was careful to tackle one part of the problem, rather than making
this a total solution, just because I have to be realistic about my
time (I'm a psych phd now..). For example, a simple way to daemonise it
is to wrap it in a fam-sensitive script, a simple way to publish files
is rsync, or a cron job that ftps it in. I think perhaps one reason
people get nervous around these tools is how much they do. I've taken
the opposite approach: it reads some files in, it writes some files
out; all other infrastructure is at the pleasure of the sysadmin.
Ed
_______________________________________________
lssconf-discuss mailing list
lssconf-discuss@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/lssconf-discuss