X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Fundercloud.sh;h=551dbd8847d2325895d4925f52e88def929f9e5b;hb=1fd700e613e2863038479081e8dca5b268fab241;hp=65462ec874cb6cbc5849592675c9b66f1b9f59e9;hpb=348ee6a04f9a6a2792c947928f7243c406845004;p=apex.git diff --git a/build/undercloud.sh b/build/undercloud.sh index 65462ec8..551dbd88 100755 --- a/build/undercloud.sh +++ b/build/undercloud.sh @@ -13,7 +13,7 @@ source ./variables.sh populate_cache "$rdo_images_uri/undercloud.qcow2" if [ ! -d images ]; then mkdir images/; fi -cp -f cache/undercloud.qcow2 images/ +cp -f cache/undercloud.qcow2 images/undercloud_build.qcow2 #Adding OpenStack packages to undercloud pushd images > /dev/null @@ -43,7 +43,7 @@ if [ "$PR_NUMBER" != "" ]; then if [ "$MERGED" == "False" ]; then REF=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['ref']") echo "Setting GitHub Ref to: $REF" - REPO=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['repo']['git_url']") + REPO=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['repo']['clone_url']") echo "Setting GitHub URL to: $REPO" fi fi @@ -56,7 +56,7 @@ git archive --format=tar.gz --prefix=openstack-tripleo-heat-templates/ HEAD > .. popd > /dev/null LIBGUESTFS_BACKEND=direct virt-customize --upload opnfv-tht.tar.gz:/usr/share \ --run-command "cd /usr/share && rm -rf openstack-tripleo-heat-templates && tar xzf opnfv-tht.tar.gz" \ - -a undercloud.qcow2 + -a undercloud_build.qcow2 # install the packages above and enabling ceph to live on the controller # OpenWSMan package update supports the AMT Ironic driver for the TealBox @@ -67,7 +67,19 @@ LIBGUESTFS_BACKEND=direct virt-customize \ --run-command "yum update -y openwsman*" \ --run-command "cp /usr/share/instack-undercloud/undercloud.conf.sample /home/stack/undercloud.conf && chown stack:stack /home/stack/undercloud.conf" \ --upload ../opnfv-environment.yaml:/home/stack/ \ - -a undercloud.qcow2 + --upload ../virtual-environment.yaml:/home/stack/ \ + -a undercloud_build.qcow2 -popd > /dev/null +# Add custom IPA to allow kernel params +wget https://raw.githubusercontent.com/trozet/ironic-python-agent/opnfv_kernel/ironic_python_agent/extensions/image.py +python3.4 -c 'import py_compile; py_compile.compile("image.py", cfile="image.pyc")' + +# Add performance image scripts +LIBGUESTFS_BACKEND=direct virt-customize --upload ../build_perf_image.sh:/home/stack \ + --upload ../set_perf_images.sh:/home/stack \ + --upload image.py:/root \ + --upload image.pyc:/root \ + -a undercloud_build.qcow2 +mv -f undercloud_build.qcow2 undercloud.qcow2 +popd > /dev/null