aboutsummaryrefslogtreecommitdiffstats
path: root/installation
diff options
context:
space:
mode:
Diffstat (limited to 'installation')
-rw-r--r--installation/appc/src/main/scripts/dockerInstall.sh40
1 files changed, 24 insertions, 16 deletions
diff --git a/installation/appc/src/main/scripts/dockerInstall.sh b/installation/appc/src/main/scripts/dockerInstall.sh
index e25d21a..8ae86ca 100644
--- a/installation/appc/src/main/scripts/dockerInstall.sh
+++ b/installation/appc/src/main/scripts/dockerInstall.sh
@@ -9,9 +9,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,29 +25,37 @@
# It starts opendaylight, installs the appc features, then shuts down opendaylight.
#
ODL_HOME=${ODL_HOME:-/opt/opendaylight}
-ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
SDNC_HOME=${SDNC_HOME:-/opt/onap/ccsdk}
APPC_HOME=${APPC_HOME:-/opt/onap/appc}
-SLEEP_TIME=${SLEEP_TIME:-120}
-MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
appcInstallStartTime=$(date +%s)
-
-echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
-sleep ${SLEEP_TIME}
-
+TIME_OUT=1000
+INTERVAL=30
+TIME=0
echo "Checking that Karaf can be accessed"
+while [ "$TIME" -lt "$TIME_OUT" ]; do
+
##clientOutput=$(${ODL_HOME}/bin/client shell:echo KarafLoginCheckIsWorking)
-clientOutput=$(sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "shell:echo KarafLoginCheckIsWorking")
-if echo "$clientOutput" | grep -q "KarafLoginCheckIsWorking"; then
-echo "Karaf login succeeded"
-else
-echo "Error during Karaf login"
-exit 1
+ clientOutput=$(sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "shell:echo KarafLoginCheckIsWorking")
+ if echo "$clientOutput" | grep -q "KarafLoginCheckIsWorking"; then
+ echo "Karaf login succeeded"
+ echo localhost ready in $TIME seconds
+ break;
+ else
+ echo Sleep: $INTERVAL seconds before localhost address is ready. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
+ fi
+
+ sleep $INTERVAL
+ TIME=$(($TIME+$INTERVAL))
+done
+
+if [ "$TIME" -ge "$TIME_OUT" ]; then
+ echo "Error during Karaf login, abort manual run dockerInstall.sh to instaill APPC platform features"
+ exit 1
fi
-echo "Installing APPC platform features"
+echo "Karaf login is ready, installing APPC platform features"
${APPC_HOME}/bin/installFeatures.sh
appcInstallEndTime=$(date +%s)