Commit 4f5ccc6c authored by David Johnson's avatar David Johnson

Use pssh in a few key places to scale much more effectively.

parent 1709fd35
......@@ -49,6 +49,9 @@ __openstack() {
done
}
maybe_install_packages pssh
PSSH='/usr/bin/parallel-ssh -t 0 -O StrictHostKeyChecking=no '
# Make sure our repos are setup.
#apt-get install ubuntu-cloud-keyring
#echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" \
......@@ -880,6 +883,9 @@ fi
#
# Install the Compute service on the compute nodes
#
PHOSTS=""
mkdir -p $OURDIR/pssh.setup-compute.stdout $OURDIR/pssh.setup-compute.stderr
if [ -z "${NOVA_COMPUTENODES_DONE}" ]; then
NOVA_COMPUTENODES_DONE=1
......@@ -890,8 +896,15 @@ if [ -z "${NOVA_COMPUTENODES_DONE}" ]; then
# Copy the latest settings (passwords, endpoints, whatever) over
scp -o StrictHostKeyChecking=no $SETTINGS admin-openrc.sh $fqdn:$OURDIR
$SSH $fqdn $DIRNAME/setup-compute.sh
PHOSTS="$PHOSTS -H $fqdn"
done
echo "*** Setting up Cmopute service on nodes: $PHOSTS"
$PSSH $PHOSTS -o $OURDIR/pssh.setup-compute.stdout \
-e $OURDIR/pssh.setup-compute.stderr $DIRNAME/setup-compute.sh
for node in $COMPUTENODES
do
touch $OURDIR/compute-done-${node}
done
......@@ -1148,6 +1161,10 @@ fi
if [ -z "${NEUTRON_COMPUTENODES_DONE}" ]; then
NEUTRON_COMPUTENODES_DONE=1
PHOSTS=""
mkdir -p $OURDIR/pssh.setup-compute-network.stdout \
$OURDIR/pssh.setup-compute-network.stderr
for node in $COMPUTENODES
do
fqdn=`getfqdn $node`
......@@ -1155,8 +1172,16 @@ if [ -z "${NEUTRON_COMPUTENODES_DONE}" ]; then
# Copy the latest settings (passwords, endpoints, whatever) over
scp -o StrictHostKeyChecking=no $SETTINGS $fqdn:$SETTINGS
ssh -o StrictHostKeyChecking=no $fqdn $DIRNAME/setup-compute-network.sh
PHOSTS="$PHOSTS -H $fqdn"
done
echo "*** Setting up Compute network on nodes: $PHOSTS"
$PSSH $PHOSTS -o $OURDIR/pssh.setup-compute-network.stdout \
-e $OURDIR/pssh.setup-compute-network.stderr \
$DIRNAME/setup-compute-network.sh
for node in $COMPUTENODES
do
touch $OURDIR/compute-network-done-${node}
done
......@@ -2092,6 +2117,10 @@ fi
if [ -z "${TELEMETRY_COMPUTENODES_DONE}" ]; then
TELEMETRY_COMPUTENODES_DONE=1
PHOSTS=""
mkdir -p $OURDIR/pssh.setup-compute-telemetry.stdout \
$OURDIR/pssh.setup-compute-telemetry.stderr
for node in $COMPUTENODES
do
fqdn=`getfqdn $node`
......@@ -2099,8 +2128,16 @@ if [ -z "${TELEMETRY_COMPUTENODES_DONE}" ]; then
# Copy the latest settings (passwords, endpoints, whatever) over
scp -o StrictHostKeyChecking=no $SETTINGS $fqdn:$SETTINGS
ssh -o StrictHostKeyChecking=no $fqdn $DIRNAME/setup-compute-telemetry.sh
PHOSTS="$PHOSTS -H $fqdn"
done
echo "*** Setting up Compute telemetry on nodes: $PHOSTS"
$PSSH $PHOSTS -o $OURDIR/pssh.setup-compute-telemetry.stdout \
-e $OURDIR/pssh.setup-compute-telemetry.stderr \
$DIRNAME/setup-compute-telemetry.sh
for node in $COMPUTENODES
do
touch $OURDIR/compute-telemetry-done-${node}
done
......
......@@ -24,6 +24,11 @@ if [ "$HOSTNAME" != "$NETWORKMANAGER" ]; then
exit 0;
fi
maybe_install_packages pssh
PSSH='/usr/bin/parallel-ssh -t 0 -O StrictHostKeyChecking=no '
PHOSTS=""
mkdir -p $OURDIR/pssh.setup-ovs-node.stdout $OURDIR/pssh.setup-ovs-node.stderr
# Do the network manager node first, no ssh
echo "*** Setting up OpenVSwitch on $HOSTNAME"
$DIRNAME/setup-ovs-node.sh
......@@ -32,9 +37,12 @@ for node in $NODES
do
[ "$node" = "$NETWORKMANAGER" ] && continue
echo "*** Setting up OpenVSwitch on $node"
fqdn=`getfqdn $node`
$SSH $fqdn $DIRNAME/setup-ovs-node.sh
PHOSTS="$PHOSTS -H $fqdn"
done
echo "*** Setting up OpenVSwitch via pssh: $PHOSTS"
$PSSH -o $OURDIR/pssh.setup-ovs-node.stdout -e $OURDIR/pssh.setup-ovs-node.stderr \
$PHOSTS $DIRNAME/setup-ovs-node.sh
exit 0
......@@ -180,6 +180,11 @@ unset KEY_EXPIRE
# Get the hosts files setup to point to the new management network
# and setup the VPN on the clients.
#
maybe_install_packages pssh
PSSH='/usr/bin/parallel-ssh -t 0 -O StrictHostKeyChecking=no '
PHOSTS=""
mkdir -p $OURDIR/pssh.setup-vpn.stdout $OURDIR/pssh.setup-vpn.stderr
for node in $NEWVPNNODES
do
[ "$node" = "$NETWORKMANAGER" ] && continue
......@@ -189,7 +194,10 @@ do
scp -p -o StrictHostKeyChecking=no \
/etc/openvpn/ca.crt $KEY_DIR/$node.crt $KEY_DIR/$node.key \
$fqdn:$OURDIR
$SSH $fqdn $DIRNAME/setup-vpn-client.sh
PHOSTS="$PHOSTS -H $fqdn"
done
$PSSH -o $OURDIR/pssh.setup-vpn.stdout -e $OURDIR/pssh.setup-vpn.stderr \
$PHOSTS $DIRNAME/setup-vpn-client.sh
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment