summaryrefslogtreecommitdiffstats
path: root/build/instack.sh
diff options
context:
space:
mode:
authorbobzh <bob.zh@huawei.com>2015-12-28 20:17:55 +0800
committerTim Rozet <trozet@redhat.com>2016-01-08 14:48:01 -0500
commitc43b4a2afad26f7b8f58ecfa3cb17304fa94dd8b (patch)
tree0730078cda1f017ca13a48f063ebcb087b49d895 /build/instack.sh
parent194784ad1c2878a343377c7ea514ab2d8a95e06c (diff)
Adds onos support
Changes include: - ONOS artifacts are cached on build server until moved to OPNFV artifacts - tht patch is now unified to single opnfv patch, based on upstream commit 0f41e0d0309c7bc061dbaed6a8c1e38cb4bdfe19 Change-Id: Iea3d14773dded6c9709c08ef1beb47b254582860 Signed-off-by: bob zhou <bob.zh@huawei.com> Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'build/instack.sh')
-rwxr-xr-xbuild/instack.sh30
1 files changed, 27 insertions, 3 deletions
diff --git a/build/instack.sh b/build/instack.sh
index 958681b..f3a366a 100755
--- a/build/instack.sh
+++ b/build/instack.sh
@@ -4,6 +4,7 @@ declare -i CNT
#rdo_images_uri=https://repos.fedorapeople.org/repos/openstack-m/rdo-images-centos-liberty-opnfv
rdo_images_uri=file:///stable-images
+onos_artifacts_uri=file:///stable-images/onos
vm_index=4
RDO_RELEASE=liberty
@@ -235,7 +236,7 @@ pushd stack
# make a copy of the cached overcloud-full image
cp overcloud-full.qcow2 overcloud-full-odl.qcow2
-# remove unnessesary packages and install nessesary packages
+# remove unnecessary packages and install necessary packages
LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum remove -y openstack-neutron-openvswitch" \
--upload /etc/yum.repos.d/opendaylight.repo:/etc/yum.repos.d/opendaylight.repo \
--install opendaylight,python-networking-odl -a overcloud-full-odl.qcow2
@@ -253,8 +254,8 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-opendaylight.tar.gz:/et
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-opendaylight.tar.gz" -a overcloud-full-odl.qcow2
# Patch in OpenDaylight installation and configuration
-LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-tripleo-heat-templates.patch:/tmp \
- --run-command "cd /usr/share/openstack-tripleo-heat-templates/ && patch -Np1 < /tmp/opendaylight-tripleo-heat-templates.patch" \
+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 instack.qcow2
LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron.patch:/tmp \
--run-command "cd /etc/puppet/modules/neutron && patch -Np1 < /tmp/opendaylight-puppet-neutron.patch" \
@@ -262,6 +263,29 @@ LIBGUESTFS_BACKEND=direct virt-customize --upload ../opendaylight-puppet-neutron
## END WORK AROUND
popd
+## WORK AROUND
+## when ONOS lands in upstream OPNFV artifacts this can be removed
+
+# upload the onos puppet module
+pushd stack
+
+rm -rf puppet-onos
+git clone https://github.com/bobzhouHW/puppet-onos.git
+pushd puppet-onos
+# download jdk, onos and maven dependancy packages.
+pushd files
+curl ${onos_artifacts_uri}/jdk-8u51-linux-x64.tar.gz -o ./jdk-8u51-linux-x64.tar.gz
+curl ${onos_artifacts_uri}/onos-1.3.0.tar.gz -o ./onos-1.3.0.tar.gz
+curl ${onos_artifacts_uri}/repository.tar -o ./repository.tar
+popd
+git archive --format=tar.gz --prefix=onos/ HEAD > ../puppet-onos.tar.gz
+popd
+LIBGUESTFS_BACKEND=direct virt-customize --upload puppet-onos.tar.gz:/etc/puppet/modules/ \
+ --run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" -a overcloud-full-odl.qcow2
+
+## END WORK AROUND
+popd
+
# move and Sanitize private keys from instack.json file
mv stack/instackenv.json instackenv-virt.json
sed -i '/pm_password/c\ "pm_password": "INSERT_STACK_USER_PRIV_KEY",' instackenv-virt.json