summaryrefslogtreecommitdiffstats
path: root/build/overcloud-opendaylight.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-12-06 12:58:55 -0500
committerTim Rozet <trozet@redhat.com>2016-12-08 21:52:32 -0500
commit58a098e08ec131338b0c29b902472c54b2a26168 (patch)
tree8fb5727e1511d1114cd5b60f0659d624105b4542 /build/overcloud-opendaylight.sh
parent9131b0a81c22e713b4d4798d7ff32254be3b99e3 (diff)
Fixes and cleans up build/cache directory usage
Changes include: - Building is isolated to a .build directory that is git ignored - Caching is isolated to a .cache directory that is git ignored - Build scripts have been variablized, and relative paths have been removed - Unused files removed - build.sh, make file cleaned up - Fixed broken building of markupsafe and jinja2 packages - make clean-cache will remove the cache now - per item cleans are removed in place of simple clean .build now - includes fix for OSC issue with LP# 1642301 Change-Id: I42b8e4eb694bf0a2c398858814f8b73785931896 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'build/overcloud-opendaylight.sh')
-rwxr-xr-xbuild/overcloud-opendaylight.sh50
1 files changed, 21 insertions, 29 deletions
diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh
index 4f81a300..5a05ea40 100755
--- a/build/overcloud-opendaylight.sh
+++ b/build/overcloud-opendaylight.sh
@@ -10,7 +10,7 @@
set -e
source ./variables.sh
-pushd images > /dev/null
+pushd ${BUILD_DIR} > /dev/null
cp -f overcloud-full.qcow2 overcloud-full-opendaylight_build.qcow2
@@ -22,11 +22,11 @@ cp -f overcloud-full.qcow2 overcloud-full-opendaylight_build.qcow2
rm -rf fds
git clone https://gerrit.opnfv.org/gerrit/fds
pushd fds > /dev/null
-tar -czvf ../networking-odl.tar.gz networking-odl
+tar -czvf ${BUILD_DIR}/networking-odl.tar.gz networking-odl
popd > /dev/null
# Beryllium Repo
-cat > /tmp/opendaylight.repo << EOF
+cat > ${BUILD_DIR}/opendaylight.repo << EOF
[opendaylight-4-release]
name=CentOS CBS OpenDaylight Beryllium repository
baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-4-release/\$basearch/os/
@@ -35,7 +35,7 @@ gpgcheck=0
EOF
# Boron Repo
-cat > /tmp/opendaylight_boron.repo << EOF
+cat > ${BUILD_DIR}/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/
@@ -44,7 +44,7 @@ gpgcheck=0
EOF
# Master Repo
-cat > /tmp/opendaylight_master.repo << EOF
+cat > ${BUILD_DIR}/opendaylight_master.repo << EOF
[opendaylight-6-release]
name=CentOS CBS OpenDaylight Carbon repository
baseurl=http://cbs.centos.org/repos/nfv7-opendaylight-6-testing/\$basearch/os/
@@ -53,7 +53,7 @@ gpgcheck=0
EOF
#BGPVPN Repo
-cat > /tmp/bgpvpn.repo << EOF
+cat > ${BUILD_DIR}/bgpvpn.repo << EOF
[bgpvpn]
name=bgpvpn
baseurl=https://trunk.rdoproject.org/centos7/consistent/
@@ -66,42 +66,34 @@ EOF
# SDNVPN - Copy tunnel setup script
curl -fO https://raw.githubusercontent.com/openstack/fuel-plugin-opendaylight/brahmaputra-sr2/deployment_scripts/puppet/modules/opendaylight/templates/setup_TEPs.py
+# OpenDaylight Puppet Module
+rm -rf puppet-opendaylight
+git clone -b master https://github.com/dfarrell07/puppet-opendaylight
+pushd puppet-opendaylight > /dev/null
+git archive --format=tar.gz --prefix=opendaylight/ HEAD > ${BUILD_DIR}/puppet-opendaylight.tar.gz
+popd > /dev/null
+
# install ODL packages
# install Jolokia for ODL HA
# Patch in OPNFV custom puppet-tripleO
# install Honeycomb
LIBGUESTFS_BACKEND=direct virt-customize \
- --upload networking-odl.tar.gz:/root/ \
- --upload /tmp/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \
+ --upload ${BUILD_DIR}/networking-odl.tar.gz:/root/ \
+ --upload ${BUILD_DIR}/opendaylight_boron.repo:/etc/yum.repos.d/opendaylight.repo \
--run-command "yum install --downloadonly --downloaddir=/root/boron/ opendaylight" \
- --upload /tmp/opendaylight_master.repo:/etc/yum.repos.d/opendaylight.repo \
+ --upload ${BUILD_DIR}/opendaylight_master.repo:/etc/yum.repos.d/opendaylight.repo \
--run-command "yum install --downloadonly --downloaddir=/root/master/ 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 \
- --upload /tmp/bgpvpn.repo:/etc/yum.repos.d/bgpvpn.repo \
+ --upload ${BUILD_DIR}/bgpvpn.repo:/etc/yum.repos.d/bgpvpn.repo \
--install python-networking-bgpvpn \
--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" \
--install honeycomb \
- --upload ./setup_TEPs.py:/tmp \
+ --upload ${BUILD_DIR}/setup_TEPs.py:/tmp \
+ --upload ${BUILD_DIR}/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
- # 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" \
-
-## WORK AROUND
-## when OpenDaylight lands in upstream RDO manager this can be removed
-
-# upload the opendaylight puppet module
-rm -rf puppet-opendaylight
-git clone -b master 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
-
mv overcloud-full-opendaylight_build.qcow2 overcloud-full-opendaylight.qcow2
popd > /dev/null