Fix feature config for clustering
[oom.git] / kubernetes / sdnc / resources / config / bin / startODL.sh
index 86f45d3..9d1ab76 100755 (executable)
@@ -27,8 +27,10 @@ function enable_odl_cluster(){
   fi
 
   echo "Installing Opendaylight cluster features"
-  ${ODL_HOME}/bin/client feature:install odl-mdsal-clustering
-  ${ODL_HOME}/bin/client feature:install odl-jolokia
+  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
+  #${ODL_HOME}/bin/client feature:install odl-mdsal-clustering
+  #${ODL_HOME}/bin/client feature:install odl-jolokia
 
   echo "Update cluster information statically"
   hm=$(hostname)
@@ -102,13 +104,10 @@ then
         ${SDNC_HOME}/bin/installSdncDb.sh
         echo "Installing SDN-C keyStore"
         ${SDNC_HOME}/bin/addSdncKeyStore.sh
-        echo "Starting OpenDaylight"
-        ${CCSDK_HOME}/bin/installOdlHostKey.sh
-        ${ODL_HOME}/bin/start
-        echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
-        sleep ${SLEEP_TIME}
-        echo "Installing SDN-C platform features"
-        ${SDNC_HOME}/bin/installFeatures.sh
+
+       # No longer needed (this was a workaround for bug in Nitrogen)
+        #${CCSDK_HOME}/bin/installOdlHostKey.sh
+
         if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
         then
                 echo "Installing directed graphs"
@@ -117,14 +116,8 @@ then
 
         if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
 
-        echo "Restarting OpenDaylight"
-        ${ODL_HOME}/bin/stop
-
-        echo "Waiting 60 seconds for OpenDaylight stop to complete"
-        sleep 60
-
         echo "Installed at `date`" > ${SDNC_HOME}/.installed
 fi
 
-exec ${ODL_HOME}/bin/karaf
+exec ${ODL_HOME}/bin/karaf server