[Infrastructures] Is cfengine a good tool?

Tim Writer tim@starnix.com
21 Feb 2003 19:27:28 -0500


"Luke A. Kanies" <luke@madstop.com> writes:

> On Fri, 21 Feb 2003, Tim Writer wrote:
> 
> > Perhaps some of you who have used cfengine succesfully
> > could share your configuration.
> 
> I'll share my config, for what it's worth.  It's still a work in progress,
> but you should be able to find it at
> http://luke.madstop.com/cfengine/config.

Thanks.

> > One thing I find very frustrating with cfengine is the quirkiness of the
> > language.  Variables are expanded in some places and not in others.  This,
> > for example, doesn't work:
> >
> >     control:
> >
> >         actionsequence = ( copy )
> >
> >         prefix = ( /u/adm )
> >         source = ( ${prefix}/etc/ssh )
> >
> >     copy:
> >
> >       any::
> >         ${source}
> >           dest=/etc/ssh
> >           ...
> 
> I believe that quoting the variable there will get you what you want.

Okay, I'll try that.  Wierd though.

> > Without consistent variable expansion, how do you prevent cfengine config
> > files from becoming unmaintainable.
> 
> Even with consistent expansion, the files quickly become unmaintainable,
> or close to that, in my opinion.

Nice to know I'm not alone.

> I think that cfengine provides some functionality all in one place that's
> really hard to duplicate manually, but the hoops you have to jump through
> to get there are not very fun.

That's the part I'm not convinced about.  The cfengine docs suggest that it's
superior to Perl and make for example.  While I agree, that the intent of:

    AppendIfNoSuchLine "..."

is clearer than the correpsonding Perl code, I find that its even easier to
write unmaintainable cfengine "code" than Perl.  Perl has its warts, no
question.  But wouldn't it make more sense to write a coherent suite of Perl
modules aimed at performing some of the tasks cfengine does?  IOW, start with
a powerful, widely ported programming language and "tune" it to the task of
infrastructure management, rather than a weak language with some builtin
"knowledge" of system management that you quickly outgrow.

> Cfengine is kind of amazing in that I've never seen a tool used so heavily
> but which has so many people trying to work around it.

So, I'm not completely out to lunch.  That's too bad because I was hoping
cfengine would simplify my life.

-- 
tim writer <tim@starnix.com>                                  starnix inc.
tollfree: 1-87-pro-linux                        thornhill, ontario, canada
http://www.starnix.com              professional linux services & products