X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Fundercloud.sh;h=c1d7c3ab6e1b2f8f1b102e15ca4f365a446ab57b;hb=3f45ea46772a2a2559df77704d74899fd02f3a9a;hp=02ff3ff6f8533c77051aee252cb38795f7f7239f;hpb=9a96f371f290fdf8530239a4c0df591527fe636f;p=apex.git diff --git a/build/undercloud.sh b/build/undercloud.sh index 02ff3ff6..c1d7c3ab 100755 --- a/build/undercloud.sh +++ b/build/undercloud.sh @@ -10,27 +10,45 @@ set -e source ./cache.sh source ./variables.sh +source ./functions.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 +# prep opnfv-tht for undercloud +clone_fork opnfv-tht +pushd opnfv-tht > /dev/null +git archive --format=tar.gz --prefix=openstack-tripleo-heat-templates/ HEAD > ../opnfv-tht.tar.gz +popd > /dev/null -# install the packages above and enabling ceph to live on the controller +pushd images > /dev/null +# installing forked opnfv-tht +# enabling ceph OSDs to live on the controller # OpenWSMan package update supports the AMT Ironic driver for the TealBox +# seeding configuration files specific to OPNFV 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" \ --run-command "sed -i '/ControllerEnableCephStorage/c\\ ControllerEnableCephStorage: true' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml" \ - --run-command "sed -i '/ \$enable_ceph = /c\\ \$enable_ceph = true' /usr/share/openstack-tripleo-heat-templates/puppet/manifests/overcloud_controller_pacemaker.pp" \ - --run-command "sed -i '/ \$enable_ceph = /c\\ \$enable_ceph = true' /usr/share/openstack-tripleo-heat-templates/puppet/manifests/overcloud_controller.pp" \ + --run-command "sed -i '/ComputeEnableCephStorage/c\\ ComputeEnableCephStorage: true' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml" \ --run-command "curl http://download.opensuse.org/repositories/Openwsman/CentOS_CentOS-7/Openwsman.repo > /etc/yum.repos.d/wsman.repo" \ --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" \ - -a undercloud.qcow2 + --upload ../opnfv-environment.yaml:/home/stack/ \ + --upload ../virtual-environment.yaml:/home/stack/ \ + -a undercloud_build.qcow2 + +# 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 -# Patch in OpenDaylight installation and configuration -#LIBGUESTFS_BACKEND=direct virt-customize --upload ../opnfv-tripleo-heat-templates.patch:/tmp \ -# --run-command "cd /usr/share/openstack-tripleo-heat-templates/ && patch -Np1 < /tmp/opnfv-tripleo-heat-templates.patch" \ -# -a undercloud.qcow2 +mv -f undercloud_build.qcow2 undercloud.qcow2 popd > /dev/null