[NZLUG] Managing multiple-machine application configs with DVCS

Jim Cheetham jim at gonzul.net
Tue Jun 4 16:52:00 NZST 2013


I'm looking for some advice on ways to manage the operational configs
of a bunch of almost-completely-the-same machines, in this case using
git but I expect working patterns from other DVCSs will apply well
enough ... (No, puppet and friends are not currently a useful answer)

So, I have a bunch of machines with the same app on each, where the
app config directories are 99% the same. It seems to make sense to
have each machine's directory in git, and have a single upstream copy
of the repository. Some files are volatile; I can ignore those OK.
When I make a change to the config to one host, I can push it to the
central repo, and from there get it to the other hosts.

My current problem however is that some files have unique lines, e.g.
http config files with ServerName lines. I'd like to be able to track
the file for changes to the other lines in the config, which are
significant, but to allow local differences on specific lines.

I originally thought I'd be able to use branches (i.e. each machine's
working copy is on its own branch) but that doesn't seem flexible
enough. Perhaps I need to do something like maintain a set of patch
files that get applied to each host's working directory, the changes
are consistent and fixed ... but I don't know whether that's a good
idea.

Comments welcome ... :-) But I'm not going to move to puppet in the
short term ...

-jim


More information about the NZLUG mailing list