diff options
author | Dan Radez <dradez@redhat.com> | 2015-10-15 16:21:35 -0400 |
---|---|---|
committer | Dan Radez <dradez@redhat.com> | 2015-10-16 11:02:30 -0400 |
commit | b85921456409bab0f4fa2d4ba5ac74eb3cd2721a (patch) | |
tree | 9d58748e03aa2fdac16a38cd7741a208f0337fc6 /build | |
parent | 9cb33fba16cce5990e6412db6024168f44698435 (diff) |
updates to the instack VM
- increasing memory and vcpus for the VM
- dumping yum cache
- virt-sparsifying the instack disk image
- remove cleaning stack dir so we actually cache its contents
Change-Id: Ie35a2daeba69a1b53a749ef3423ac6356408ff97
Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'build')
-rw-r--r-- | build/Makefile | 2 | ||||
-rwxr-xr-x | build/instack.sh | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/build/Makefile b/build/Makefile index 38099089..c2ceea95 100644 --- a/build/Makefile +++ b/build/Makefile @@ -132,8 +132,6 @@ instack-clean: rm -f baremetalbrbm_1.xml rm -f instack.xml rm -f instack.qcow2 - rm -rf stack - .PHONY: iso iso: build-clean instack.qcow2 rpm $(ISOCACHE) diff --git a/build/instack.sh b/build/instack.sh index 7d20b76d..5ac08763 100755 --- a/build/instack.sh +++ b/build/instack.sh @@ -77,7 +77,7 @@ 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 '' -instack-virt-setup +NODE_CPU=2 NODE_MEM=8192 instack-virt-setup EOI # attach undercloud to the underlay network for @@ -125,6 +125,9 @@ EOI # install undercloud on Undercloud VM ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" "openstack undercloud install" +# Clean cache to reduce the images size +ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "yum clean all" + # make a copy of instack VM's definitions, and disk image # it must be stopped to make a copy of its disk image ssh -T ${SSH_OPTIONS[@]} stack@localhost <<EOI @@ -147,7 +150,6 @@ fi echo "\nCopying instack disk image and starting instack VM." virsh dumpxml baremetalbrbm_0 > baremetalbrbm_0.xml virsh dumpxml baremetalbrbm_1 > baremetalbrbm_1.xml -cp -f /var/lib/libvirt/images/instack.qcow2 . virsh dumpxml instack > instack.xml #virsh vol-dumpxml instack.qcow2 --pool default > instack.qcow2.xml virsh net-dumpxml brbm > brbm.xml @@ -160,8 +162,10 @@ scp ${SSH_OPTIONS[@]} stack@localhost:baremetalbrbm_0.xml . scp ${SSH_OPTIONS[@]} stack@localhost:baremetalbrbm_1.xml . scp ${SSH_OPTIONS[@]} stack@localhost:instack.xml . scp ${SSH_OPTIONS[@]} stack@localhost:brbm.xml . -scp ${SSH_OPTIONS[@]} stack@localhost:instack.qcow2 . - +sudo cp /var/lib/libvirt/images/instack.qcow2 ./instack.qcow2_ +sudo chown $(whoami):$(whoami) ./instack.qcow2_ +virt-sparsify --check-tmpdir=fail ./instack.qcow2_ ./instack.qcow2 +rm -f ./instack.qcow2_ # start the instack VM back up to continue installation echo "Waiting for instack VM to start" |