X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=build%2Fovercloud-full.sh;h=9b4f8490eec2f04909b388faef77af4099cea638;hb=efebeeccabce03946cb5e58ee6a4eac93ec015cd;hp=db695daf2bb1cab255274ffe3af331e7718c10ea;hpb=5e4c2ffc86d0426113f60b8069e81482f82bbc8d;p=apex.git diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh index db695daf..9b4f8490 100755 --- a/build/overcloud-full.sh +++ b/build/overcloud-full.sh @@ -10,7 +10,7 @@ set -xe source ./cache.sh source ./variables.sh -source ./functions.sh +source ./barometer-install.sh populate_cache "$rdo_images_uri/overcloud-full.tar" @@ -25,31 +25,80 @@ mv -f ${BUILD_DIR}/overcloud-full.qcow2 ${BUILD_DIR}/overcloud-full_build.qcow2 pushd ${BUILD_DIR} > /dev/null # prep opnfv-puppet-tripleo for undercloud -clone_fork opnfv-puppet-tripleo -pushd opnfv-puppet-tripleo > /dev/null -git archive --format=tar.gz --prefix=tripleo/ HEAD > ${BUILD_DIR}/opnfv-puppet-tripleo.tar.gz +python3 -B $BUILD_UTILS clone-fork -r apex-puppet-tripleo +pushd apex-puppet-tripleo > /dev/null +git archive --format=tar.gz --prefix=tripleo/ HEAD > ${BUILD_DIR}/apex-puppet-tripleo.tar.gz popd > /dev/null # download customized os-net-config -rm -fr os-net-config -git clone https://github.com/trozet/os-net-config.git -b stable/danube -pushd os-net-config/os_net_config > /dev/null -git archive --format=tar.gz --prefix=os_net_config/ HEAD > ${BUILD_DIR}/os-net-config.tar.gz +python3 -B $BUILD_UTILS clone-fork -r apex-os-net-config +pushd apex-os-net-config/os_net_config > /dev/null +git archive --format=tar.gz --prefix=os_net_config/ HEAD > ${BUILD_DIR}/apex-os-net-config.tar.gz popd > /dev/null +# tar up vsperf +rm -rf vsperf vsperf.tar.gz +git clone https://gerrit.opnfv.org/gerrit/vswitchperf vsperf +tar czf vsperf.tar.gz vsperf + +# Increase disk size by 1500MB to accommodate more packages +qemu-img resize overcloud-full_build.qcow2 +1500M + +# expand file system to max disk size +# installing forked apex-puppet-tripleo +# upload neutron port data plane status +# REMOVE Tacker VNFFG patch when moving to Pike +LIBGUESTFS_BACKEND=direct virt-customize \ + --run-command "xfs_growfs /dev/sda" \ + --upload ${BUILD_DIR}/apex-puppet-tripleo.tar.gz:/etc/puppet/modules \ + --run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf apex-puppet-tripleo.tar.gz" \ + --upload ${BUILD_DIR}/apex-os-net-config.tar.gz:/usr/lib/python2.7/site-packages \ + --run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf apex-os-net-config.tar.gz" \ + --run-command "if ! rpm -qa | grep python-redis; then yum install -y python-redis; fi" \ + --install epel-release \ + --run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \ + --run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \ + --install unzip \ + --upload ${BUILD_DIR}/vsperf.tar.gz:/var/opt \ + --run-command "cd /var/opt && tar xzf vsperf.tar.gz" \ + --run-command "sed -i -E 's/timeout=[0-9]+/timeout=60/g' /usr/share/openstack-puppet/modules/rabbitmq/lib/puppet/provider/rabbitmqctl.rb" \ + --install patch \ + --upload ${BUILD_ROOT}/patches/neutron_lib_dps.patch:/usr/lib/python2.7/site-packages/ \ + --upload ${BUILD_ROOT}/patches/neutron_server_dps.patch:/usr/lib/python2.7/site-packages/ \ + --upload ${BUILD_ROOT}/patches/neutron_openstacksdk_dps.patch:/usr/lib/python2.7/site-packages/ \ + --upload ${BUILD_ROOT}/patches/neutron_openstackclient_dps.patch:/usr/lib/python2.7/site-packages/ \ + --upload ${BUILD_ROOT}/patches/puppet-neutron-add-sfc.patch:/usr/share/openstack-puppet/modules/neutron/ \ + --upload ${BUILD_ROOT}/patches/congress-parallel-execution.patch:/usr/lib/python2.7/site-packages/ \ + --upload ${BUILD_ROOT}/patches/puppet-neutron-ml2-ip-version-fix.patch:/usr/share/openstack-puppet/modules/neutron/ \ + --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-ml2-ip-version-fix.patch" \ + --upload ${BUILD_ROOT}/patches/puppet-neutron-vpp-ml2-type_drivers-setting.patch:/usr/share/openstack-puppet/modules/neutron/ \ + --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-vpp-ml2-type_drivers-setting.patch" \ + --upload ${BUILD_ROOT}/patches/tacker-vnffg-input-params.patch:/usr/lib/python2.7/site-packages/ \ + --run-command "cd usr/lib/python2.7/site-packages/ && patch -p1 < tacker-vnffg-input-params.patch" \ + -a overcloud-full_build.qcow2 + +# apply neutron port data plane status patches +# https://specs.openstack.org/openstack/neutron-specs/specs/backlog/ocata/port-data-plane-status.html +# apply congress parallel execution patch +# Requirements from Doctor project +# TODO(cgoncalves): code merged in Pike dev cycle. drop from >= OpenStack Pike / > OPNFV Euphrates +LIBGUESTFS_BACKEND=direct virt-customize \ + --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron_lib_dps.patch " \ + --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron_server_dps.patch" \ + --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron_openstacksdk_dps.patch" \ + --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < neutron_openstackclient_dps.patch" \ + --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-add-sfc.patch" \ + --run-command "cd /usr/lib/python2.7/site-packages/ && patch -p1 < congress-parallel-execution.patch" \ + -a overcloud-full_build.qcow2 + +# Arch dependent on x86 +if [ "$(uname -i)" == 'x86_64' ]; then dpdk_pkg_str='' for package in ${dpdk_rpms[@]}; do wget "$dpdk_uri_base/$package" dpdk_pkg_str+=" --upload ${BUILD_DIR}/${package}:/root/dpdk_rpms" done -# tar up the congress puppet module -rm -rf puppet-congress -git clone https://github.com/openstack/puppet-congress -pushd puppet-congress > /dev/null -git archive --format=tar.gz --prefix=congress/ HEAD > ${BUILD_DIR}/puppet-congress.tar.gz -popd > /dev/null - # tar up the fd.io module rm -rf puppet-fdio git clone https://git.fd.io/puppet-fdio @@ -57,18 +106,6 @@ pushd puppet-fdio > /dev/null git archive --format=tar.gz --prefix=fdio/ HEAD > ${BUILD_DIR}/puppet-fdio.tar.gz popd > /dev/null -# tar up vsperf -rm -rf vsperf vsperf.tar.gz -git clone https://gerrit.opnfv.org/gerrit/vswitchperf vsperf -tar czf vsperf.tar.gz vsperf - -# tar up the tacker puppet module -rm -rf puppet-tacker -git clone https://github.com/openstack/puppet-tacker -pushd puppet-tacker > /dev/null -git archive --format=tar.gz --prefix=tacker/ origin/stable/ocata > ${BUILD_DIR}/puppet-tacker.tar.gz -popd > /dev/null - # Master FD.IO Repo cat > ${BUILD_DIR}/fdio.repo << EOF [fdio-master] @@ -78,74 +115,53 @@ enabled=1 gpgcheck=0 EOF -# Increase disk size by 500MB to accommodate more packages -qemu-img resize overcloud-full_build.qcow2 +500MB +# Kubernetes Repo +cat > ${BUILD_DIR}/kubernetes.repo << EOF +[kubernetes] +name=Kubernetes +baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg + https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg +EOF + +# Get Real Time Kernel from kvm4nfv +populate_cache $kvmfornfv_uri_base/$kvmfornfv_kernel_rpm -# expand file system to max disk size -# installing forked opnfv-puppet-tripleo -# enable connection tracking for protocal sctp # upload dpdk rpms but do not install -# enable connection tracking for protocal sctp -# install the congress rpms -# upload and explode the congress puppet module # install fd.io yum repo and packages # upload puppet fdio # git clone vsperf into the overcloud image -# upload the tacker puppet module and untar it -# install tacker +# upload the rt_kvm kernel LIBGUESTFS_BACKEND=direct virt-customize \ - --run-command "xfs_growfs /dev/sda" \ - --upload ${BUILD_DIR}/opnfv-puppet-tripleo.tar.gz:/etc/puppet/modules \ - --run-command "yum update -y python-ipaddress rabbitmq-server erlang*" \ - --run-command "if ! rpm -qa | grep python-redis; then yum install -y python-redis; fi" \ - --run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \ - --run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \ - --run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf opnfv-puppet-tripleo.tar.gz" \ - --run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \ --run-command "mkdir /root/dpdk_rpms" \ - --upload ${BUILD_DIR}/fdio.repo:/etc/yum.repos.d/fdio.repo \ $dpdk_pkg_str \ - --run-command "yum install --downloadonly --downloaddir=/root/fdio vpp vpp-devel vpp-lib vpp-api-python vpp-plugins" \ - --upload ${BUILD_DIR}/noarch/$netvpp_pkg:/root/fdio \ - --run-command "yum install -y etcd" \ - --run-command "pip install python-etcd" \ - --run-command "puppet module install cristifalcas/etcd" \ - --run-command "yum update -y puppet" \ - --install "centos-release-qemu-ev" \ - --run-command "yum install -y qemu-kvm-ev-2.3.0-31.el7_2.21.1.x86_64" \ - --run-command "yum remove -y qemu-system-x86" \ - --upload ${BUILD_DIR}/os-net-config.tar.gz:/usr/lib/python2.7/site-packages \ - --run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf os-net-config.tar.gz" \ - --upload ${BUILD_DIR}/noarch/$congress_pkg:/root/ \ - --install /root/$congress_pkg \ - --install "python2-congressclient" \ - --upload ${BUILD_DIR}/puppet-congress.tar.gz:/etc/puppet/modules/ \ - --run-command "cd /etc/puppet/modules/ && tar xzf puppet-congress.tar.gz" \ - --run-command "yum install -y /root/fdio/*.rpm" \ - --run-command "rm -f /etc/sysctl.d/80-vpp.conf" \ - --install unzip \ --upload ${BUILD_DIR}/puppet-fdio.tar.gz:/etc/puppet/modules \ --run-command "cd /etc/puppet/modules && tar xzf puppet-fdio.tar.gz" \ - --upload ${BUILD_DIR}/vsperf.tar.gz:/var/opt \ - --run-command "cd /var/opt && tar xzf vsperf.tar.gz" \ - --upload ${BUILD_DIR}/puppet-tacker.tar.gz:/etc/puppet/modules/ \ - --run-command "cd /etc/puppet/modules/ && tar xzf puppet-tacker.tar.gz" \ - --upload ${BUILD_DIR}/noarch/$tacker_pkg:/root/ \ - --install /root/$tacker_pkg \ - --upload ${BUILD_DIR}/noarch/$tackerclient_pkg:/root/ \ - --install /root/$tackerclient_pkg \ - --run-command "pip install python-senlinclient" \ - --upload ${BUILD_ROOT}/neutron/agent/interface/interface.py:/usr/lib/python2.7/site-packages/neutron/agent/linux/ \ - --run-command "mkdir /root/fdio_neutron_l3" \ - --upload ${BUILD_ROOT}/neutron/agent/l3/namespaces.py:/root/fdio_neutron_l3/ \ - --upload ${BUILD_ROOT}/neutron/agent/l3/router_info.py:/root/fdio_neutron_l3/ \ - --upload ${BUILD_ROOT}/puppet-neutron/manifests/agents/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/agents/ml2/ \ - --upload ${BUILD_ROOT}/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/plugins/ml2/ \ - --upload ${BUILD_ROOT}/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb:/etc/puppet/modules/neutron/lib/puppet/type/ \ - --mkdir /etc/puppet/modules/neutron/lib/puppet/provider/neutron_agent_vpp \ - --upload ${BUILD_ROOT}/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb:/etc/puppet/modules/neutron/lib/puppet/provider/neutron_agent_vpp/ \ - --run-command "sed -i -E 's/timeout=[0-9]+/timeout=60/g' /usr/share/openstack-puppet/modules/rabbitmq/lib/puppet/provider/rabbitmqctl.rb" \ + --upload ${BUILD_DIR}/fdio.repo:/etc/yum.repos.d/ \ + --upload ${BUILD_DIR}/kubernetes.repo:/etc/yum.repos.d/ \ + --run-command "mkdir /root/fdio" \ + --upload ${BUILD_DIR}/noarch/$netvpp_pkg:/root/fdio \ + --install honeycomb \ + --install vpp-plugins,vpp,vpp-lib,vpp-api-python \ + --run-command "rm -f /etc/sysctl.d/80-vpp.conf" \ + --run-command "yum install -y /root/fdio/*.rpm" \ + --run-command "curl -f https://copr.fedorainfracloud.org/coprs/leifmadsen/ovs-master/repo/epel-7/leifmadsen-ovs-master-epel-7.repo > /etc/yum.repos.d/leifmadsen-ovs-master-epel-7.repo" \ + --run-command "mkdir /root/ovs28" \ + --run-command "yumdownloader --destdir=/root/ovs28 openvswitch*2.8* python-openvswitch-2.8*" \ + --upload ${CACHE_DIR}/$kvmfornfv_kernel_rpm:/root/ \ + --install python2-networking-sfc \ + --install python-etcd,puppet-etcd \ + --install patch \ + --install docker,kubelet,kubeadm,kubectl,kubernetes-cni \ -a overcloud-full_build.qcow2 + # upload and install barometer packages + barometer_pkgs overcloud-full_build.qcow2 + +fi # end x86_64 specific items + mv -f overcloud-full_build.qcow2 overcloud-full.qcow2 popd > /dev/null