Changes to support new ODL 07/38307/9
authorPatrick Brady <pb071s@att.com>
Sun, 25 Mar 2018 21:12:38 +0000 (14:12 -0700)
committerPatrick Brady <pb071s@att.com>
Wed, 11 Apr 2018 22:37:21 +0000 (22:37 +0000)
Change-Id: If27cce33747b3927e83a6ba77f6197360b894f6f
Signed-off-by: Patrick Brady <pb071s@att.com>
Issue-ID: APPC-403

installation/appc/src/main/docker/Dockerfile
installation/appc/src/main/scripts/installFeatures.sh
installation/appc/src/main/scripts/startODL.sh

index 9a06b29..6b5dbc8 100644 (file)
@@ -21,7 +21,7 @@
 # ============LICENSE_END============================================
 
 # Base ubuntu with added packages needed for ONAP
-FROM onap/ccsdk-odlsli-image:v0.1.0
+FROM onap/ccsdk-odlsli-image:0.2.1-SNAPSHOT
 MAINTAINER APP-C Team (appc@lists.openecomp.org)
 
 # Set the Env. Variable in the container to add the APPC CONFIG DIR (the SDNC_CONFIG_DIR is inherited from SDNC Image)
index cd45824..152b751 100644 (file)
@@ -28,7 +28,7 @@ APPC_FEATURE_DIR=${APPC_FEATURE_DIR:-${APPC_HOME}/features}
 function featureInstall {
 COUNT=0
 while [ $COUNT -lt 10 ]; do
-  ${ODL_HOME}/bin/client -u karaf feature:install $1 2> /tmp/installErr
+  ${ODL_HOME}/bin/client feature:install $1 2> /tmp/installErr
   cat /tmp/installErr
   if grep -q 'Failed to get the session' /tmp/installErr; then
     sleep 10
@@ -39,7 +39,55 @@ while [ $COUNT -lt 10 ]; do
 done
 }
 
-APPC_FEATURES=" \
+ APPC_FEATURES=" \
+ appc-metric \
+ appc-dmaap-adapter \
+ appc-chef-adapter \
+ appc-netconf-adapter \
+ appc-rest-adapter \
+ appc-lifecycle-management \
+ appc-dispatcher \
+ appc-provider \
+ appc-dg-util \
+ appc-dg-shared \
+ appc-sdc-listener \
+ appc-oam \
+ appc-iaas-adapter \
+ appc-ansible-adapter \
+ appc-sequence-generator \
+ appc-artifact-handler \
+ appc-aai-client"
+
+APPC_FEATURES_1=" \
+ appc-metric \
+ appc-dmaap-adapter \
+ appc-chef-adapter \
+ appc-netconf-adapter \
+ appc-rest-adapter \
+ appc-lifecycle-management \
+ appc-license-manager"
+ APPC_FEATURES_2=" \
+ appc-provider \
+ appc-dg-util \
+ appc-dg-shared \
+ appc-sdc-listener \
+ appc-oam \
+ appc-iaas-adapter \
+ appc-ansible-adapter \
+ appc-sequence-generator \
+ appc-config-generator \
+ appc-config-data-services \
+ appc-config-adaptor \
+ appc-config-audit \
+ appc-config-encryption-tool \
+ appc-config-flow-controller \
+ appc-config-params \
+ appc-artifact-handler \
+ appc-aai-client \
+ appc-event-listener"
+ APPC_FEATURES_UNZIP=" \
  appc-metric \
  appc-dmaap-adapter \
  appc-event-listener \
@@ -65,21 +113,21 @@ APPC_FEATURES=" \
  appc-config-params \
  appc-artifact-handler \
  appc-aai-client"
+
 
-# Temp fix to fix bouncycastle issue that is preventing netconf to work correctly
-apt-get -y install wget
-wget -P /opt/opendaylight/current/deploy https://www.bouncycastle.org/download/bcprov-jdk15on-158.jar
-wget -P /opt/opendaylight/current/deploy https://www.bouncycastle.org/download/bcprov-ext-jdk15on-158.jar
 
 echo "Enabling core APP-C features"
 featureInstall odl-netconf-connector-all
 featureInstall odl-restconf-noauth
 featureInstall odl-netconf-topology
 
+sleep 7s
 echo "Installing APP-C Features"
 echo ""
 
-for feature in ${APPC_FEATURES}
+for feature in ${APPC_FEATURES_UNZIP}
 do
   if [ -f ${APPC_FEATURE_DIR}/${feature}/install-feature.sh ]
   then
@@ -88,3 +136,35 @@ do
     echo "No installer found for feature ${feature}"
   fi
 done
+
+#${ODL_HOME}/bin/client feature:install appc-metric appc-dmaap-adapter appc-event-listener appc-chef-adapter appc-netconf-adapter appc-rest-adapter appc-lifecycle-management appc-dispatcher appc-provider appc-dg-util appc-dg-shared appc-sdc-listener appc-oam appc-iaas-adapter appc-ansible-adapter appc-sequence-generator appc-config-generator appc-config-data-services appc-config-adaptor appc-config-audit appc-config-encryption-tool appc-config-flow-controller appc-config-params appc-artifact-handler appc-aai-client
+
+for feature in ${APPC_FEATURES_1}
+do
+  echo "Installing ${feature}"
+  start=$(date +%s)
+  ${ODL_HOME}/bin/client "feature:install -r ${feature}"
+  end=$(date +%s)
+  echo "Install of ${feature} took $(expr $end - $start) seconds"
+  sleep 7s
+  echo "Sleep Finished"
+done
+
+  echo "Installing dispatcher features"
+  start=$(date +%s)
+  ${ODL_HOME}/bin/client "feature:install -r appc-request-handler appc-command-executor appc-lifecycle-management appc-workflow-management lock-manager"
+  end=$(date +%s)
+  echo "Install of dispatcher features took $(expr $end - $start) seconds"
+  sleep 7s
+  echo "Sleep Finished"
+
+for feature in ${APPC_FEATURES_2}
+do
+  echo "Installing ${feature}"
+  start=$(date +%s)
+  ${ODL_HOME}/bin/client "feature:install -r ${feature}"
+  end=$(date +%s)
+  echo "Install of ${feature} took $(expr $end - $start) seconds"
+  sleep 7s
+  echo "Sleep Finished"
+done
index fc1599a..e38b317 100644 (file)
 
 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
 ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
-SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
+SDNC_HOME=${SDNC_HOME:-/opt/onap/ccsdk}
 APPC_HOME=${APPC_HOME:-/opt/onap/appc}
 SLEEP_TIME=${SLEEP_TIME:-120}
 MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
 
+appcInstallStartTime=$(date +%s)
+
 #
 # Adding the DMAAP_TOPIC_ENV variable into APPC-ASDC-LISTENER properties
 #
@@ -71,9 +73,6 @@ then
        ${ODL_HOME}/bin/start
        echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
        sleep ${SLEEP_TIME}
-       echo "Inserting modified installFeatures.sh for sdnc"
-       rm ${SDNC_HOME}/bin/installFeatures.sh
-       cp ${APPC_HOME}/data/sdncInstallFeatures.sh ${SDNC_HOME}/bin/installFeatures.sh
        echo "Copying a working version of the logging configuration into the opendaylight etc folder"
        cp ${APPC_HOME}/data/org.ops4j.pax.logging.cfg ${ODL_HOME}/etc/org.ops4j.pax.logging.cfg
        echo "Copying a new version of aaf cadi shiro into the opendaylight deploy folder"
@@ -88,6 +87,8 @@ then
        
        echo "Installing APPC platform features"
        ${APPC_HOME}/bin/installFeatures.sh
+       
+       
        if [ -x ${APPC_HOME}/svclogic/bin/install.sh ]
        then
                echo "Installing APPC DGs using platform-logic"
@@ -108,9 +109,14 @@ then
        echo "Copying a working version of the shiro configuration into the opendaylight etc folder"
        cp ${APPC_HOME}/data/shiro.ini ${ODL_HOME}/etc/shiro.ini
 
-       echo "Restarting OpenDaylight"
-       ${ODL_HOME}/bin/stop
+    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
 
+       appcInstallEndTime=$(date +%s)
+       echo "Total Appc install took $(expr $appcInstallEndTime - $appcInstallStartTime) seconds"
+
 exec ${ODL_HOME}/bin/karaf