Using source control to manage system configs

Chuck Swiger cswiger at mac.com
Mon Feb 26 17:49:03 UTC 2007


Rob wrote:
> 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.
[ ... ]
> So... has anyone come up with a neat way to do these things in CVS, or 
> an SCM system that does it better?

If you don't have strong ties to CVS, already, I suggest using Subversion.  It 
handles many of your complaints about permissions and symlinks better than CVS 
does.

You might find that using something like cfengine from ports suits your goals 
better than rolling your own pushing mechanism.  The issue that you'll run 
into is that you tend to need a human or at least a decent set of rc scripts 
to properly adjust config files and make sure that services come back up after 
a significant config change or major version update exposing some 
compatibility problem.

You might also consider starting with a more simple approach, which is making 
changes on the clients, and then pulling  things under /etc, /usr/local/etc, 
/var/ perhaps, etc somewhere and then importing those into version control, as 
a backup and as a way of tracking significant changes, being able to rollback 
or merge changes, and so forth that you get from SCM/VCS.

-- 
-Chuck



More information about the freebsd-questions mailing list