-
aticig authored
Signed-off-by:
Gulsum Atici <gulsum.atici@canonical.com>
3ace7a54
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
run-vm-initial-setup.sh 913 B
#!/bin/bash
echo $0 started at $(date)
. ./common-vars $@
for PARTICIPANT in `seq ${START} ${MAX}` ; do
. ./openstack_credentials.rc $PARTICIPANT
VM_NAME=`expr charmedosm-${PARTICIPANT}`
IP=`openstack server list --name $VM_NAME --column Networks -f yaml | head -3 | tail -1 | grep -o '[0-9]\+[.][0-9]\+[.][0-9]\+[.][0-9]\+'`
echo $IP
scp -o StrictHostKeyChecking=no -i hackfest_rsa vm-initial-setup.sh ubuntu@${IP}: &
scp -o StrictHostKeyChecking=no -i hackfest_rsa ./hackfest_rsa ubuntu@${IP}:.ssh/id_rsa &
scp -o StrictHostKeyChecking=no -i hackfest_rsa ./hackfest_rsa.pub ubuntu@${IP}:.ssh/id_rsa.pub &
scp -o StrictHostKeyChecking=no -i hackfest_rsa ./hackfest_rsa ./hackfest_rsa.pub ubuntu@${IP}:.ssh/ &
ssh -o StrictHostKeyChecking=no -i hackfest_rsa ubuntu@${IP} "./vm-initial-setup.sh" 2>&1 | tee -a logs/vm-initial-setup-${PARTICIPANT}.log &
done
wait
echo $0 $@ complete at $(date)