summaryrefslogtreecommitdiffstats
path: root/kubernetes/appc
diff options
context:
space:
mode:
authorPatrick Brady <patrick.brady@att.com>2019-09-05 11:22:57 -0700
committerPatrick Brady <patrick.brady@att.com>2019-09-09 15:40:56 -0700
commitf78f7cfe7941e00db61172b9f2ed9c4e5962cb9d (patch)
tree812b3ec2e9fee008d40bd13482709131b4ccacc2 /kubernetes/appc
parent197d873802cb0d2b3ad3ee8065ef5fea2988aff2 (diff)
Move appc install to runtime
Since ccsdk dblib does not work after a restart of karaf, the appc install scripts must be modified so that karaf is not started during docker build. Change-Id: I9cdb3a736e26d7da9fdce53dcc7b45585d97fc47 Signed-off-by: Patrick Brady <patrick.brady@att.com> Issue-ID: CCSDK-1445
Diffstat (limited to 'kubernetes/appc')
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh50
1 files changed, 24 insertions, 26 deletions
diff --git a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
index ad135f863a..c52c6e3aa1 100755
--- a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
@@ -111,8 +111,6 @@ then
# 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 "Starting OpenDaylight"
- ${ODL_HOME}/bin/start
echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
sleep ${SLEEP_TIME}
@@ -137,6 +135,7 @@ then
fi
echo "Copying the aaa shiro configuration into opendaylight"
+ mkdir -p ${ODL_HOME}/etc/opendaylight/datastore/initial/config
if $ENABLE_AAF
then
cp ${APPC_HOME}/data/properties/aaa-app-config.xml ${ODL_HOME}/etc/opendaylight/datastore/initial/config/aaa-app-config.xml
@@ -144,29 +143,6 @@ then
cp ${APPC_HOME}/data/aaa-app-config.xml ${ODL_HOME}/etc/opendaylight/datastore/initial/config/aaa-app-config.xml
fi
- echo "Restarting OpenDaylight"
- ${ODL_HOME}/bin/stop
- checkRun () {
- running=0
- while read a b c d e f g h
- do
- if [ "$h" == "/bin/sh /opt/opendaylight/bin/karaf server" ]
- then
- running=1
- fi
- done < <(ps -eaf)
- echo $running
- }
-
- while [ $( checkRun ) == 1 ]
- do
- echo "Karaf is still running, waiting..."
- sleep 5s
- done
- echo "Karaf process has stopped"
- sleep 10s
-
- echo "Installed at `date`" > ${SDNC_HOME}/.installed
fi
# Move journal and snapshots directory to persistent storage
@@ -195,5 +171,27 @@ ln -s ${hostdir}/snapshots ${ODL_HOME}/snapshots
echo "Starting cdt-proxy-service jar, logging to ${APPC_HOME}/cdt-proxy-service/jar.log"
java -jar ${APPC_HOME}/cdt-proxy-service/cdt-proxy-service.jar > ${APPC_HOME}/cdt-proxy-service/jar.log &
-exec ${ODL_HOME}/bin/karaf server
+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
+
+exec ${APPC_HOME}/bin/dockerInstall.sh &
+echo "Starting OpenDaylight"
+exec ${ODL_HOME}/bin/karaf server