summaryrefslogtreecommitdiffstats
path: root/build/overcloud-onos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/overcloud-onos.sh')
-rwxr-xr-xbuild/overcloud-onos.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/build/overcloud-onos.sh b/build/overcloud-onos.sh
new file mode 100755
index 00000000..88f0b166
--- /dev/null
+++ b/build/overcloud-onos.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+##############################################################################
+# Copyright (c) 2015 Tim Rozet (Red Hat), Dan Radez (Red Hat) and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+set -e
+source ./cache.sh
+source ./variables.sh
+
+pushd images > /dev/null
+cp -f overcloud-full.qcow2 overcloud-full-onos_build.qcow2
+
+#######################################
+##### Adding ONOS to overcloud #####
+#######################################
+
+# upload the onos puppet module
+rm -rf puppet-onos
+git clone https://github.com/bobzhouHW/puppet-onos.git
+pushd puppet-onos > /dev/null
+
+# download jdk, onos and maven dependancy packages.
+pushd files
+for i in jdk-8u51-linux-x64.tar.gz onos-1.3.0.tar.gz repository.tar; do
+ populate_cache ${onos_artifacts_uri}/$i
+ get_cached_file $i
+done
+popd > /dev/null
+
+popd > /dev/null
+tar --xform="s:puppet-onos/:onos/:" -czf puppet-onos.tar.gz puppet-onos
+
+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-onos_build.qcow2
+mv overcloud-full-onos_build.qcow2 overcloud-full-onos.qcow2
+popd > /dev/null