Code Review
/
ccsdk
/
distribution.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Enhacing ODL-SLI startODL.sh and installSdncDb.sh
[ccsdk/distribution.git]
/
odlsli
/
src
/
main
/
scripts
/
startODL.sh
diff --git
a/odlsli/src/main/scripts/startODL.sh
b/odlsli/src/main/scripts/startODL.sh
index
568e179
..
d938724
100644
(file)
--- a/
odlsli/src/main/scripts/startODL.sh
+++ b/
odlsli/src/main/scripts/startODL.sh
@@
-24,43
+24,44
@@
# Install SDN-C platform components if not already installed and start container
# Install SDN-C platform components if not already installed and start container
-ODL_HOME=${ODL_HOME:-/opt/opendaylight
/current
}
+ODL_HOME=${ODL_HOME:-/opt/opendaylight}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
SLEEP_TIME=${SLEEP_TIME:-120}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
SLEEP_TIME=${SLEEP_TIME:-120}
-
MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0
}
+
INSTALLED_DIR=${INSTALLED_FILE:-${ODL_HOME}/current/daexim
}
+MYSQL_HOST=${MYSQL_HOST:-dbhost}
+MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-openECOMP1.0}
#
# Wait for database
#
#
# Wait for database
#
-echo
"Waiting for mysql
"
-until mysql -h
dbhost -u root -p${MYSQL_PASSW
D} mysql &> /dev/null
+echo
-e "\nWaiting for mysql:(${MYSQL_HOST})
"
+until mysql -h
${MYSQL_HOST} -u root -p${MYSQL_ROOT_PASSWOR
D} mysql &> /dev/null
do
printf "."
do
printf "."
- sleep 1
+ sleep 1
0
done
done
-echo -e "\nmysql
ready
"
+echo -e "\nmysql
:(${MYSQL_HOST}) is ready.
"
-if [ ! -f ${CCSDK_HOME}/.installed ]
+
+if [ ! -d ${INSTALLED_DIR} ]
+then
+ mkdir -p ${INSTALLED_DIR}
+fi
+
+if [ ! -f ${INSTALLED_DIR}/.installed ]
then
echo "Installing SDN-C database"
${CCSDK_HOME}/bin/installSdncDb.sh
then
echo "Installing SDN-C database"
${CCSDK_HOME}/bin/installSdncDb.sh
- echo "Starting OpenDaylight"
- ${ODL_HOME}/bin/start
- echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
- sleep ${SLEEP_TIME}
- echo "Installing SDN-C platform features"
- ${CCSDK_HOME}/bin/installFeatures.sh
+ # echo "Installing OpenDaylight host key"
+ # ${CCSDK_HOME}/bin/installOdlHostKey.sh
if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ]
then
echo "Installing directed graphs"
${CCSDK_HOME}/svclogic/bin/install.sh
fi
if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ]
then
echo "Installing directed graphs"
${CCSDK_HOME}/svclogic/bin/install.sh
fi
-
- echo "Restarting OpenDaylight"
- ${ODL_HOME}/bin/stop
- echo "Installed at `date`" > ${CCSDK_HOME}/.installed
+ echo "Installed at `date`" > ${INSTALLED_DIR}/.installed
fi
fi
-exec ${ODL_HOME}/bin/karaf
+exec ${ODL_HOME}/bin/karaf
server