summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/resources/config/bin/startODL.sh
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dtimoney@att.com>2019-06-26 16:16:52 -0400
committerBorislav Glozman <Borislav.Glozman@amdocs.com>2019-07-10 07:06:08 +0000
commita3bc1a5a5ce3e9aa670bf5cff1c5f153b6ab1b15 (patch)
tree496dd10943fc9890aafcce6f9628a97356a33c77 /kubernetes/sdnc/resources/config/bin/startODL.sh
parentf0c49289099ca849306ed439d73beccd8cb75f37 (diff)
Initialize SDNC DB from init container
Updated sdnc helm chart to initialize database from an init container instead of initializing in startup script. Change-Id: I4133c70a5805227d89eef84e46bea8555bf8133d Issue-ID: SDNC-797 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'kubernetes/sdnc/resources/config/bin/startODL.sh')
-rwxr-xr-xkubernetes/sdnc/resources/config/bin/startODL.sh35
1 files changed, 0 insertions, 35 deletions
diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh
index eb49a69086..5586ebbca6 100755
--- a/kubernetes/sdnc/resources/config/bin/startODL.sh
+++ b/kubernetes/sdnc/resources/config/bin/startODL.sh
@@ -118,12 +118,8 @@ ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJv
SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin}
CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
-SLEEP_TIME=${SLEEP_TIME:-120}
-MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}}
-MYSQL_HOST=${MYSQL_HOST:-{{.Values.config.dbServiceName}}.{{.Release.Namespace}}}
ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
GEO_ENABLED=${GEO_ENABLED:-false}
-DBINIT_DIR=${DBINIT_DIR:-/opt/opendaylight/current/daexim}
SDNRWT=${SDNRWT:-false}
SDNRWT_BOOTFEATURES=${SDNRWT_BOOTFEATURES:-sdnr-wt-feature-aggregator}
export ODL_ADMIN_PASSWORD ODL_ADMIN_USERNAME
@@ -133,44 +129,13 @@ echo " ENABLE_ODL_CLUSTER=$ENABLE_ODL_CLUSTER"
echo " SDNC_REPLICAS=$SDNC_REPLICAS"
echo " SDNRWT=$SDNRWT"
-#
-# Wait for database to init properly
-#
-echo "Waiting for mysql"
-until mysql -h ${MYSQL_HOST} -u root -p${MYSQL_PASSWD} mysql &> /dev/null
-do
- printf "."
- sleep 1
-done
-echo -e "\nmysql ready"
-
-if [ ! -d ${DBINIT_DIR} ]
-then
- mkdir -p ${DBINIT_DIR}
-fi
-if [ ! -f ${DBINIT_DIR}/.installed ]
-then
- echo "Installing SDNC database"
- ${SDNC_HOME}/bin/installSdncDb.sh
-
- if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ]
- then
- echo "Installing directed graphs"
- ${SDNC_HOME}/svclogic/bin/install.sh
- fi
-
- echo "Installed at `date`" > ${DBINIT_DIR}/.installed
-fi
if [ ! -f ${SDNC_HOME}/.installed ]
then
echo "Installing SDN-C keyStore"
${SDNC_HOME}/bin/addSdncKeyStore.sh
- # No longer needed (this was a workaround for bug in Nitrogen)
- #${CCSDK_HOME}/bin/installOdlHostKey.sh
-
if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi
if $SDNRWT ; then install_sdnrwt_features ; fi