diff options
author | asteroide <thomas.duval@orange.com> | 2017-05-18 10:41:29 +0200 |
---|---|---|
committer | asteroide <thomas.duval@orange.com> | 2017-05-18 10:41:29 +0200 |
commit | 387d7043579bbde9112567607344278cf2c6e5ca (patch) | |
tree | dd7e8de943688c32f1121629ecfe4b3ec7d13246 /moonv4/bin | |
parent | f0504e51e8bdc6fb4dc02af01ccfeee9a9213304 (diff) |
Add commands to wait for the ends of Messenger and Database containers instead of waiting 20 or 40 seconds
Change-Id: Ifd57c263d28eb3e69765ae03b7ab3e6acd3fb836
Diffstat (limited to 'moonv4/bin')
-rwxr-xr-x | moonv4/bin/start.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/moonv4/bin/start.sh b/moonv4/bin/start.sh index b2d30820..d72baf61 100755 --- a/moonv4/bin/start.sh +++ b/moonv4/bin/start.sh @@ -10,8 +10,15 @@ docker run -dti --net=moon --hostname messenger --name messenger -e RABBITMQ_DEF echo -e "\033[32mStarting DB manager\033[m" docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest -echo waiting for 20 seconds before starting Keystone container... -sleep 20s +echo "waiting for Database (it may takes time)..." +echo -e "\033[35m" +sed '/ready for connections/q' <(docker logs db -f) +echo -e "\033[m" + +echo "waiting for Messenger (it may takes time)..." +echo -e "\033[35m" +sed '/Server startup complete;/q' <(docker logs messenger -f) +echo -e "\033[m" docker run -dti --net moon --hostname keystone --name keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 keystone:mitaka @@ -22,8 +29,6 @@ bash $MOON_HOME/bin/build_all.sh pip install $MOON_HOME/moon_orchestrator/dist/moon_db-0.1.0.tar.gz --upgrade pip install $MOON_HOME/moon_orchestrator/dist/moon_utilities-0.1.0.tar.gz --upgrade -echo waiting for 20 seconds before configuring and starting Orchestrator container... -sleep 30s moon_db_manager upgrade echo -e "\033[32mStarting Moon Orchestrator\033[m" |