PDA

View Full Version : ConfigMgmt best practice for Sys Admin (config files, etc.)


cds
10-21-2005, 05:17 PM
I am mostly a software developer and as such I depend on SCM.
I actually feel remarkably insecure when I don't have it!

Now I am setting up my own Linux system and there are lots of
configuration files to create and maintain: /etc/passwd, /etc/fstab,
XF86Config, /dev, spooler stuff, /etc, etc..

It seems likely that a newbie like me is going to screw up some of
those, so version control & history would be a really good thing to
have.

Is there a recommended way to do version control on these puppies?
(I am comfortable with rcs.)

If you have experience with SCM & version control for Linux/Unix System
Administration, I would love to hear of it.

TIA,
CDS

Daniel P. Kionka
10-22-2005, 02:41 AM
cds wrote:
.... Now I am setting up my own Linux system and there are lots of configuration files to create and maintain: /etc/passwd, /etc/fstab, XF86Config, /dev, spooler stuff, /etc, etc..

Not only that, but later you will upgrade to a new version of Linux, and
the base version of some of those files will change.

What I do is set up a CVS repository, and I have a module for every
Linux version I use, mapped to /. Before I change a file, I check in
the original version. Then I make the change and check it in.

Some versions of Linux come with CVS control of config files built in to
a system that lets you switch between configurations, but I can't
remember what that was.

Nico Kadel-Garcia
10-22-2005, 05:29 AM
"Daniel P. Kionka" <dkionka@yahoo.com> wrote in message
news:11lk5q7hbp7l14b@corp.supernews.com... cds wrote: ... Now I am setting up my own Linux system and there are lots of configuration files to create and maintain: /etc/passwd, /etc/fstab, XF86Config, /dev, spooler stuff, /etc, etc.. Not only that, but later you will upgrade to a new version of Linux, and the base version of some of those files will change. What I do is set up a CVS repository, and I have a module for every Linux version I use, mapped to /. Before I change a file, I check in the original version. Then I make the change and check it in. Some versions of Linux come with CVS control of config files built in to a system that lets you switch between configurations, but I can't remember what that was.

Oh, goodness, I go through this all the time. I distrust CVS for this, due
to the usual method of having to create a central CVS repository, unless you
set up a CVS on each machine. I tend to use RCS locally for little config
files like /etc/fstab, /etc/exports, /etc/hosts, etc. Just make sure never
to RCS lock a file that may be edited by the system dynamically or by
another administrator behind your back. Check it in, check it back out
immediately, and you can run "rcsdiff" to track the changes.

Pierre Asselin
10-22-2005, 03:33 PM
Followup set to c.l.setup .

In comp.software.config-mgmt cds <charles.stevenson@getronics.com> wrote: I am mostly a software developer and as such I depend on SCM. I actually feel remarkably insecure when I don't have it!

Good for you.

Now I am setting up my own Linux system and there are lots of configuration files to create and maintain: /etc/passwd, /etc/fstab, XF86Config, /dev, spooler stuff, /etc, etc..

I use RCS for those. I have a directory with a farm of symlinks to
the real files and I manage them from there with RCS. If some
vendor update tool change my files, the changes are visible through
rcsdiff. You can't manage /dev that way, but I'm on Gentoo and
udev takes care of that.

Setting up is a little complicated because you want RCS to *not*
expand any revision keywords used by your distribution. That would
cause RCS to break the symlinks and replace them by local copies
of the files. Briefly,

# mkdir /root/config
# mkdir /root/config/RCS

And now, for the password file,

# cd /root/config
# ln -s ../../etc/passwd passwd
# ci -t-/etc/passwd passwd : removes the link
# rcs -ko passwd : disable expansion
# co -l passwd : get editable copy
# rm passwd : replace it by ...
# ln -s ../../etc/passwd passwd : ... new symlink

From now on,

# cd /root/config
# vi passwd : or useradd, etc.
# rcsdiff passwd
# ci -l passwd

--
pa at panix dot com


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service