summaryrefslogtreecommitdiffstats
path: root/mgr/docker/docker-entrypoint.sh
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-08-08 16:10:48 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-08-08 16:10:48 +0800
commitab32ab75c8d721fb1479a3c70fb787b6f224445b (patch)
tree30160c45a926b573dc0dc690556f2e93755676ce /mgr/docker/docker-entrypoint.sh
parent3ac879dd15908f592e37f2adc445eda4b4f54eaf (diff)
Remove DB and redis service from vnfmgr
Change-Id: I122f239cf4ab59cf5dd65f7fdebd367eebb8b548 Issue-ID: VFC-981 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'mgr/docker/docker-entrypoint.sh')
-rwxr-xr-xmgr/docker/docker-entrypoint.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/mgr/docker/docker-entrypoint.sh b/mgr/docker/docker-entrypoint.sh
index 9d8b0cf..ecdd938 100755
--- a/mgr/docker/docker-entrypoint.sh
+++ b/mgr/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/vnfmgr/mgr/docker/instance_config.sh