Server configuration and version control

One of the (few?) good habits I managed to pick up during 2010 was that I became serious about keeping server configuration under version control. While it might primarily have been something I was taught at work it is definitely a practice I have adopted privately as well.

The most obvious benefit, and potentially the most valuable one, is the historic record version control provides. Yet, the part I appreciate most is how easy it becomes to compare new configuration against current one; to verify that you only made  just those changes which you  intended to make. There is a certain comfort in being able to run a git diff before restarting a local service or before pushing new cluster configuration.

(Not that I do not appreciate having access to the configuration history. When being asked about something which happend a few months ago, those commit messages and those diffs becomes awful handy.)

For your local /etc this is as a good time as any to take a peak at etckeeper.

4 Responses to Server configuration and version control

  1. Pingback: Tweets that mention / Andreas | System administrator / » Server configuration and version control -- Topsy.com

  2. Linus January 9, 2011 at 12:33

    Another thing I miss by not running a proper OS :-(

  3. Blippe af Leiner (@blippe) October 11, 2012 at 06:59

    Do you push some/all your /etc to a repo somewhere as a “backup” and to compare setups, or do you only keep it as a local tool?

    • Andreas October 11, 2012 at 17:25

      Well, at work there are a few snowflakey servers from which I have the /etc git repository pulled to a central admin server. Otherwise, I now generally try to keep /etc managed by Puppet, which of course is under revision control.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.