aboutsummaryrefslogtreecommitdiffstats
path: root/installation
diff options
context:
space:
mode:
authorPatrick Brady <patrick.brady@att.com>2019-09-03 12:46:40 -0700
committerPatrick Brady <patrick.brady@att.com>2019-09-04 17:04:23 +0000
commit6989e98ea8d2293aa90aacc1b864fb724643156e (patch)
tree0036ff220334359810cd6ecf7604787f9394a942 /installation
parenta2495c362fbc750e2f5793a34752ff2ea7c991a4 (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: Ibdca395fe9335d9a778927ec69324c0d7545cace Signed-off-by: Patrick Brady <patrick.brady@att.com> Issue-ID: APPC-1683
Diffstat (limited to 'installation')
-rw-r--r--installation/appc/src/main/docker/Dockerfile2
-rw-r--r--installation/appc/src/main/scripts/dockerInstall.sh14
-rw-r--r--installation/appc/src/main/scripts/startODL.sh5
3 files changed, 11 insertions, 10 deletions
diff --git a/installation/appc/src/main/docker/Dockerfile b/installation/appc/src/main/docker/Dockerfile
index 2d38fe3..8ea9e1a 100644
--- a/installation/appc/src/main/docker/Dockerfile
+++ b/installation/appc/src/main/docker/Dockerfile
@@ -49,7 +49,7 @@ RUN ln -s /opt/onap/appc /opt/appc
RUN mkdir /opt/onap/appc/cvaas
#Start opendaylight and pre-install the appc features
-RUN opt/onap/appc/bin/dockerInstall.sh
+#RUN opt/onap/appc/bin/dockerInstall.sh
# Expose port 8181 for ODL REST calls
EXPOSE 8181
diff --git a/installation/appc/src/main/scripts/dockerInstall.sh b/installation/appc/src/main/scripts/dockerInstall.sh
index acd0def..7708dcb 100644
--- a/installation/appc/src/main/scripts/dockerInstall.sh
+++ b/installation/appc/src/main/scripts/dockerInstall.sh
@@ -33,11 +33,7 @@ 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
echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
sleep ${SLEEP_TIME}
@@ -76,13 +72,13 @@ 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 "Stopping OpenDaylight and waiting for it to stop"
-${ODL_HOME}/bin/stop
+#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
+#${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 52e524b..fdb2c58 100644
--- a/installation/appc/src/main/scripts/startODL.sh
+++ b/installation/appc/src/main/scripts/startODL.sh
@@ -87,4 +87,9 @@ echo "Starting cdt-proxy-service jar, logging to ${APPC_HOME}/cdt-proxy-service/
java -jar ${APPC_HOME}/cdt-proxy-service/cdt-proxy-service.jar > ${APPC_HOME}/cdt-proxy-service/jar.log &
echo "Starting ODL/APPC"
+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