[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Partitioning configuration files

From: Nate Campi
Subject: Re: Partitioning configuration files
Date: Fri, 18 Apr 2003 12:43:13 -0700
User-agent: Mutt/1.3.28i

On Fri, Apr 18, 2003 at 12:14:46PM -0700, Jeff Sheltren wrote:
> Hi Rick, personally, I like to use many smaller files.  Once a file gets too
> large, it is hard to see what all it is doing, IMHO.  Here, we are using
> different files based on OS, location, and even software.  ie. we have
> cf.redhat, cf.solaris, cf.lab1, cf.lab2, cf.vmware.
> For example, we had all of the vmware install process (it's a lot of steps
> because we copy out default files, the vmware image, run the vmware-config
> script, etc.) as part of cf.redhat - but it was hard to trace the flow of
> the vmware stuff, so we separated it into its own file, and now it is much
> easier to see what all we do for vmware.

IMO this is the best way to split the files, doing it in a way that
makes it easier to see what it's doing. Having a dedicated vmware file
means that the copy, shellcommands, files, etc, sections related to
vmware are all right next to each other.

Sometimes it can make it much harder to see what's going on if you split
on OS lines (cf.linux, cf.solaris, etc), though that makes it really
easy to not use possibly large portions of cfengine config that aren't
needed. It's a balancing act, but you'll do well if you keep your
thoughts on the goal of keeping things easy to understand.

I can especially see the benefit of multiple files if you run cfengine
really frequently, possibly as a replacement for cron. Such a
configuration could do something like 'cfagent -q -Dcron_replacement'
and when "cron_replacement" is defined cfagent only imports a smaller
subset of files. To me this seems more desirable, but I'd imagine your
normal configuration would have to be pretty large to make parsing it
much of an issue (cfengine configs tend to grow large over time, I've
noticed ;). Such easy optimization is always good, though.
Nate Campi 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]