update template files 05/32805/1
authorYuli Shlosberg <ys9693@att.com>
Sun, 25 Feb 2018 14:03:45 +0000 (16:03 +0200)
committerYuli Shlosberg <ys9693@att.com>
Sun, 25 Feb 2018 14:04:06 +0000 (16:04 +0200)
Change-Id: I495fcb8c6cfced09a921834f2ea730b519f453db
Issue-ID: SDC-920
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb
catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb
sdc-os-chef/scripts/docker_run.sh

index 5239e9b..26f7266 100644 (file)
@@ -1,6 +1,8 @@
 #!/bin/bash
 
-health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' http://localhost:8080/sdc2/rest/healthCheck)
+set -x
+
+health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' http://127.0.0.1:8080/sdc2/rest/healthCheck)
 if [[ "$health_Check_http_code" -eq 500 ]]; then
    exit 200
 else
index b5cbb14..d743900 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' http://localhost:8181/sdc1/rest/healthCheck)
+health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' http://127.0.0.1:8181/sdc1/rest/healthCheck)
 if [[ "$health_Check_http_code" -eq 500 ]]; then
    exit 200
 else
index bb74276..9fd6047 100755 (executable)
@@ -37,6 +37,7 @@ function dir_perms {
     mkdir -p ${WORKSPACE}/data/logs/FE/SDC/SDC-FE
     chmod -R 777 ${WORKSPACE}/data/logs
 }
+
 function probe_cs {
 
 cs_stat=false
@@ -125,6 +126,8 @@ function monitor_docker {
         TIME=$(($TIME+$INTERVAL))
     done
 
+    docker logs $1 > ${WORKSPACE}/data/logs/$1_docker.log
+
     if [ "$TIME" -ge "$TIME_OUT" ]; then
         echo -e "\e[1;31mTIME OUT: DOCKER was NOT fully started in $TIME_OUT seconds... Could cause problems ...\e[0m"
     fi
@@ -140,7 +143,7 @@ function healthCheck {
        echo ""
        echo ""
        echo "FE health-Check:"
-       curl http://${IP}:8181/sdc1/rest/healthCheck
+       curl http://127.0.0.1:8181/sdc1/rest/healthCheck
 
 
        echo ""