Re: Version Controled Configs
Ok, so I just ended up backing up my configs and diving in head first. It is really much easier than I thought, although I had to fiddle with subversion to do the in-place import. Answering my earlier questions…
- Repository location – I know how to use the old RCS version control software, which kept everything in the same directory of what you were controlling. So with SVN I would designate a different location in the filesystem (say /var/lib/svn) and store everything there? This seems nice as it would be the same root location for all my repos (assuming an increased usage of SVN down the road). Answer: Not a big deal. I ended up placing the repo in /var/svn/systems/<hostname>/etc hoping this will prove to be a generic enough layout to hold more system stuff in the future. Then /etc is just a working copy of the repo; no need to edit the files in one location and check them out to /etc. However, that turns out to be the added benefit as I could… To any machine running subversion too.
- However, in the normal daily routine would I have to checkout everything to a different directory so that I can edit it using my non-su account? Using my regular user account would be the preferred route (and more SA-correct way) but really I’m the only one who access the files so do I just use root for everything? Answer: Not really an issue. I su to root, make modifications, then when checking everything back into the repo I use the –username arg and specify my name. It is not error-proof, but it works.
- File owner/group permissions – How would this work? If I use my regular account, would I simply su to root and checkout files to /etc to “activate” them? Answer: This might be the only real problem. It appears that subversion doesn’t keep track of either of these which could pose quite a problem. However, there isn’t an issue with editing as I am doing so with root (or sudo) anyways.
The main thing to remember is once I’m done with editing, I have to run some additional subversion commands. Namely, svn update to verify what’s changed, make any add or rm’s depending on additions or deletions, then svn ci -m “whats changed” –username <myname> to check it all in, and finally svn up to keep everything in line. Now I can run svn log to see my change history. Schweet.
Leave a Reply