summaryrefslogtreecommitdiffstats
path: root/lcm/docker/docker-entrypoint.sh
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-08-08 15:13:25 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-08-08 15:13:25 +0800
commitbe8a3ac8d84b2bffd32d5d5e5f2609706e93d33d (patch)
tree5280f77cc1821cd054c6248191a7be0b49d61060 /lcm/docker/docker-entrypoint.sh
parent5e0b0a3a63ce9c70b3486cd6e5cd38e072f7c3e0 (diff)
Remove DB and redis service from vnflcm
Change-Id: I83f9bc8b0ccaaaad1f04a9590c1bfba43ce5be51 Issue-ID: VFC-979 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm/docker/docker-entrypoint.sh')
-rwxr-xr-xlcm/docker/docker-entrypoint.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/lcm/docker/docker-entrypoint.sh b/lcm/docker/docker-entrypoint.sh
index aa475feb..ed413828 100755
--- a/lcm/docker/docker-entrypoint.sh
+++ b/lcm/docker/docker-entrypoint.sh
@@ -5,17 +5,18 @@ if [ -z "$SERVICE_IP" ]; then
fi
echo "SERVICE_IP=$SERVICE_IP"
-if [ -z "$MYSQL_ROOT_PASSWORD" ]; then
- export MYSQL_ROOT_PASSWORD="root"
-fi
-echo "MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD"
-
if [ -z "$MSB_ADDR" ]; then
echo "Missing required variable MSB_ADDR: Microservices Service Bus address <ip>:<port>"
exit 1
fi
echo "MSB_ADDR=$MSB_ADDR"
+if [ -z "$MYSQL_ADDR" ]; then
+ echo "Missing required variable MYSQL_ADDR: <ip>:<port>"
+ exit 1
+fi
+echo "MYSQL_ADDR=$MYSQL_ADDR"
+
# Wait for MSB initialization
echo "Wait for MSB initialization"
for i in {1..5}; do
@@ -23,6 +24,13 @@ for i in {1..5}; do
sleep $i
done
+# Wait for DB initialization
+echo "Wait for DB initialization"
+for i in {1..5}; do
+ curl -sS -m 1 $MYSQL_ADDR > /dev/null && break
+ sleep $i
+done
+
# Configure service based on docker environment variables
vfc/gvnfm/vnflcm/lcm/docker/instance_config.sh