X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Fovercloud-opendaylight.sh;h=12b47f1e83994f2b09a28c148e4ed36299cc8200;hb=0890153eb47fd29abf6ec419096546103aa22616;hp=af65910e04acedf53e0bd1a9797fab6cabb12e85;hpb=f52438b36ea567ae6d9564de72ee6b5054396ae1;p=apex.git diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh index af65910e..12b47f1e 100755 --- a/build/overcloud-opendaylight.sh +++ b/build/overcloud-opendaylight.sh @@ -8,9 +8,10 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## set -e +source ./cache.sh source ./variables.sh -pushd images > /dev/null +pushd ${BUILD_DIR} > /dev/null cp -f overcloud-full.qcow2 overcloud-full-opendaylight_build.qcow2 @@ -18,71 +19,77 @@ cp -f overcloud-full.qcow2 overcloud-full-opendaylight_build.qcow2 ##### Adding OpenDaylight to overcloud ##### ############################################### -# tar up fdio networking-odl -rm -rf fds -git clone https://gerrit.opnfv.org/gerrit/fds -pushd fds > /dev/null -tar -czvf ../networking-odl.tar.gz networking-odl -popd > /dev/null - -# Beryllium Repo -cat > /tmp/opendaylight.repo << EOF -[opendaylight-4-release] -name=CentOS CBS OpenDaylight Beryllium repository -baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-4-release/\$basearch/os/ +cat > ${BUILD_DIR}/opendaylight.repo << EOF +[opendaylight-6-release] +name=CentOS CBS OpenDaylight Carbon repository +baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-6-testing/\$basearch/os/ enabled=1 gpgcheck=0 EOF -# Boron Repo -cat > /tmp/opendaylight_boron.repo << EOF -[opendaylight-5-release] -name=CentOS CBS OpenDaylight Boron repository -baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-5-testing/\$basearch/os/ -enabled=1 -gpgcheck=0 -EOF +# OpenDaylight Puppet Module +rm -rf puppet-opendaylight +git clone -b stable/carbon https://git.opendaylight.org/gerrit/integration/packaging/puppet-opendaylight +pushd puppet-opendaylight > /dev/null +git archive --format=tar.gz --prefix=opendaylight/ HEAD > ${BUILD_DIR}/puppet-opendaylight-carbon.tar.gz +git checkout stable/boron +git archive --format=tar.gz --prefix=opendaylight/ HEAD > ${BUILD_DIR}/puppet-opendaylight-boron.tar.gz +popd > /dev/null -# SDNVPN - Copy tunnel setup script -wget https://raw.githubusercontent.com/openstack/fuel-plugin-opendaylight/brahmaputra-sr2/deployment_scripts/puppet/modules/opendaylight/templates/setup_TEPs.py +# cache gluon +populate_cache http://artifacts.opnfv.org/netready/$gluon_rpm -# Honeycomb RPM -wget $fdio_uri_base/$honeycomb_pkg +#Gluon puppet module +rm -rf netready +git clone -b master https://gerrit.opnfv.org/gerrit/netready +pushd netready/ > /dev/null +git archive --format=tar.gz HEAD:deploy/puppet/ > ${BUILD_DIR}/puppet-gluon.tar.gz +popd > /dev/null + +# Download ODL netvirt for VPP +populate_cache http://artifacts.opnfv.org/apex/danube/fdio_netvirt/opendaylight-7.0.0-0.1.20170531snap665.el7.noarch.rpm # install ODL packages -# install Jolokia for ODL HA # Patch in OPNFV custom puppet-tripleO # install Honeycomb +# install quagga/zrpc +# upload neutron patch for generic NS linux interface driver + OVS for external networks LIBGUESTFS_BACKEND=direct virt-customize \ - --upload networking-odl.tar.gz:/root/ \ - --upload /tmp/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \ - --run-command "yum install --downloadonly --downloaddir=/root/boron/ opendaylight" \ - --upload /tmp/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \ + --upload ${BUILD_DIR}/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \ --install opendaylight,python-networking-odl \ - --install https://github.com/michaeltchapman/networking_rpm/raw/master/openstack-neutron-bgpvpn-2015.2-1.el7.centos.noarch.rpm \ - --run-command "wget https://github.com/rhuss/jolokia/releases/download/v1.3.3/jolokia-1.3.3-bin.tar.gz -O /tmp/jolokia-1.3.3-bin.tar.gz" \ - --run-command "tar -xvf /tmp/jolokia-1.3.3-bin.tar.gz -C /opt/opendaylight/system/org" \ - --upload $honeycomb_pkg:/root/ \ - --run-command "yum -y install /root/$honeycomb_pkg" \ - --upload ./setup_TEPs.py:/tmp \ + --upload ${BUILD_DIR}/puppet-opendaylight-boron.tar.gz:/etc/puppet/modules/ \ + --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight-boron.tar.gz" \ + --upload ${BUILD_DIR}/puppet-opendaylight-carbon.tar.gz:/root/ \ + --upload ${BUILD_DIR}/puppet-gluon.tar.gz:/etc/puppet/modules/ \ + --run-command "cd /etc/puppet/modules/ && tar xzf puppet-gluon.tar.gz" \ + --install epel-release \ + --install python-click \ + --upload ${CACHE_DIR}/$gluon_rpm:/root/\ + --install /root/$gluon_rpm \ + --run-command "yum downgrade -y python-zmq-14.3.1" \ + --install capnproto-libs,capnproto \ + --upload ${BUILD_ROOT}/patches/neutron-patch-NSDriver.patch:/usr/lib/python2.7/site-packages/ \ + --upload ${CACHE_DIR}/opendaylight-7.0.0-0.1.20170531snap665.el7.noarch.rpm:/root/ \ -a overcloud-full-opendaylight_build.qcow2 - # Move these two lines above the -a overcloud-full-opendaylight_build.qcow2 when the patch has been rebased - #--upload ../opnfv-puppet-tripleo.patch:/tmp \ - #--run-command "cd /etc/puppet/modules/tripleo && patch -Np1 < /tmp/opnfv-puppet-tripleo.patch" \ +# Arch dependent on x86 +if [ "$(uname -i)" == 'x86_64' ]; then -## WORK AROUND -## when OpenDaylight lands in upstream RDO manager this can be removed +# Download quagga/zrpc rpms +populate_cache http://artifacts.opnfv.org/apex/danube/quagga/quagga-3.tar.gz +# Download Honeycomb +populate_cache https://nexus.fd.io/content/repositories/fd.io.stable.1704.centos7/io/fd/hc2vpp/honeycomb/1.17.04-2048.noarch/honeycomb-1.17.04-2048.noarch.rpm -# upload the opendaylight puppet module -rm -rf puppet-opendaylight -git clone -b opnfv_integration https://github.com/dfarrell07/puppet-opendaylight -pushd puppet-opendaylight > /dev/null -git archive --format=tar.gz --prefix=opendaylight/ HEAD > ../puppet-opendaylight.tar.gz -popd > /dev/null -LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-opendaylight.tar.gz:/etc/puppet/modules/ \ - --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" \ - -a overcloud-full-opendaylight_build.qcow2 +LIBGUESTFS_BACKEND=direct virt-customize \ + --upload ${CACHE_DIR}/honeycomb-1.17.04-2048.noarch.rpm:/root/fdio/ \ + --run-command "yum install -y /root/fdio/honeycomb-1.17.04-2048.noarch.rpm" \ + --install zeromq-4.1.4 \ + --upload ${CACHE_DIR}/quagga-3.tar.gz:/root/ \ + --run-command "cd /root/ && tar xzf quagga-3.tar.gz" \ + --run-command "cd /root/quagga; packages=\$(ls |grep -vE 'debuginfo|devel|contrib'); yum -y install \$packages" \ + --run-command "sudo usermod -a -G quaggavt quagga" \ + -a overcloud-full-opendaylight_build.qcow2 +fi -mv overcloud-full-opendaylight_build.qcow2 overcloud-full-opendaylight.qcow2 +LIBGUESTFS_BACKEND=direct virt-sparsify --compress overcloud-full-opendaylight_build.qcow2 overcloud-full-opendaylight.qcow2 popd > /dev/null