2 ##############################################################################
3 # Copyright (c) 2015 Tim Rozet (Red Hat), Dan Radez (Red Hat) and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
13 pushd ${BUILD_DIR} > /dev/null
15 cp -f overcloud-full.qcow2 overcloud-full-opendaylight_build.qcow2
17 ###############################################
18 ##### Adding OpenDaylight to overcloud #####
19 ###############################################
21 # tar up fdio networking-odl
23 git clone https://gerrit.opnfv.org/gerrit/fds
25 tar -czvf ${BUILD_DIR}/networking-odl.tar.gz networking-odl
29 cat > ${BUILD_DIR}/opendaylight.repo << EOF
30 [opendaylight-4-release]
31 name=CentOS CBS OpenDaylight Beryllium repository
32 baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-4-release/\$basearch/os/
38 cat > ${BUILD_DIR}/opendaylight_boron.repo << EOF
39 [opendaylight-5-release]
40 name=CentOS CBS OpenDaylight Boron repository
41 baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-5-testing/\$basearch/os/
47 cat > ${BUILD_DIR}/opendaylight_master.repo << EOF
48 [opendaylight-6-release]
49 name=CentOS CBS OpenDaylight Carbon repository
50 baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-6-testing/\$basearch/os/
56 cat > ${BUILD_DIR}/bgpvpn.repo << EOF
59 baseurl=https://trunk.rdoproject.org/centos7/consistent/
60 includepkgs=python2-networking-bgpvpn
66 # SDNVPN - Copy tunnel setup script
67 curl -fO https://raw.githubusercontent.com/openstack/fuel-plugin-opendaylight/brahmaputra-sr2/deployment_scripts/puppet/modules/opendaylight/templates/setup_TEPs.py
69 # OpenDaylight Puppet Module
70 rm -rf puppet-opendaylight
71 git clone -b master https://github.com/dfarrell07/puppet-opendaylight
72 pushd puppet-opendaylight > /dev/null
73 git archive --format=tar.gz --prefix=opendaylight/ HEAD > ${BUILD_DIR}/puppet-opendaylight.tar.gz
76 # install ODL packages
77 # install Jolokia for ODL HA
78 # Patch in OPNFV custom puppet-tripleO
80 LIBGUESTFS_BACKEND=direct virt-customize \
81 --upload ${BUILD_DIR}/networking-odl.tar.gz:/root/ \
82 --upload ${BUILD_DIR}/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \
83 --run-command "yum install --downloadonly --downloaddir=/root/boron/ opendaylight" \
84 --upload ${BUILD_DIR}/opendaylight_master.repo:/etc/yum.repos.d/opendaylight.repo \
85 --run-command "yum install --downloadonly --downloaddir=/root/master/ opendaylight" \
86 --upload ${BUILD_DIR}/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
87 --install opendaylight,python-networking-odl \
88 --upload ${BUILD_DIR}/bgpvpn.repo:/etc/yum.repos.d/bgpvpn.repo \
89 --install python-networking-bgpvpn \
90 --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" \
91 --run-command "tar -xvf /tmp/jolokia-1.3.3-bin.tar.gz -C /opt/opendaylight/system/org" \
93 --upload ${BUILD_DIR}/setup_TEPs.py:/tmp \
94 --upload ${BUILD_DIR}/puppet-opendaylight.tar.gz:/etc/puppet/modules/ \
95 --run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" \
96 -a overcloud-full-opendaylight_build.qcow2
98 mv overcloud-full-opendaylight_build.qcow2 overcloud-full-opendaylight.qcow2