summaryrefslogtreecommitdiffstats
path: root/build/instack.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/instack.sh')
-rwxr-xr-xbuild/instack.sh31
1 files changed, 18 insertions, 13 deletions
diff --git a/build/instack.sh b/build/instack.sh
index c19ab0fd..79a99f83 100755
--- a/build/instack.sh
+++ b/build/instack.sh
@@ -2,6 +2,7 @@
set -e
declare -i CNT
+vm_index=4
RDO_RELEASE=kilo
SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null)
@@ -80,11 +81,11 @@ ssh -T ${SSH_OPTIONS[@]} stack@localhost <<EOI
set -e
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_0 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_0 --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_1 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_1 --remove-all-storage 2> /dev/null || echo -n ''
-NODE_CPU=2 NODE_MEM=8192 instack-virt-setup
+for i in \$(seq 0 $vm_index); do
+ virsh destroy baremetalbrbm_\$i 2> /dev/null || echo -n ''
+ virsh undefine baremetalbrbm_\$i --remove-all-storage 2> /dev/null || echo -n ''
+done
+NODE_COUNT=5 NODE_CPU=2 NODE_MEM=8192 instack-virt-setup
EOI
# let dhcp happen so we can get the ip
@@ -150,8 +151,10 @@ if virsh list | grep instack > /dev/null; then
fi
echo $'\nGenerating libvirt configuration'
-virsh dumpxml baremetalbrbm_0 > baremetalbrbm_0.xml
-virsh dumpxml baremetalbrbm_1 > baremetalbrbm_1.xml
+for i in \$(seq 0 $vm_index); do
+ virsh dumpxml baremetalbrbm_\$i > baremetalbrbm_\$i.xml
+done
+
virsh dumpxml instack > instack.xml
#virsh vol-dumpxml instack.qcow2 --pool default > instack.qcow2.xml
virsh net-dumpxml brbm > brbm-net.xml
@@ -160,8 +163,10 @@ EOI
# copy off the instack artifacts
echo "Copying instack files to build directory"
-scp ${SSH_OPTIONS[@]} stack@localhost:baremetalbrbm_0.xml .
-scp ${SSH_OPTIONS[@]} stack@localhost:baremetalbrbm_1.xml .
+for i in $(seq 0 $vm_index); do
+ scp ${SSH_OPTIONS[@]} stack@localhost:baremetalbrbm_${i}.xml .
+done
+
scp ${SSH_OPTIONS[@]} stack@localhost:instack.xml .
scp ${SSH_OPTIONS[@]} stack@localhost:brbm-net.xml .
scp ${SSH_OPTIONS[@]} stack@localhost:default-pool.xml .
@@ -192,9 +197,9 @@ ssh -T ${SSH_OPTIONS[@]} stack@localhost <<EOI
set -e
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_0 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_0 --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_1 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_1 --remove-all-storage 2> /dev/null || echo -n ''
+for i in \$(seq 0 $vm_index); do
+ virsh destroy baremetalbrbm_\$i 2> /dev/null || echo -n ''
+ virsh undefine baremetalbrbm_\$i --remove-all-storage 2> /dev/null || echo -n ''
+done
EOI