summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/Makefile10
-rwxr-xr-xbuild/instack.sh31
-rw-r--r--build/opnfv-apex.spec6
3 files changed, 26 insertions, 21 deletions
diff --git a/build/Makefile b/build/Makefile
index 2c7e3e2e..fa89ee89 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -101,12 +101,11 @@ rpm:
pushd ../ && git archive --format=tar --prefix=opnfv-apex-$(RPMVERS)/ HEAD > build/opnfv-apex.tar
tar -u --xform="s:instack.qcow2:opnfv-apex-$(RPMVERS)/build/instack.qcow2:" --file=opnfv-apex.tar instack.qcow2
tar -u --xform="s:instack.xml:opnfv-apex-$(RPMVERS)/build/instack.xml:" --file=opnfv-apex.tar instack.xml
- qemu-img create -f qcow2 baremetalbrbm_0.qcow2 40G
- tar -u --xform="s:baremetalbrbm_0.qcow2:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_0.qcow2:" --file=opnfv-apex.tar baremetalbrbm_0.qcow2
tar -u --xform="s:baremetalbrbm_0.xml:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_0.xml:" --file=opnfv-apex.tar baremetalbrbm_0.xml
- qemu-img create -f qcow2 baremetalbrbm_1.qcow2 40G
- tar -u --xform="s:baremetalbrbm_1.qcow2:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_1.qcow2:" --file=opnfv-apex.tar baremetalbrbm_1.qcow2
tar -u --xform="s:baremetalbrbm_1.xml:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_1.xml:" --file=opnfv-apex.tar baremetalbrbm_1.xml
+ tar -u --xform="s:baremetalbrbm_2.xml:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_2.xml:" --file=opnfv-apex.tar baremetalbrbm_2.xml
+ tar -u --xform="s:baremetalbrbm_3.xml:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_3.xml:" --file=opnfv-apex.tar baremetalbrbm_3.xml
+ tar -u --xform="s:baremetalbrbm_4.xml:opnfv-apex-$(RPMVERS)/build/baremetalbrbm_4.xml:" --file=opnfv-apex.tar baremetalbrbm_4.xml
tar -u --xform="s:brbm-net.xml:opnfv-apex-$(RPMVERS)/build/brbm-net.xml:" --file=opnfv-apex.tar brbm-net.xml
tar -u --xform="s:default-pool.xml:opnfv-apex-$(RPMVERS)/build/default-pool.xml:" --file=opnfv-apex.tar default-pool.xml
tar -u --xform="s:instackenv-virt.json:opnfv-apex-$(RPMVERS)/build/instackenv-virt.json:" --file=opnfv-apex.tar instackenv-virt.json
@@ -132,6 +131,9 @@ instack-clean:
rm -f instackenv-virt.json
rm -f baremetalbrbm_0.xml
rm -f baremetalbrbm_1.xml
+ rm -f baremetalbrbm_2.xml
+ rm -f baremetalbrbm_3.xml
+ rm -f baremetalbrbm_4.xml
rm -f instack.xml
rm -f instack.qcow2
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
diff --git a/build/opnfv-apex.spec b/build/opnfv-apex.spec
index 5173565c..641c37c7 100644
--- a/build/opnfv-apex.spec
+++ b/build/opnfv-apex.spec
@@ -32,8 +32,7 @@ mkdir -p %{buildroot}%{_var}/opt/opnfv/stack/
cp build/instack.qcow2 %{buildroot}%{_var}/opt/opnfv/stack/
cp build/instack.xml %{buildroot}%{_var}/opt/opnfv/
-cp build/baremetalbrbm_0.xml %{buildroot}%{_var}/opt/opnfv/
-cp build/baremetalbrbm_1.xml %{buildroot}%{_var}/opt/opnfv/
+cp build/baremetalbrbm_*.xml %{buildroot}%{_var}/opt/opnfv/
cp build/brbm-net.xml %{buildroot}%{_var}/opt/opnfv/
cp build/default-pool.xml %{buildroot}%{_var}/opt/opnfv/
@@ -52,8 +51,7 @@ cp build/stack/overcloud-full.vmlinuz %{buildroot}%{_var}/opt/opnfv/stack/
%{_bindir}/opnfv-clean
%{_var}/opt/opnfv/stack/instack.qcow2
%{_var}/opt/opnfv/instack.xml
-%{_var}/opt/opnfv/baremetalbrbm_0.xml
-%{_var}/opt/opnfv/baremetalbrbm_1.xml
+%{_var}/opt/opnfv/baremetalbrbm_*.xml
%{_var}/opt/opnfv/brbm-net.xml
%{_var}/opt/opnfv/default-pool.xml
%{_var}/opt/opnfv/instackenv-virt.json