From bc6ce262858bf9ce5ac6530ccfe1e84011eac3c8 Mon Sep 17 00:00:00 2001 From: Patrick Brady Date: Mon, 9 Sep 2019 15:02:23 -0700 Subject: [PATCH] Move property file modify script The scripts to add lines to property files must come before odl startup, since odl is no longer being restarted after installation. Change-Id: I56afb22d2983b656feadaa5a62ff4e1945414a89 Signed-off-by: Patrick Brady Issue-ID: CCSDK-1445 --- .../appc/src/main/scripts/dockerInstall.sh | 23 ---------------------- installation/appc/src/main/scripts/startODL.sh | 13 ++++++++++++ 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/installation/appc/src/main/scripts/dockerInstall.sh b/installation/appc/src/main/scripts/dockerInstall.sh index 4ac996d..c93aae3 100644 --- a/installation/appc/src/main/scripts/dockerInstall.sh +++ b/installation/appc/src/main/scripts/dockerInstall.sh @@ -46,31 +46,8 @@ echo "Error during Karaf login" exit 1 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 "Installing APPC platform features" ${APPC_HOME}/bin/installFeatures.sh -echo "Adding a property system.properties for AAF cadi.properties location" -echo "" >> ${ODL_HOME}/etc/system.properties -echo "cadi_prop_files=${APPC_HOME}/data/properties/cadi.properties" >> ${ODL_HOME}/etc/system.properties -echo "" >> ${ODL_HOME}/etc/system.properties - -echo "Adding a value to property appc.asdc.env in appc.properties for appc-asdc-listener feature" -echo "" >> $APPC_HOME/data/properties/appc.properties -echo "appc.asdc.env=$DMAAP_TOPIC_ENV" >> $APPC_HOME/data/properties/appc.properties -echo "" >> $APPC_HOME/data/properties/appc.properties - -#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/client -#echo "Karaf process has stopped" -#sleep 10s - appcInstallEndTime=$(date +%s) echo "Total Appc install took $(expr $appcInstallEndTime - $appcInstallStartTime) seconds" diff --git a/installation/appc/src/main/scripts/startODL.sh b/installation/appc/src/main/scripts/startODL.sh index c288939..c03bd70 100644 --- a/installation/appc/src/main/scripts/startODL.sh +++ b/installation/appc/src/main/scripts/startODL.sh @@ -91,11 +91,24 @@ 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 "Adding a property system.properties for AAF cadi.properties location" +echo "" >> ${ODL_HOME}/etc/system.properties +echo "cadi_prop_files=${APPC_HOME}/data/properties/cadi.properties" >> ${ODL_HOME}/etc/system.properties +echo "" >> ${ODL_HOME}/etc/system.properties + +echo "Adding a value to property appc.asdc.env in appc.properties for appc-asdc-listener feature" +echo "" >> $APPC_HOME/data/properties/appc.properties +echo "appc.asdc.env=$DMAAP_TOPIC_ENV" >> $APPC_HOME/data/properties/appc.properties +echo "" >> $APPC_HOME/data/properties/appc.properties + echo "Copying jetty, keystore for https into opendalight" cp ${APPC_HOME}/data/jetty.xml ${ODL_HOME}/etc/jetty.xml cp ${APPC_HOME}/data/keystore ${ODL_HOME}/etc/keystore cp ${APPC_HOME}/data/custom.properties ${ODL_HOME}/etc/custom.properties +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 + 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 -- 2.16.6