summaryrefslogtreecommitdiffstats
path: root/build/overcloud-onos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/overcloud-onos.sh')
-rwxr-xr-xbuild/overcloud-onos.sh25
1 files changed, 21 insertions, 4 deletions
diff --git a/build/overcloud-onos.sh b/build/overcloud-onos.sh
index 7922a54a..72f3a681 100755
--- a/build/overcloud-onos.sh
+++ b/build/overcloud-onos.sh
@@ -18,17 +18,34 @@ cp -f overcloud-full.qcow2 overcloud-full-onos_build.qcow2
##### Adding ONOS to overcloud #####
#######################################
+# upgrade ovs into ovs 2.5.90 with NSH function
+curl -O "$onos_artifacts_uri"package_ovs_rpm.tar.gz
+tar -xzf package_ovs_rpm.tar.gz
+LIBGUESTFS_BACKEND=direct virt-customize --upload openvswitch-kmod-2.5.90-1.el7.centos.x86_64.rpm:/root/ \
+ --run-command "yum install -y /root/openvswitch-kmod-2.5.90-1.el7.centos.x86_64.rpm" \
+ --upload openvswitch-2.5.90-1.el7.centos.x86_64.rpm:/root/ \
+ --run-command "yum upgrade -y /root/openvswitch-2.5.90-1.el7.centos.x86_64.rpm" \
+ -a overcloud-full-onos_build.qcow2
+
+
# get the onos files
rm -rf puppet-onos
-git clone https://github.com/bobzhouHW/puppet-onos.git
populate_cache "$onos_release_uri/$onos_release_file"
+populate_cache "$onos_artifacts_uri/jdk-8u51-linux-x64.tar.gz"
+
+LIBGUESTFS_BACKEND=direct virt-customize --upload $CACHE_DIR/$onos_release_file:/opt/ \
+ --run-command "mkdir /opt/onos && cd /opt/ && tar -xzf $onos_release_file -C /opt/onos --strip-components=1" \
+ -a overcloud-full-onos_build.qcow2
+
+#Those files can be store in local cache for saving download time
+git clone https://github.com/bobzhouHW/puppet-onos.git
tar --xform="s:puppet-onos/:onos/:" -czf puppet-onos.tar.gz puppet-onos
-LIBGUESTFS_BACKEND=direct virt-customize --install "java-1.8.0-openjdk" \
+LIBGUESTFS_BACKEND=direct virt-customize --upload $CACHE_DIR/jdk-8u51-linux-x64.tar.gz:/opt/ \
+ --upload puppet-onos/files/install_jdk8.tar:/opt/ \
+ --run-command "cd /opt/ && tar -xf install_jdk8.tar && sh /opt/install_jdk8/install_jdk8.sh" \
--upload puppet-onos.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-onos.tar.gz" \
- --upload $CACHE_DIR/$onos_release_file:/opt \
- --run-command "cd /opt && tar xzf $onos_release_file" \
-a overcloud-full-onos_build.qcow2
mv overcloud-full-onos_build.qcow2 overcloud-full-onos.qcow2