From owner-freebsd-questions@FreeBSD.ORG Sun Feb 25 22:43:26 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D164816A482 for ; Sun, 25 Feb 2007 22:43:26 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4692B13C48D for ; Sun, 25 Feb 2007 22:43:25 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (dialup72.ach.sch.gr [81.186.70.72]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l1PMgrHo018534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 26 Feb 2007 00:43:03 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id l1PMgiGr005829; Mon, 26 Feb 2007 00:42:47 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id l1PMgWrf005820; Mon, 26 Feb 2007 00:42:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 26 Feb 2007 00:42:32 +0200 From: Giorgos Keramidas To: Rob Message-ID: <20070225224231.GC5630@kobe.laptop> References: <2D57E1E1-DDD0-41AA-9CE2-000B830B5798@deathbeforedecaf.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2D57E1E1-DDD0-41AA-9CE2-000B830B5798@deathbeforedecaf.net> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.711, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.49, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: Using source control to manage system configs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2007 22:43:26 -0000 On 2007-02-26 07:01, Rob wrote: > 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? With modern SCM systems, which support easy distribution and update tracking over distributed collections of 'workspaces', it's very tempting to attempt to do this. I'm still not convinced it's a good idea though. I prefer a more controlled model of a workspace hierarchy where changes are made by trusted people and then a separate "install" process, which publishes, or "pushes" if you prefer, the modified files to the deployment hosts. I know this is now the answer you are looking for, but when evaluating this sort of thing even a "don't do it" option should be evaluated. - Giorgos