X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=installation%2Fsdnc%2Fsrc%2Fmain%2Fscripts%2FstartODL.sh;h=e043bc04785256787388922a1405b0505851f7ca;hb=7ccd7f9a9e1d026d0f989233260d8159d537f832;hp=09876252a0bfdec438f2b6f9af3567e6b9135a48;hpb=1b34b6dd37c6fc1963fe66b00a1ee91344f65ef6;p=sdnc%2Foam.git diff --git a/installation/sdnc/src/main/scripts/startODL.sh b/installation/sdnc/src/main/scripts/startODL.sh index 09876252..e043bc04 100755 --- a/installation/sdnc/src/main/scripts/startODL.sh +++ b/installation/sdnc/src/main/scripts/startODL.sh @@ -37,10 +37,24 @@ function addToFeatureBoot() { cat $ORIG | sed -e "\|featuresBoot *=|s|$|,$1|" > $CFG } +# Append features to karaf boot feature configuration +# $1 search pattern +# $2 replacement +function replaceFeatureBoot() { + CFG=$ODL_HOME/etc/org.apache.karaf.features.cfg + ORIG=$CFG.orig + echo "Replace boot feature $1 with: $2" + sed -i "/featuresBoot/ s/$1/$2/g" $CFG +} + function install_sdnrwt_features() { addToFeatureBoot "$SDNRWT_BOOTFEATURES" $SDNRWT_REPOSITORY } +function install_sdnr_northbound_features() { + addToFeatureBoot "$SDNR_NORTHBOUND_BOOTFEATURES" $SDNR_NORTHBOUND_REPOSITORY +} + function enable_odl_cluster(){ if [ -z $SDNC_REPLICAS ]; then echo "SDNC_REPLICAS is not configured in Env field" @@ -48,8 +62,9 @@ function enable_odl_cluster(){ fi echo "Installing Opendaylight cluster features" - mv $ODL_HOME/etc/org.apache.karaf.features.cfg $ODL_HOME/etc/org.apache.karaf.features.cfg.orig - cat $ODL_HOME/etc/org.apache.karaf.features.cfg.orig | sed -e "\|featuresBoot=config|s|$|,odl-mdsal-clustering,odl-jolokia|" > $ODL_HOME/etc/org.apache.karaf.features.cfg + replaceFeatureBoot odl-netconf-topology odl-netconf-clustered-topology + replaceFeatureBoot odl-mdsal-all odl-mdsal-all,odl-mdsal-clustering + addToFeatureBoot odl-jolokia #${ODL_HOME}/bin/client feature:install odl-mdsal-clustering #${ODL_HOME}/bin/client feature:install odl-jolokia @@ -91,6 +106,7 @@ function enable_odl_cluster(){ # Install SDN-C platform components if not already installed and start container ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} +ODL_ADMIN_USERNAME=${ODL_ADMIN_USERNAME:-admin} ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin} @@ -103,12 +119,16 @@ 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} - +SDNR_NORTHBOUND=${SDNR_NORTHBOUND:-false} +SDNR_NORTHBOUND_BOOTFEATURES=${SDNR_NORTHBOUND_BOOTFEATURES:-sdnr-northbound-all} +export ODL_ADMIN_PASSWORD ODL_ADMIN_USERNAME echo "Settings:" echo " ENABLE_ODL_CLUSTER=$ENABLE_ODL_CLUSTER" echo " SDNC_REPLICAS=$SDNC_REPLICAS" echo " SDNRWT=$SDNRWT" +echo " SDNR_NORTHBOUND=$SDNR_NORTHBOUND" + # # Wait for database @@ -145,10 +165,13 @@ then if $SDNRWT ; then install_sdnrwt_features ; fi + if $SDNR_NORTHBOUND ; then install_sdnr_northbound_features ; fi + echo "Installed at `date`" > ${INSTALLED_DIR}/.installed fi cp /opt/opendaylight/current/certs/* /tmp +cp -r /opt/app/osaaf/local/. /tmp nohup python ${SDNC_BIN}/installCerts.py &