diff options
Diffstat (limited to 'plans/policy/api')
-rw-r--r-- | plans/policy/api/setup.sh | 27 | ||||
-rwxr-xr-x | plans/policy/api/teardown.sh | 1 |
2 files changed, 9 insertions, 19 deletions
diff --git a/plans/policy/api/setup.sh b/plans/policy/api/setup.sh index a29254a5..6168085e 100644 --- a/plans/policy/api/setup.sh +++ b/plans/policy/api/setup.sh @@ -24,8 +24,15 @@ pip install -U docker==2.7.0 # Adding this waiting container to avoid race condition between api and mariadb containers. docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-api.yml run --rm start_dependencies -docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-api.yml up -d -sleep 3 + +#Configure the database +docker exec -it mariadb chmod +x /docker-entrypoint-initdb.d/db.sh +docker exec -it mariadb /docker-entrypoint-initdb.d/db.sh + +# now bring everything else up +docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-api.yml run --rm start_all + +unset http_proxy https_proxy POLICY_API_IP=`get-instance-ip.sh policy-api` MARIADB_IP=`get-instance-ip.sh mariadb` @@ -33,20 +40,4 @@ MARIADB_IP=`get-instance-ip.sh mariadb` echo API IP IS ${POLICY_API_IP} echo MARIADB IP IS ${MARIADB_IP} -# Wait for initialization -for i in {1..10}; do - curl -sS ${MARIADB_IP}:3306 && break - echo sleep $i - sleep $i -done -for i in {1..10}; do - curl -sS ${POLICY_API_IP}:6969 && break - echo sleep $i - sleep $i -done - -#Configure the database -docker exec -it mariadb chmod +x /docker-entrypoint-initdb.d/db.sh -docker exec -it mariadb /docker-entrypoint-initdb.d/db.sh - ROBOT_VARIABLES="-v POLICY_API_IP:${POLICY_API_IP}" diff --git a/plans/policy/api/teardown.sh b/plans/policy/api/teardown.sh index fc82dfa7..0572e034 100755 --- a/plans/policy/api/teardown.sh +++ b/plans/policy/api/teardown.sh @@ -19,4 +19,3 @@ kill-instance.sh policy-api kill-instance.sh mariadb -kill-instance.sh policy-wait |