summaryrefslogtreecommitdiffstats
path: root/build/overcloud-onos.sh
diff options
context:
space:
mode:
authorMichael Chapman <michapma@redhat.com>2016-03-24 01:09:02 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-03-24 01:09:03 +0000
commit81e8d7b55fbc27d8f25031817baf92d9b100f322 (patch)
tree819a8a94a6ef9db8d7cc2d8480d768d9daca274f /build/overcloud-onos.sh
parenta896444c04552b866a9460bbe70ae3488e4877d9 (diff)
parent4b5e79294eecf7e10bfb1459c55f9186312c32bf (diff)
Merge topics 'compute_count_fix', 'build_rewrite'
* changes: Allow 2+ compute node for none HA installs APEX-117 updating vm creation for virt deployment
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