Index of /logtags/upgrade/index

Me

Martijn van de Streek

Categories

Archives

do, 01 feb 2007

Mass Machine Upgrader, updated

I've updated my mass machine updater to skip commented lines (lines starting with #).

di, 21 nov 2006

Mass Machine Upgrader

I maintain a few servers for people, and every time a security upgrade comes out, I have to ssh to each of them, apt-get update; apt-get dist-upgrade and wait. So I wrote a small script to automate this.

It requires a directory named log in your home directory (to write the logs to), and a file called upgrade-hosts.conf in a directory called etc, also in your homedir. It also depends on a private RSA-key in ~/.ssh/id_rsa.

Running the script will start an ssh-agent, and ask you for the passphrase of your RSA key once. Then it will ssh to all machines listed in the config file, and execute a command (some apt-get stuff) to upgrade the machine. Everything gets logged in files in the ~/log directory.

The config file should look something like this:

hostname1  some comment
hostname2  some other comment

foodfight.org index


Creative Commons Licentie Op dit werk is een Creative Commons Licentie van toepassing.