aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brady <patrick.brady@att.com>2019-08-27 14:26:48 -0700
committerPatrick Brady <patrick.brady@att.com>2019-09-04 17:04:11 +0000
commita2495c362fbc750e2f5793a34752ff2ea7c991a4 (patch)
tree7ee1fc8c678e71fe8fbb846317693ab4f826131a
parent98a2f39c7ee4c9dd47d59180425a753b926b2b13 (diff)
Changes for ODL SR2
-Change ccskd base image version for SR2 Fluorine -Stop installing shiro plugin since it's included in ccsdk -Install features in groups to speed install time Change-Id: I85ad156f8be201327ae6cd1a406b3a8ca0479b5f Signed-off-by: Patrick Brady <patrick.brady@att.com> Issue-ID: APPC-1630
-rw-r--r--installation/appc/src/main/docker/Dockerfile2
-rw-r--r--installation/appc/src/main/scripts/dockerInstall.sh11
-rw-r--r--installation/appc/src/main/scripts/installFeatures.sh78
3 files changed, 50 insertions, 41 deletions
diff --git a/installation/appc/src/main/docker/Dockerfile b/installation/appc/src/main/docker/Dockerfile
index b19c3eb..2d38fe3 100644
--- a/installation/appc/src/main/docker/Dockerfile
+++ b/installation/appc/src/main/docker/Dockerfile
@@ -21,7 +21,7 @@
# ============LICENSE_END============================================
# Base ubuntu with added packages needed for ONAP
-FROM onap/ccsdk-odlsli-alpine-image:0.4.1
+FROM onap/ccsdk-odlsli-alpine-image:0.5.1
MAINTAINER APP-C Team (appc@lists.openecomp.org)
# run as root to install ps to comply with karaf scripts
diff --git a/installation/appc/src/main/scripts/dockerInstall.sh b/installation/appc/src/main/scripts/dockerInstall.sh
index a35896d..acd0def 100644
--- a/installation/appc/src/main/scripts/dockerInstall.sh
+++ b/installation/appc/src/main/scripts/dockerInstall.sh
@@ -24,7 +24,7 @@
# This script runs during docker image build.
# It starts opendaylight, installs the appc features, then shuts down opendaylight.
#
-ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_HOME=${ODL_HOME:-/opt/opendaylight}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
SDNC_HOME=${SDNC_HOME:-/opt/onap/ccsdk}
APPC_HOME=${APPC_HOME:-/opt/onap/appc}
@@ -33,7 +33,8 @@ MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
appcInstallStartTime=$(date +%s)
-
+ODL_BOOT_FEATURES_EXTRA="odl-netconf-connector,odl-restconf-noauth,odl-netconf-clustered-topology,odl-mdsal-clustering"
+sed -i -e "\|featuresBoot[^a-zA-Z]|s|$|,${ODL_BOOT_FEATURES_EXTRA}|" $ODL_HOME/etc/org.apache.karaf.features.cfg
echo "Starting OpenDaylight"
${ODL_HOME}/bin/start
@@ -51,8 +52,8 @@ fi
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"
-cp ${APPC_HOME}/data/aaf-shiro-aafrealm-osgi-bundle.jar ${ODL_HOME}/deploy/aaf-shiro-aafrealm-osgi-bundle.jar
+#echo "Copying a new version of aaf cadi shiro into the opendaylight deploy folder"
+#cp ${APPC_HOME}/data/aaf-shiro-aafrealm-osgi-bundle.jar ${ODL_HOME}/deploy/aaf-shiro-aafrealm-osgi-bundle.jar
echo "Installing APPC platform features"
${APPC_HOME}/bin/installFeatures.sh
@@ -79,7 +80,7 @@ echo "Stopping OpenDaylight and waiting for it to stop"
${ODL_HOME}/bin/stop
#The karaf command will exit when odl shuts down. This is the most reliable way to wait for opendaylight to stop
#before exiting the docker container.
-${ODL_HOME}/bin/karaf
+${ODL_HOME}/bin/client
echo "Karaf process has stopped"
sleep 10s
diff --git a/installation/appc/src/main/scripts/installFeatures.sh b/installation/appc/src/main/scripts/installFeatures.sh
index eb10b5c..f8214c3 100644
--- a/installation/appc/src/main/scripts/installFeatures.sh
+++ b/installation/appc/src/main/scripts/installFeatures.sh
@@ -38,25 +38,19 @@ while [ $COUNT -lt 10 ]; do
let COUNT=COUNT+1
done
}
-
- 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"
+function waitForKaraf {
+COUNT=0
+while [ $COUNT -lt 20 ]; do
+ ${ODL_HOME}/bin/client feature:list $1 2> /tmp/installErr
+ cat /tmp/installErr
+ if grep -q 'Failed to get the session' /tmp/installErr; then
+ sleep 10
+ else
+ let COUNT=20
+ fi
+ let COUNT=COUNT+1
+done
+}
APPC_FEATURES_1=" \
onap-appc-core \
@@ -82,7 +76,9 @@ APPC_FEATURES_1=" \
onap-appc-config-audit \
onap-appc-config-encryption-tool \
onap-appc-config-flow-controller \
- onap-appc-config-params \
+ onap-appc-config-params"
+
+ APPC_FEATURES_3=" \
onap-appc-artifact-handler \
onap-appc-aai-client \
onap-appc-event-listener \
@@ -125,12 +121,9 @@ APPC_FEATURES_1=" \
-echo "Enabling core APP-C features"
-featureInstall odl-netconf-connector
-featureInstall odl-restconf-noauth
-featureInstall odl-netconf-clustered-topology
-featureInstall odl-mdsal-clustering
-sleep 7s
+#echo "Enabling core APP-C features"
+#featureInstall odl-netconf-connector odl-restconf-noauth odl-netconf-clustered-topology odl-mdsal-clustering
+#waitForKaraf
echo "Installing APP-C Features"
echo ""
@@ -144,18 +137,18 @@ do
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}"
+ group1Features="${group1Features} ${feature}"
+done
+
+ echo "Installing features: ${group1Features}"
start=$(date +%s)
- ${ODL_HOME}/bin/client "feature:install -r ${feature}"
+ ${ODL_HOME}/bin/client "feature:install -r ${group1Features}"
end=$(date +%s)
- echo "Install of ${feature} took $(expr $end - $start) seconds"
+ echo "Install of features took $(expr $end - $start) seconds"
sleep 7s
echo "Sleep Finished"
-done
echo "Installing dispatcher features"
start=$(date +%s)
@@ -167,15 +160,30 @@ done
for feature in ${APPC_FEATURES_2}
do
- echo "Installing ${feature}"
+ group2Features="${group2Features} ${feature}"
+done
+
+ echo "Installing features: ${group2Features}"
start=$(date +%s)
- ${ODL_HOME}/bin/client "feature:install -r ${feature}"
+ ${ODL_HOME}/bin/client "feature:install -r ${group2Features}"
end=$(date +%s)
- echo "Install of ${feature} took $(expr $end - $start) seconds"
+ echo "Install of features took $(expr $end - $start) seconds"
sleep 7s
echo "Sleep Finished"
+
+for feature in ${APPC_FEATURES_3}
+do
+ group3Features="${group3Features} ${feature}"
done
+ echo "Installing features: ${group3Features}"
+ start=$(date +%s)
+ ${ODL_HOME}/bin/client "feature:install -r ${group3Features}"
+ end=$(date +%s)
+ echo "Install of features took $(expr $end - $start) seconds"
+ sleep 7s
+ echo "Sleep Finished"
+
#Copy json template file for use by the generic restart DG aai fix
mkdir -p /opt/onap/appc/restapi/templates
cp /opt/onap/appc/data/aai-named-query.json /opt/onap/appc/restapi/templates/aai-named-query.json