diff options
author | Dan Timoney <dtimoney@att.com> | 2019-03-31 12:48:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-31 12:48:24 +0000 |
commit | 941767a53a207835e4aab9b891ec690f0ecd042a (patch) | |
tree | 1e9bec83c19a3a549ee817f0acd8d826d4673a1a /installation | |
parent | 1f9a53dee8c026b6fe4b0baf8b39167a5cf5f7fe (diff) | |
parent | a3754c2a86ec83bf7c1f0df7e99bb139153621c7 (diff) |
Merge "Provide SDNR for SDNC"
Former-commit-id: b89a391dd2741b77f8afa2fcc32865600de7923d
Diffstat (limited to 'installation')
-rwxr-xr-x | installation/sdnc/src/main/scripts/startODL.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/installation/sdnc/src/main/scripts/startODL.sh b/installation/sdnc/src/main/scripts/startODL.sh index 73e3eaa7..09876252 100755 --- a/installation/sdnc/src/main/scripts/startODL.sh +++ b/installation/sdnc/src/main/scripts/startODL.sh @@ -21,6 +21,26 @@ # ============LICENSE_END========================================================= ### +# Append features to karaf boot feature configuration +# $1 additional feature to be added +# $2 repositories to be added (optional) +function addToFeatureBoot() { + CFG=$ODL_HOME/etc/org.apache.karaf.features.cfg + ORIG=$CFG.orig + if [ -n "$2" ] ; then + echo "Add repository: $2" + mv $CFG $ORIG + cat $ORIG | sed -e "\|featuresRepositories|s|$|,$2|" > $CFG + fi + echo "Add boot feature: $1" + mv $CFG $ORIG + cat $ORIG | sed -e "\|featuresBoot *=|s|$|,$1|" > $CFG +} + +function install_sdnrwt_features() { + addToFeatureBoot "$SDNRWT_BOOTFEATURES" $SDNRWT_REPOSITORY +} + function enable_odl_cluster(){ if [ -z $SDNC_REPLICAS ]; then echo "SDNC_REPLICAS is not configured in Env field" @@ -81,6 +101,14 @@ ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} IS_PRIMARY_CLUSTER=${IS_PRIMARY_CLUSTER:-false} MY_ODL_CLUSTER=${MY_ODL_CLUSTER:-127.0.0.1} INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim} +SDNRWT=${SDNRWT:-false} +SDNRWT_BOOTFEATURES=${SDNRWT_BOOTFEATURES:-sdnr-wt-feature-aggregator} + + +echo "Settings:" +echo " ENABLE_ODL_CLUSTER=$ENABLE_ODL_CLUSTER" +echo " SDNC_REPLICAS=$SDNC_REPLICAS" +echo " SDNRWT=$SDNRWT" # # Wait for database @@ -115,6 +143,8 @@ then if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi + if $SDNRWT ; then install_sdnrwt_features ; fi + echo "Installed at `date`" > ${INSTALLED_DIR}/.installed fi |