rancid and cvsweb

Rancid, or a similar program, is a necessity in network management.  You can find a decent rancid tutorial at http://www.joe-ma.co.za/page.php?9, so I’m not going to flog that dead horse.  I can’t expect my coworkers to learn either CVS or Subversion, however.  They want a pretty Web interface, or they won’t use the tool.

The quickest way to get a Web front end on a CVS repository is CVSWeb, available on FreeBSD as  /usr/ports/devel/cvsweb.  This installes cvsweb.cgi in /usr/local/www/cgi-bin and its configuration information in /usr/local/etc/cvsweb.

CVSWeb installs configuration files for several popular CVS repositories.  We want to look at our own CVS repository, so start with the default configuration.  Copy cvsweb.conf.dist to cvsweb.conf and open it in a text editor.

Change @CVSrepositories to include your CVS directory

CVSrepositories = (
'work' => ['routers', '/home/ranciduser/CVS'],
);

Manual pages are irrelevant to this repository, so I comment out $mancgi.  Then I set the title to something meaningful for us.

$defaulttitle = "Router Config CVS Repository";

At this point, point your Web browser at cvsweb.cgi.  You should be able to browse down into your repository and view your RANCID router configs.  I had a couple of problems in my initial install, though, in that the icons are not visible.  The Apache error log shows where the script expects to find icons, and I created Apache aliases to match those expectations.

The good news is, the boss loves it.  The bad news is, the boss now wants to have that same functionality for UNIX system config files.  Sigh.

Comments are closed.