From: Taka Cho Date: Tue, 1 Oct 2019 19:49:07 +0000 (-0400) Subject: ODL Neon SR1 upgrade X-Git-Tag: 1.7.0~8 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=appc%2Fdeployment.git;a=commitdiff_plain;h=105b7cdfec533c7b9976209af6af73e2f2508512 ODL Neon SR1 upgrade change ccsdk image for Neon SR1 Issue-ID: APPC-1749 Change-Id: I2716e8f58464f5b24b13adb848a694d3dd9512f4 Signed-off-by: Taka Cho --- diff --git a/installation/appc/src/main/docker/Dockerfile b/installation/appc/src/main/docker/Dockerfile index ff9e6a6..56e66a8 100644 --- a/installation/appc/src/main/docker/Dockerfile +++ b/installation/appc/src/main/docker/Dockerfile @@ -21,12 +21,14 @@ # ============LICENSE_END============================================ # Base ubuntu with added packages needed for ONAP -FROM onap/ccsdk-odlsli-alpine-image:0.5.4 +FROM onap/ccsdk-odlsli-alpine-image:0.6.3 MAINTAINER APP-C Team (appc@lists.openecomp.org) # run as root to install ps to comply with karaf scripts USER root RUN apk add --no-cache procps +RUN apk add --no-cache openssh +RUN apk add --no-cache sshpass # Set the Env. Variable in the container to add the APPC CONFIG DIR (the SDNC_CONFIG_DIR is inherited from SDNC Image) ENV APPC_CONFIG_DIR /opt/onap/appc/data/properties diff --git a/installation/appc/src/main/scripts/dockerInstall.sh b/installation/appc/src/main/scripts/dockerInstall.sh index c93aae3..e25d21a 100644 --- a/installation/appc/src/main/scripts/dockerInstall.sh +++ b/installation/appc/src/main/scripts/dockerInstall.sh @@ -38,7 +38,8 @@ echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize" sleep ${SLEEP_TIME} echo "Checking that Karaf can be accessed" -clientOutput=$(${ODL_HOME}/bin/client shell:echo KarafLoginCheckIsWorking) +##clientOutput=$(${ODL_HOME}/bin/client shell:echo KarafLoginCheckIsWorking) +clientOutput=$(sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "shell:echo KarafLoginCheckIsWorking") if echo "$clientOutput" | grep -q "KarafLoginCheckIsWorking"; then echo "Karaf login succeeded" else diff --git a/installation/appc/src/main/scripts/installFeatures.sh b/installation/appc/src/main/scripts/installFeatures.sh index f8214c3..d26826c 100644 --- a/installation/appc/src/main/scripts/installFeatures.sh +++ b/installation/appc/src/main/scripts/installFeatures.sh @@ -28,7 +28,8 @@ APPC_FEATURE_DIR=${APPC_FEATURE_DIR:-${APPC_HOME}/features} function featureInstall { COUNT=0 while [ $COUNT -lt 10 ]; do - ${ODL_HOME}/bin/client feature:install $1 2> /tmp/installErr +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "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 @@ -41,7 +42,8 @@ done function waitForKaraf { COUNT=0 while [ $COUNT -lt 20 ]; do - ${ODL_HOME}/bin/client feature:list $1 2> /tmp/installErr +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:list $1" 2> /tmp/installErr +# ${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 @@ -144,7 +146,8 @@ done echo "Installing features: ${group1Features}" start=$(date +%s) - ${ODL_HOME}/bin/client "feature:install -r ${group1Features}" +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group1Features}" +# ${ODL_HOME}/bin/client "feature:install -r ${group1Features}" end=$(date +%s) echo "Install of features took $(expr $end - $start) seconds" sleep 7s @@ -152,7 +155,8 @@ done echo "Installing dispatcher features" start=$(date +%s) - ${ODL_HOME}/bin/client "feature:install -r onap-appc-request-handler onap-appc-command-executor onap-appc-lifecycle-management onap-appc-workflow-management lock-manager onap-appc-provider" +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r onap-appc-request-handler onap-appc-command-executor onap-appc-lifecycle-management onap-appc-workflow-management lock-manager onap-appc-provider" +# ${ODL_HOME}/bin/client "feature:install -r onap-appc-request-handler onap-appc-command-executor onap-appc-lifecycle-management onap-appc-workflow-management lock-manager onap-appc-provider" end=$(date +%s) echo "Install of dispatcher features took $(expr $end - $start) seconds" sleep 7s @@ -165,7 +169,8 @@ done echo "Installing features: ${group2Features}" start=$(date +%s) - ${ODL_HOME}/bin/client "feature:install -r ${group2Features}" +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group2Features}" +# ${ODL_HOME}/bin/client "feature:install -r ${group2Features}" end=$(date +%s) echo "Install of features took $(expr $end - $start) seconds" sleep 7s @@ -178,7 +183,8 @@ done echo "Installing features: ${group3Features}" start=$(date +%s) - ${ODL_HOME}/bin/client "feature:install -r ${group3Features}" +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group3Features}" +# ${ODL_HOME}/bin/client "feature:install -r ${group3Features}" end=$(date +%s) echo "Install of features took $(expr $end - $start) seconds" sleep 7s diff --git a/installation/appc/src/main/scripts/installZips.sh b/installation/appc/src/main/scripts/installZips.sh index a151215..daf2b9a 100644 --- a/installation/appc/src/main/scripts/installZips.sh +++ b/installation/appc/src/main/scripts/installZips.sh @@ -76,7 +76,7 @@ APPC_FEATURES=" \ APPC_VERSION=${APPC_VERSION:-0.0.1} APPC_CDT_VERSION=${APPC_CDT_VERSION:-0.0.1} APPC_OAM_VERSION=${APPC_OAM_VERSION:-0.1.1} -AAF_SHIRO_VERSION=${AAF_SHIRO_VERSION:-2.1.7-SNAPSHOT} +#AAF_SHIRO_VERSION=${AAF_SHIRO_VERSION:-2.1.7-SNAPSHOT} tmpDir=/tmp/appc-${APPC_VERSION} @@ -119,9 +119,10 @@ echo "Downloading dg-loader-provider jar from nexus" mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.appc.plugins:dg-loader-provider:${APPC_VERSION}:jar:jar-with-dependencies -DoutputDirectory=${targetDir}/data mv ${targetDir}/data/dg-loader-provider-*-jar-with-dependencies.jar ${targetDir}/data/dg-loader-provider-jar-with-dependencies.jar -echo "Downloading aaf-cadi-shiro from nexus" -mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.aaf.cadi:aaf-shiro-aafrealm-osgi-bundle:${AAF_SHIRO_VERSION} -DoutputDirectory=${targetDir}/data -mv ${targetDir}/data/aaf-shiro-aafrealm-osgi-bundle-*.jar ${targetDir}/data/aaf-shiro-aafrealm-osgi-bundle.jar +# installed from CCSDK in El Alto release +#echo "Downloading aaf-cadi-shiro from nexus" +#mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.aaf.cadi:aaf-shiro-aafrealm-osgi-bundle:${AAF_SHIRO_VERSION} -DoutputDirectory=${targetDir}/data +#mv ${targetDir}/data/aaf-shiro-aafrealm-osgi-bundle-*.jar ${targetDir}/data/aaf-shiro-aafrealm-osgi-bundle.jar echo "Setting keyfile to readonly" chmod 400 ${targetDir}/data/stores/org.onap.appc.keyfile diff --git a/installation/appc/src/main/scripts/startODL.sh b/installation/appc/src/main/scripts/startODL.sh index c03bd70..f76c887 100644 --- a/installation/appc/src/main/scripts/startODL.sh +++ b/installation/appc/src/main/scripts/startODL.sh @@ -88,8 +88,8 @@ java -jar ${APPC_HOME}/cdt-proxy-service/cdt-proxy-service.jar > ${APPC_HOME}/cd echo "Starting ODL/APPC" -echo "Copying the aaa shiro configuration into opendaylight" -cp ${APPC_HOME}/data/aaa-app-config.xml ${ODL_HOME}/etc/opendaylight/datastore/initial/config/aaa-app-config.xml +#echo "Copying the aaa shiro configuration into opendaylight" +#cp ${APPC_HOME}/data/aaa-app-config.xml ${ODL_HOME}/etc/opendaylight/datastore/initial/config/aaa-app-config.xml echo "Adding a property system.properties for AAF cadi.properties location" echo "" >> ${ODL_HOME}/etc/system.properties