aboutsummaryrefslogtreecommitdiffstats
path: root/utils/installer/src/main/resources
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-21 16:07:02 -0400
committerDan Timoney <dtimoney@att.com>2017-09-21 16:23:44 -0400
commit37d6468cc670045ab4ff1ee23315739a429aa5e3 (patch)
tree5bfc27601f810a69d2c9442c02b2e6c5f7b392a0 /utils/installer/src/main/resources
parentb98b8dd82639f1a9c0494896f8fc689a5196c523 (diff)
Install sdnc-core utils as karaf package
New utils jar was added in another change, but wasn't bundled as a karaf feature and was not being installed in container. This broke odlsli docker container. This change wraps that util package as a new feature (sdnc-core-utils). Change-Id: Ie8c1d608e2c67aa1635837bc400cec942761c81c Issue-ID: CCSDK-54 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'utils/installer/src/main/resources')
-rw-r--r--utils/installer/src/main/resources/scripts/install-feature.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/installer/src/main/resources/scripts/install-feature.sh b/utils/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 00000000..16b5be8c
--- /dev/null
+++ b/utils/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+ unzip -d ${ODL_HOME} ${REPOZIP}
+else
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}