Agile Systems Administration

I found the following on /.

To me the word “agile” in programming has come to mean “a renaissance of best practices”. In other words, an excellent programmer is already agile, but a mearly”good” programmer might benefit from having it spelled out.

But by giving it this new name, there’s a risk of backlash. I guess that’s happened already, judging by the utterly vapid responses to this post!

To me, agile means the following things:

* don’t do work until you need to

* do everything in the simplest way you can

* write tests for everything

* make your work relocatable and reusable

* use version control

* communicate with customers

* release your work to the customer as rapidly as practical

Now, I happen to wear both a sysadmin and a programmer hat depending on the time of day. Mostly sysadmin, but since discovering this philosophy of programming, I’ve started doing more coding. It’s a pretty amazing feeling to have 100% code test coverage with everything tucked away in version control, with single-command deployment and distribution to client machines. They never taught me this stuff in school.

So, if you’re a syadmin, and you’re not as cynical as the other slashdotters here today, can you see anything in that list that might help you?

Here’s some things I do as a sysadmin:

* use version control for /etc configs (if you’re using dispatch-conf + RCS on your gentoo box, you’re doing this already .. just start checking YOUR changes in the RCS files too.. this saves my butt at least once a week)

* practice “test-first sysadmin” .. does your machine need a certain config? Write a script that verifies that the config is present. Run it, it will fail. Fix the config, run it again, watch it succeed. Now put the script in cron and forget about it (you might want to build a framework for this if you have a lot of these little scripts puttering around). This too has saved my butt: I have scripts that make sure ports are CLOSED on certain machines.. when the firewall config was accidentally erased I detected it right away.

* do everything in as simple a way as possible: for your next script, use environment variables and the presence/absence of files in a directory to configure it, instead of inventing Yet Another Config File format .. your scripts will be shorter and more robust. Use programs like djb’s daemontools to run daemons, instead of this bizarre thing where they put themselves in the background and you need all this scaffolding to track them down to start/stop/watchdog (wtf is up with that anyway).

Use the filesystem instead of MySQL .. use publicfile instead of Apache .. etc.. just do the simplest thing that can work.

Don’t ever install things by hand. Build a custom package. If your OS doesn’t let you do this easily, switch to one that does (gentoo rocks for this as well).

* document everything: when you do something, make a note of it on a wiki or a text file. Give the other sysadmins access and chide them when they don’t keep the file up to date. lead by example.

* automate: don’t do anything 3 times. anything you do a third time, automate it. (you will appreciate the simplicity of using the filesystem as your config file when you do this, by the way). need to watch something on a box? create an rss feed. you don’t need a web server, just build the rss feed and scp it from your laptop every hour. do whatever it takes for you to work as little as possible yet meet your goals.

Yeah, you probably do a lot of this already, but you’d never think of calling it “agile” or anything else other than “a good job”. Fine, whatever. Agile is more of a mindset than anything else, based around simplicity and being ready for change.

See Also:


Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: