diff options
author | Venkata Harish K Kajur <vk250x@att.com> | 2017-10-03 22:19:12 +0000 |
---|---|---|
committer | Venkata Harish K Kajur <vk250x@att.com> | 2017-10-03 22:23:27 +0000 |
commit | 87f8d249cbbc0834b01f314289c0e12d328dcb48 (patch) | |
tree | 9b0efc82bcd88070af1b6a7809a98ac86bdd2bd2 | |
parent | ff724dd3d19bd955096f94194504fd017e228599 (diff) |
Change the docker startup to wait before
container is finished to ensure that during
when script finishes at least the resources
traversal and haproxy is up as they need
to be connected to hbase
Issue-ID: AAI-411
Change-Id: I8f383582c8d69a669e14b084df028c53e62d2bd5
Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
-rwxr-xr-x | deploy_vm1.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/deploy_vm1.sh b/deploy_vm1.sh index 01e8447..278cfd3 100755 --- a/deploy_vm1.sh +++ b/deploy_vm1.sh @@ -68,7 +68,7 @@ function wait_for_container() { CONTAINER_NAME="$1"; START_TEXT="$2"; - TIMEOUT=160 + TIMEOUT=360 # wait for the real startup AMOUNT_STARTUP=$(docker logs ${CONTAINER_NAME} 2>&1 | grep "$START_TEXT" | wc -l) @@ -135,8 +135,14 @@ fi; chown -R $USER_ID:$USER_ID $RESOURCE_LOGS $TRAVERSAL_LOGS; +RESOURCES_CONTAINER_NAME=$($DOCKER_COMPOSE_CMD up -d aai-resources.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); +wait_for_container $RESOURCES_CONTAINER_NAME '0.0.0.0:8447'; + +GRAPH_CONTAINER_NAME=$($DOCKER_COMPOSE_CMD up -d aai-traversal.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | awk '{ print $2; }' | head -1); +wait_for_container $GRAPH_CONTAINER_NAME '0.0.0.0:8446'; + # Deploy haproxy and traversal and resources -$DOCKER_COMPOSE_CMD up -d aai.api.simpledemo.openecomp.org aai-resources.api.simpledemo.openecomp.org aai-traversal.api.simpledemo.openecomp.org +$DOCKER_COMPOSE_CMD up -d aai.api.simpledemo.openecomp.org $DOCKER_COMPOSE_CMD up -d sparky-be |