From e156c23814f038c99731b3ee4454ef0c8ec0be35 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 14 Nov 2018 10:34:31 -0500 Subject: Store .installed marker in persistent volume Store .installed marker in persistent volume (/opt/opendaylight/current/daexim) Change-Id: If54d40225e8eb30bcd3f133801726ae5f90b02a2 Issue-ID: SDNC-518 Signed-off-by: Timoney, Dan (dt5972) --- kubernetes/sdnc/resources/config/bin/startODL.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'kubernetes/sdnc/resources/config') diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh index 9d1ab768fb..b94cf4fa7b 100755 --- a/kubernetes/sdnc/resources/config/bin/startODL.sh +++ b/kubernetes/sdnc/resources/config/bin/startODL.sh @@ -86,6 +86,7 @@ MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} MYSQL_HOST=${MYSQL_HOST:-{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}} ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} GEO_ENABLED=${GEO_ENABLED:-false} +INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim} # # Wait for database to init properly @@ -98,7 +99,12 @@ do done echo -e "\nmysql ready" -if [ ! -f ${SDNC_HOME}/.installed ] +if [ ! -d ${INSTALLED_DIR} ] +then + mkdir -p ${INSTALLED_DIR} +fi + +if [ ! -f ${INSTALLED_DIR}/.installed ] then echo "Installing SDNC database" ${SDNC_HOME}/bin/installSdncDb.sh @@ -116,7 +122,7 @@ then if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi - echo "Installed at `date`" > ${SDNC_HOME}/.installed + echo "Installed at `date`" > ${INSTALLED_DIR}/.installed fi exec ${ODL_HOME}/bin/karaf server -- cgit 1.2.3-korg