* handle setting the root password

This commit is contained in:
Jeff Carr 2011-10-01 14:17:25 -04:00
parent 5da0b4bffa
commit 7a87e94113
4 changed files with 38 additions and 20 deletions

View File

@ -19,7 +19,7 @@ pull:
git update-server-info
cat loadbot/testservers |xargs --verbose -n 1 --replace=BLAH ssh BLAH "cd benchmarks; git pull"
screen:
docpu:
cat loadbot/testservers |xargs --verbose -n 1 --replace=BLAH ssh BLAH "screen -d -m -S loadbot -c /root/benchmarks/screenrc"
killall:

View File

@ -1,24 +1,6 @@
#!/bin/bash -x
#SELECT droplets.name, sizes.memory, vnics.vif as vname, ip_addresses.ip, images.name, servers.name from droplets
# JOIN sizes
# ON droplets.size_id = sizes.id
# JOIN vnics
# ON droplets.id = vnics.droplet_id
# JOIN ip_addresses
# ON vnics.ip_address_id = ip_addresses.id
# JOIN images
# ON droplets.image_id = images.id
# JOIN servers
# ON droplets.server_id = servers.id
# WHERE droplets.is_active=1;
# cat /tmp/junk |awk '{print $8}'
# run this once when you have a new collection of test servers
rm .ssh/known_hosts
cat testservers |xargs -n 1 --replace=BLAH echo ./ssh.pl BLAH root dopass \$1 > do_all.sh
./make_do_all.pl
bash -x do_all.sh "echo >> /etc/hosts"
bash -x do_all.sh "echo 69.55.54.144 loadbot >> /etc/hosts"
bash -x do_all.sh "restorecon -R /root/.ssh/"

15
loadbot/make_do_all.pl Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/perl
use strict;
open OUT, ">do_all.sh";
foreach my $line (split "\n", `cat /tmp/junk`) {
my @parts = split " ", $line;
print OUT "./ssh.pl $parts[13] root $parts[7] \$1\n";
}
close OUT;
# system "chmod +x do_all.sh";
system "cat do_all.sh";

21
loadbot/showall.sql Normal file
View File

@ -0,0 +1,21 @@
SELECT droplets.id,
droplets.name,
sizes.memory,
vnics.vif as vname,
ip_addresses.ip,
images.name as iname,
servers.name as sname,
droplets.status,
droplets.vnc_public
FROM droplets
JOIN sizes
ON droplets.size_id = sizes.id
JOIN vnics
ON droplets.id = vnics.droplet_id
JOIN ip_addresses
ON vnics.ip_address_id = ip_addresses.id
JOIN images
ON droplets.image_id = images.id
JOIN servers
ON droplets.server_id = servers.id
WHERE droplets.is_active=1;