diff options
author | Yuli Shlosberg <ys9693@att.com> | 2018-02-22 15:34:36 +0200 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2018-02-22 15:34:36 +0200 |
commit | 22651a4cbe7bdec5e17f48b4c8f1efeaaaf70754 (patch) | |
tree | fa4a395f175778cbe40ea050a35acb470c3dee41 /sdc-os-chef/scripts | |
parent | 958c32d2d7a3e5cbd9bc672645cdeb95a49b719a (diff) |
fix docker_run script
Change-Id: I4080fc9ffdbb95b6c6b1fdd10658f9278a6e9ec2
Issue-ID: SDC-918
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'sdc-os-chef/scripts')
-rwxr-xr-x | sdc-os-chef/scripts/docker_run.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh index 5da9a7ff4e..bb742765b8 100755 --- a/sdc-os-chef/scripts/docker_run.sh +++ b/sdc-os-chef/scripts/docker_run.sh @@ -25,7 +25,7 @@ function cleanup { else echo "performing $1 docker cleanup" tmp=`docker ps -a -q --filter="name=$1"` - if [[ ! -z "$tmp" ]]; then + if [[ ! -z "$tmp" ]]; then docker rm -f ${tmp} fi fi @@ -76,7 +76,7 @@ fi function probe_es { es_stat=false -health_Check_http_code=$(curl -o /dev/null -w '%{http_code}' http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=120s) +health_Check_http_code=$(curl -o /dev/null -w '%{http_code}' http://${IP}:9200/_cluster/health?wait_for_status=yellow&timeout=120s) if [[ "$health_Check_http_code" -eq 200 ]] then echo DOCKER start finished in $2 seconds @@ -132,20 +132,20 @@ function monitor_docker { } function healthCheck { - curl localhost:9200/_cluster/health?pretty=true + curl ${IP}:9200/_cluster/health?pretty=true echo "BE health-Check:" - curl http://localhost:8080/sdc2/rest/healthCheck + curl http://${IP}:8080/sdc2/rest/healthCheck echo "" echo "" echo "FE health-Check:" - curl http://localhost:8181/sdc1/rest/healthCheck + curl http://${IP}:8181/sdc1/rest/healthCheck echo "" echo "" - healthCheck_http_code=$(curl -o /dev/null -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://localhost:8080/sdc2/rest/v1/user/demo;) + healthCheck_http_code=$(curl -o /dev/null -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://${IP}:8080/sdc2/rest/v1/user/demo;) if [[ ${healthCheck_http_code} != 200 ]] then echo "Error [${healthCheck_http_code}] while user existance check" @@ -177,7 +177,7 @@ function elasticHealthCheck { exit ${healthCheck_http_code} fi echo "ES started correctly" - curl localhost:9200/_cluster/health?pretty=true + curl ${IP}:9200/_cluster/health?pretty=true return ${healthCheck_http_code} } @@ -383,4 +383,4 @@ else fi # healthCheck -healthCheck
\ No newline at end of file +healthCheck |