Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Having a system's configuration represented by its current state is risky, inefficient, and opaque. At some point you may be left with an unsupported system and no upgrade path. Then configuring a new system compatible with the old is a process or trial and error. Furthermore, if at some point the system is damaged the only option is to go back to the most recent full backup, and try to remember what changes followed from that point. Also, the only way to create a system compatible with the original is through a complete dump/restore. Finally, in such a setup there's no way to know how you solved a particular problem; the only thing you can do is to look at the corresponding configuration files and try to guess what you changed to achieve the desired effect.

Currently for each system I maintain, I keep a log file where I record all system administration activity, starting from the installation: installation options, added packages, changes in configuration files, updates, problem fixes etc. In theory this allows me to (manually) replay all changes to arrive at the current state, or to unroll an erroneous change by executing the reverse commands. However, this process is also inefficient, error-prone, and relies on human judgment.

Another thing I've tried is to put /etc configuration files under version control with git. This helps me document the changes automatically and also apply them on a clean setup. But it's not without problems: git has to run under sudo, passwords and private keys may be stored in the repository, installed packages can't be meaningfully tracked, and git will have a fit if I try to extend this approach to all the system's directories.

I've also thought about performing all changes through shell scripts or makefiles, but I think this process will require a lot of effort and will be fragile.

Are there some better methods or tools that I'm missing?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Do yourself (and your loved ones) a favor and move out of manual system configuration as soon as possible!

You should start using system configuration management software. The original use case for such software was management of large number of hosts (for some definition of "large"). However the underlying premises hold for the management of even a single host. While the required effort might not be immediately justifiable, for anyone planning on long-term basis it actually makes sense.

The big names in the field are (in chronological order):

I mention the programming languages not just for the remote case you need to delve into the implementation code. While it isn't be an absolute requirement, familiarity with the underlying language might help on the usage of each tool, since their configuration is influenced by the language.

My personal choice has been CFengine, because of... age, language, and beauty of underlying theory. But any of these (and others) can definitely help you.

The initial setup can be a little daunting... especially for people like us who have spent years doing the manual way. But it definitely pays out in the end!

share|improve this answer
    
To help me choose I run a Google query for "X configuration", where X was each of the four systems. Here are the results: puppet configuration 2,000,000; cfengine configuration 203,000; bcfg2 configuration 291,000; chef configuration 6,490,000 –  Diomidis Spinellis Mar 31 '12 at 17:28
    

In terms of tools, you may take a look at this page which is about automating system administration using open source configuration management tools (USENIX 2010 conference in Boston which hosted the first Configuration Management Summit):

The wikipedia related page is also useful.

Hope these help

share|improve this answer
    
Right! I remember reading about CFEngine in the past. –  Diomidis Spinellis Mar 30 '12 at 19:23

Great resources mentioned above!

Netdisco - for SNMP, CDP, LLDP based network management and discovery, Postgres back-end http://www.netdisco.org/

and

Nedi, again taking advantage of SNMP, CDP ... http://www.nedi.ch/about/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.