You are not logged in.
I was just wondering, what strategies do you guys use when updating multiple arch servers?
Obviously logging in to each one and doing pacman -Syu or yaourt -Syau would be too time-consuming.
Could you post some tips or script examples of how you manage updating an arch server farm.
Currently I just use a very simple stupid bash script, which just pipes a pacman or yaourt command via an ssh shell to each server, on after the other.
Last edited by ChojinDSL (2011-06-07 11:36:36)
Offline
salt
http://red45.wordpress.com/2011/05/30/salt-0-8-8/
https://aur.archlinux.org/packages.php?ID=47512
http://blip.tv/thomas-s-hatch/salt-0-8- … on-5180182
http://thatch45.github.com/salt-www/
Give what you have. To someone, it may be better than you dare to think.
Offline
It's a nasty hack, but it helps me keep track of where I'm up to.... You haven't defined what you call an "army"... Wolfram Alpha tells me it is 13.36 million:
http://www.wolframalpha.com/input/?i=ho … an+army%3F
/home/fukawi2 $ cat ~/bin/make-patch-host-list.pl
#!/usr/bin/perl
use strict;
use warnings;
my $filter_domain;
$filter_domain = shift if @ARGV;
my @a=<>;
my %hosts;
my $max_host_chars=0;
# get all the hostnames from stdin and store them
# in a hash keyed by domain for sorting purposes.
foreach (@a) {
if (m/^host\s+.*\s+(\S+\.\S+)\s+/i) {
my $hn = $1;
# skip wildcards
next if ($hn =~ m/\*/);
# we need to know the longest hostname for
# formatting output later.
$max_host_chars = length($hn) if (length($hn) > $max_host_chars);
$hn =~ m/\A([^\.]+)\.(.+)\z/;
my $hostpart = $1;
my $domain = $2;
if (! $filter_domain or $domain =~ m/\A$filter_domain\z/i) {
# reverse the host part and domain part
# (eg, example.com.host01)
# this lets up sort by domain for output purposes
my $rev_hn = "$domain.$hostpart";
$hosts{$rev_hn} = $hn;
}
}
};
if (%hosts) {
$max_host_chars += 5;
my $output_fmt = " ==> %-${max_host_chars}s[ ]\n";
print "=== UPDATE CHECKLIST ===\n\n";
printf("Filtered for hosts in domain: %s\n\n", $filter_domain) if ($filter_domain);
foreach my $domkey (sort(keys %hosts)) {
my $hn = $hosts{$domkey};
printf($output_fmt, $hn);
}
printf("\nTotal Hosts: %u\n", scalar(keys %hosts));
}
exit 0;Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
You haven't defined what you call an "army"... Wolfram Alpha tells me it is 13.36 million
Naaw, that's for all armies. It says China has the biggest army at 1.4 million people, so presumably an army wouldn't need to be bigger than that, and could presumably be much smaller.
On topic, I'll have to take a look at Salt, it seems pretty awesome.
Last edited by JohnnyRogers (2011-06-08 14:29:59)
Offline
Naaah... an army is obviously a couple of corps which are two or three divisions which consist of brigades...
obviously I cant say anything to topic
Offline
Naaw, that's for all armies. It says China has the biggest army at 1.4 million people, so presumably an army wouldn't need to be bigger than that, and could presumably be much smaller.
My bad, you are correct.
On topic, I'll have to take a look at Salt, it seems pretty awesome.
Indeed... Although I can't seem to find in the docs how to *use* it (only configure it and extend it).
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline