Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2007 07:01:16 +1030
From:      Rob <freebsd@deathbeforedecaf.net>
To:        freebsd-questions@freebsd.org
Subject:   Using source control to manage system configs
Message-ID:  <2D57E1E1-DDD0-41AA-9CE2-000B830B5798@deathbeforedecaf.net>

next in thread | raw e-mail | index | archive | help
Dear List,

I'd like some advice on managing config files on multiple servers  
with a source control system. The idea is to update files locally,  
and commit them back to a central repository.

I know that CVS is the usual choice, but there are a couple of things  
that I can't get CVS to do.

Overlapping directories
-----------------------

Some files (/etc/ntp.conf, /etc/resolv.conf) are identical across a  
site. Instead of duplicating these in the repository, I'd like to  
create a module like

   hosts/shared/etc

that gets installed on every server.

Then each server has a module like

   hosts/$HOST/etc

that adds to or overwrites these files. If a file is updated locally,  
it is committed back to the correct module.

CVS (quite reasonably) won't checkout 2 modules to the same working  
directory.

Filemodes & symlinks
--------------------

CVS only works with regular files, and doesn't preserve permissions.  
I can work around this with mtree(8) and module programs, but it  
would be nice to have it built-in.

So... has anyone come up with a neat way to do these things in CVS,  
or an SCM system that does it better?

Thanks
Rob.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2D57E1E1-DDD0-41AA-9CE2-000B830B5798>