diff options
author | WuKong <rebirthmonkey@gmail.com> | 2017-12-24 13:09:46 +0100 |
---|---|---|
committer | WuKong <rebirthmonkey@gmail.com> | 2017-12-24 13:09:46 +0100 |
commit | b2904eb52f85938a18f55520ce2b4cf4dcb0269f (patch) | |
tree | 055bcf58dc3d767fc61a870a4f859e0f740ac3db /templates/moon_forming/run.sh | |
parent | 1b21e61269223d9a9b97112e75606b1f612a0a24 (diff) |
moon doc cleanup
Change-Id: Iccc0858e305d724fd8c3341e27f9fa90ffeb916f
Signed-off-by: WuKong <rebirthmonkey@gmail.com>
Diffstat (limited to 'templates/moon_forming/run.sh')
-rw-r--r-- | templates/moon_forming/run.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/moon_forming/run.sh b/templates/moon_forming/run.sh new file mode 100644 index 00000000..71543f9e --- /dev/null +++ b/templates/moon_forming/run.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +populate_args=$* + +echo "Waiting for Consul (http://consul:8500)" +while ! python -c "import requests; req = requests.get('http://consul:8500')" 2>/dev/null ; do + sleep 5 ; + echo "." +done + +echo "Consul (http://consul:8500) is up." + +python3 /root/conf2consul.py /etc/moon/moon.conf + +echo "Waiting for DB (tcp://db:3306)" +while ! python -c "import socket, sys; s = socket.socket(socket.AF_INET, socket.SOCK_STREAM); s.connect(('db', 3306)); sys.exit(0)" 2>/dev/null ; do + sleep 5 ; + echo "." +done + +echo "Database (http://db:3306) is up." + +moon_db_manager upgrade + +echo "Waiting for Keystone (http://keystone:5000)" +while ! python -c "import requests; req = requests.get('http://keystone:5000')" 2>/dev/null ; do + sleep 5 ; + echo "." +done + +echo "Keystone (http://keystone:5000) is up." + +echo "Waiting for Manager (http://manager:8082)" +while ! python -c "import requests; req = requests.get('http://manager:8082')" 2>/dev/null ; do + sleep 5 ; + echo "." +done + +echo "Manager (http://manager:8082) is up." + +cd /root + +python3 populate_default_values.py $populate_args /root/conf/rbac.py +python3 populate_default_values.py $populate_args /root/conf/mls.py |