From dcf2ce1b8cd039b3a13e7c70ef94ce968ffc4de0 Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Wed, 22 Nov 2017 11:26:41 +0100 Subject: Add waiting code for Keystone, re-add the ability to connect a PDP to the "admin" Keystone project and fix some bugs Change-Id: Ic3afdb1306a72bd09f9071e96aabfae602153e94 --- moonv4/templates/moonforming/run.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'moonv4/templates/moonforming/run.sh') diff --git a/moonv4/templates/moonforming/run.sh b/moonv4/templates/moonforming/run.sh index e3c052c5..71543f9e 100644 --- a/moonv4/templates/moonforming/run.sh +++ b/moonv4/templates/moonforming/run.sh @@ -1,12 +1,14 @@ #!/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 "Manager (http://consul:8500) is up." +echo "Consul (http://consul:8500) is up." python3 /root/conf2consul.py /etc/moon/moon.conf @@ -16,10 +18,18 @@ while ! python -c "import socket, sys; s = socket.socket(socket.AF_INET, socket. echo "." done -echo "Manager (http://db:3306) is up." +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 ; @@ -29,5 +39,6 @@ done echo "Manager (http://manager:8082) is up." cd /root -python3 populate_default_values.py -v /root/conf/rbac.py -python3 populate_default_values.py -v /root/conf/mls.py + +python3 populate_default_values.py $populate_args /root/conf/rbac.py +python3 populate_default_values.py $populate_args /root/conf/mls.py -- cgit 1.2.3-korg