Created
May 1, 2012 17:45
-
-
Save lbt/2569977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mer Delivery System host:port | |
MDS="mer.dgreaves.com:8001" | |
VMS="obsfe:fe obsbe:be obsw1:worker" | |
obsuser=obsuser | |
. setup-obs.conf | |
for v in $VMS; do | |
# split v into vm/role | |
IFS=":" read -r vm role DUMMY <<< "$v" | |
echo "Setting up $vm as $role based on $v" | |
# Tidy up: remove the old VMs | |
(virsh --connect qemu:///system destroy $vm | |
sleep 1 | |
/maemo/devel/mk_vm/mk_suse_vm $vm | |
sleep 5 | |
while ! ssh -o CheckHostIP=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$vm true 2>/dev/null ; do | |
sleep 1 | |
done | |
echo "$vm is up... starting install as $role" | |
scp -o CheckHostIP=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null setup-obs.sh setup-obs.conf root@$vm:. | |
ssh -o CheckHostIP=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$vm ./setup-obs.sh $role) & | |
done | |
# Allow installs and setups to complete | |
wait | |
echo "All VM setup done - starting tests" | |
sleep 10 | |
## Connect MDS | |
su - ${obsuser} -c $(pwd)/setup-mds.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment