From c07e1d128c4dd1cd8a3a5423a9785b8b2e85d9b4 Mon Sep 17 00:00:00 2001 From: Priyanka Jain Date: Thu, 3 May 2018 12:52:04 +0000 Subject: Remove nsPrefix references from consul chart Issue-ID: OOM-1025 Change-Id: Icc05ec5db4580d5264831fd30ff5ec699f945c5f Signed-off-by: Priyanka Jain --- .../scripts/aai-search-storage-write-script.sh | 6 +++--- .../consul-agent-config/scripts/appc-dbhost-script.sh | 4 ++-- .../consul-agent-config/scripts/data-router-script.sh | 4 ++-- .../consul-agent-config/scripts/model-loader-script.sh | 4 ++-- .../config/consul-agent-config/scripts/mr-kafka-health.sh | 4 ++-- .../consul-agent-config/scripts/mr-zookeeper-health.sh | 4 ++-- .../config/consul-agent-config/scripts/mso-api-script.sh | 15 --------------- .../consul-agent-config/scripts/mso-camunda-script.sh | 15 --------------- .../config/consul-agent-config/scripts/mso-jra-script.sh | 15 --------------- .../consul-agent-config/scripts/mso-mariadb-script.sh | 14 -------------- .../config/consul-agent-config/scripts/sdc-be-script.sh | 2 +- .../config/consul-agent-config/scripts/sdc-cs-script.sh | 2 +- .../config/consul-agent-config/scripts/sdc-fe-script.sh | 2 +- .../consul-agent-config/scripts/sdc-titan-script.sh | 2 +- .../consul-agent-config/scripts/sdnc-dbhost-script.sh | 4 ++-- .../scripts/search-data-service-availability.sh | 2 +- .../config/consul-agent-config/scripts/so-api-script.sh | 15 +++++++++++++++ .../consul-agent-config/scripts/so-camunda-script.sh | 15 +++++++++++++++ .../config/consul-agent-config/scripts/so-jra-script.sh | 15 +++++++++++++++ .../consul-agent-config/scripts/so-mariadb-script.sh | 14 ++++++++++++++ .../consul-agent-config/scripts/sparky-be-script.sh | 4 ++-- .../scripts/tabular-db-availability.sh | 2 +- .../consul-agent-config/scripts/vid-mariadb-script.sh | 4 ++-- 23 files changed, 84 insertions(+), 84 deletions(-) delete mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/mso-api-script.sh delete mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/mso-camunda-script.sh delete mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/mso-jra-script.sh delete mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/mso-mariadb-script.sh create mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/so-api-script.sh create mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/so-camunda-script.sh create mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/so-jra-script.sh create mode 100755 kubernetes/consul/resources/config/consul-agent-config/scripts/so-mariadb-script.sh (limited to 'kubernetes/consul/resources/config/consul-agent-config/scripts') diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/aai-search-storage-write-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/aai-search-storage-write-script.sh index 3d26f6e71e..9ee0945d75 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/aai-search-storage-write-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/aai-search-storage-write-script.sh @@ -1,6 +1,6 @@ -if curl -s -X PUT http://aai-elasticsearch.{{ .Values.nsPrefix }}:9200/searchhealth/stats/testwrite -d @/consul/scripts/aai-search-storage-write-doc.txt | grep '\"created\":true'; then - if curl -s -X DELETE http://aai-elasticsearch.{{ .Values.nsPrefix }}:9200/searchhealth/stats/testwrite | grep '\"failed\":0'; then - if curl -s -X GET http://aai-elasticsearch.{{ .Values.nsPrefix }}:9200/searchhealth/stats/testwrite | grep '\"found\":false'; then +if curl -s -X PUT http://aai-elasticsearch:9200/searchhealth/stats/testwrite -d @/consul/scripts/aai-search-storage-write-doc.txt | grep '\"created\":true'; then + if curl -s -X DELETE http://aai-elasticsearch:9200/searchhealth/stats/testwrite | grep '\"failed\":0'; then + if curl -s -X GET http://aai-elasticsearch:9200/searchhealth/stats/testwrite | grep '\"found\":false'; then echo Successful PUT, DELETE, GET from Search Document Storage 2>&1 exit 0 else diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/appc-dbhost-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/appc-dbhost-script.sh index 5f91c5e89c..112809ce43 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/appc-dbhost-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/appc-dbhost-script.sh @@ -1,6 +1,6 @@ -APPC_DBHOST_POD=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "appc-dbhost-[^[:space:]]*") +APPC_DBHOST_POD=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "appc-dbhost-[^[:space:]]*") if [ -n "$APPC_DBHOST_POD" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $APPC_DBHOST_POD -- ./healthcheck.sh |grep -i "mysqld is alive"; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $APPC_DBHOST_POD -- ./healthcheck.sh |grep -i "mysqld is alive"; then echo Success. APPC DBHost is running. 2>&1 exit 0 else diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/data-router-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/data-router-script.sh index 035e7c8a38..c85efc3c17 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/data-router-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/data-router-script.sh @@ -1,8 +1,8 @@ -NAME=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "aai-data-router[^[:space:]]*") +NAME=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "aai-data-router[^[:space:]]*") if [ -n "$NAME" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $NAME -- ps -efww | grep 'java' | grep 'data-router' > /dev/null; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $NAME -- ps -efww | grep 'java' | grep 'data-router' > /dev/null; then echo Success. Synapse process is running. 2>&1 exit 0 diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/model-loader-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/model-loader-script.sh index 9a4b4df28f..a8babec102 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/model-loader-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/model-loader-script.sh @@ -1,8 +1,8 @@ -NAME=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "aai-model-loader[^[:space:]]*") +NAME=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "aai-model-loader[^[:space:]]*") if [ -n "$NAME" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $NAME -- ps -efww | grep 'java' | grep 'model-loader' > /dev/null; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $NAME -- ps -efww | grep 'java' | grep 'model-loader' > /dev/null; then echo Success. Model Loader process is running. 2>&1 exit 0 diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-kafka-health.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-kafka-health.sh index a109032d3b..6630117e92 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-kafka-health.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-kafka-health.sh @@ -1,6 +1,6 @@ -kafkapod=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "message-router-global-kafka-[^[:space:]]*") +kafkapod=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "message-router-global-kafka-[^[:space:]]*") if [ -n "$kafkapod" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $kafkapod -- ps ef | grep -i kafka; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $kafkapod -- ps ef | grep -i kafka; then echo Success. Kafka process is running. 2>&1 exit 0 else diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-zookeeper-health.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-zookeeper-health.sh index 47c42d54ef..fb34057bfc 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-zookeeper-health.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-zookeeper-health.sh @@ -1,6 +1,6 @@ -zkpod=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "message-router-zookeeper-[^[:space:]]*") +zkpod=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "message-router-zookeeper-[^[:space:]]*") if [ -n "$zkpod" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $zkpod -- ps ef | grep -i zookeeper; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $zkpod -- ps ef | grep -i zookeeper; then echo Success. Zookeeper process is running. 2>&1 exit 0 else diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-api-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-api-script.sh deleted file mode 100755 index 8f3f85ce5e..0000000000 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-api-script.sh +++ /dev/null @@ -1,15 +0,0 @@ -## Query the health check API. -HEALTH_CHECK_ENDPOINT="http://mso.{{ .Values.nsPrefix }}:8080/ecomp/mso/infra/healthcheck" -HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) - -READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") - -if [ -n $READY ]; then - echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" - echo "Produces response: $HEALTH_CHECK_RESPONSE" - echo "Application is not in an available state" - return 2 -else - echo "Application is available." - return 0 -fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-camunda-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-camunda-script.sh deleted file mode 100755 index 341ff193e9..0000000000 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-camunda-script.sh +++ /dev/null @@ -1,15 +0,0 @@ -## Query the health check API. -HEALTH_CHECK_ENDPOINT="http://mso.{{ .Values.nsPrefix }}:8080/mso/healthcheck" -HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) - -READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") - -if [ -n $READY ]; then - echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" - echo "Produces response: $HEALTH_CHECK_RESPONSE" - echo "Application is not in an available state" - return 2 -else - echo "Application is available." - return 0 -fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-jra-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-jra-script.sh deleted file mode 100755 index beeb289517..0000000000 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-jra-script.sh +++ /dev/null @@ -1,15 +0,0 @@ -## Query the health check API. -HEALTH_CHECK_ENDPOINT="http://mso.{{ .Values.nsPrefix }}:8080/networks/rest/healthcheck" -HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) - -READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") - -if [ -n $READY ]; then - echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" - echo "Produces response: $HEALTH_CHECK_RESPONSE" - echo "Application is not in an available state" - return 2 -else - echo "Application is available." - return 0 -fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-mariadb-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-mariadb-script.sh deleted file mode 100755 index aa73a73050..0000000000 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/mso-mariadb-script.sh +++ /dev/null @@ -1,14 +0,0 @@ -NAME=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "mso-mariadb[^[:space:]]*") - - if [ -n "$NAME" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $NAME -- bash -c 'mysqladmin status -u root -p$MYSQL_ROOT_PASSWORD' > /dev/null; then - echo Success. mariadb process is running. 2>&1 - exit 0 - else - echo Failed. mariadb process is not running. 2>&1 - exit 1 - fi - else - echo Failed. mariadb container is offline. 2>&1 - exit 1 - fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-be-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-be-script.sh index 00a05648d3..f007e62226 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-be-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-be-script.sh @@ -1,5 +1,5 @@ ## Query the health check API. -HEALTH_CHECK_ENDPOINT="http://sdc-fe.{{ .Values.nsPrefix }}:8181/sdc1/rest/healthCheck" +HEALTH_CHECK_ENDPOINT="http://sdc-fe:8181/sdc1/rest/healthCheck" HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) ## Strip out the ON_BOARDING section from the response XML (otherwise we will diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-cs-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-cs-script.sh index 9950cc9fdf..a9ba31a266 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-cs-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-cs-script.sh @@ -1,5 +1,5 @@ ## Query the health check API. -HEALTH_CHECK_ENDPOINT="http://sdc-fe.{{ .Values.nsPrefix }}:8181/sdc1/rest/healthCheck" +HEALTH_CHECK_ENDPOINT="http://sdc-fe:8181/sdc1/rest/healthCheck" HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) ## Strip out the ON_BOARDING section from the response XML (otherwise we will diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-fe-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-fe-script.sh index 27f3b224c6..4e3664ba73 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-fe-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-fe-script.sh @@ -1,5 +1,5 @@ ## Query the health check API. -HEALTH_CHECK_ENDPOINT="http://sdc-fe.{{ .Values.nsPrefix }}:8181/sdc1/rest/healthCheck" +HEALTH_CHECK_ENDPOINT="http://sdc-fe:8181/sdc1/rest/healthCheck" HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) ## Strip out the ON_BOARDING section from the response XML (otherwise we will diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-titan-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-titan-script.sh index c5955f3be3..85fc4319ff 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-titan-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdc-titan-script.sh @@ -1,5 +1,5 @@ ## Query the health check API. -HEALTH_CHECK_ENDPOINT="http://sdc-fe.{{ .Values.nsPrefix }}:8181/sdc1/rest/healthCheck" +HEALTH_CHECK_ENDPOINT="http://sdc-fe:8181/sdc1/rest/healthCheck" HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) ## Strip out the ON_BOARDING section from the response XML (otherwise we will diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdnc-dbhost-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdnc-dbhost-script.sh index 27b9b9f608..74064816a2 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/sdnc-dbhost-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/sdnc-dbhost-script.sh @@ -1,6 +1,6 @@ -SDNC_DBHOST_POD=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "sdnc-dbhost-[^[:space:]]*") +SDNC_DBHOST_POD=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "sdnc-dbhost-[^[:space:]]*") if [ -n "$SDNC_DBHOST_POD" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $SDNC_DBHOST_POD -- ./healthcheck.sh |grep -i "mysqld is alive"; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $SDNC_DBHOST_POD -- ./healthcheck.sh |grep -i "mysqld is alive"; then echo Success. SDNC DBHost is running. 2>&1 exit 0 else diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/search-data-service-availability.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/search-data-service-availability.sh index d5118736cd..12bf9bf061 100644 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/search-data-service-availability.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/search-data-service-availability.sh @@ -1,6 +1,6 @@ #!/bin/sh -SEARCH_SERVICE_NAME="search-data-service.{{ .Values.nsPrefix }}" +SEARCH_SERVICE_NAME="search-data-service.{{ include "common.namespace" . }}" SEARCH_SERVICE_PORT=9509 HEALTH_CHECK_INDEX="healthcheck" diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/so-api-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-api-script.sh new file mode 100755 index 0000000000..047d2cb6f1 --- /dev/null +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-api-script.sh @@ -0,0 +1,15 @@ +## Query the health check API. +HEALTH_CHECK_ENDPOINT="http://so:8080/ecomp/mso/infra/healthcheck" +HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) + +READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") + +if [ -n $READY ]; then + echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" + echo "Produces response: $HEALTH_CHECK_RESPONSE" + echo "Application is not in an available state" + return 2 +else + echo "Application is available." + return 0 +fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/so-camunda-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-camunda-script.sh new file mode 100755 index 0000000000..9ad3ffc5cf --- /dev/null +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-camunda-script.sh @@ -0,0 +1,15 @@ +## Query the health check API. +HEALTH_CHECK_ENDPOINT="http://so:8080/mso/healthcheck" +HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) + +READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") + +if [ -n $READY ]; then + echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" + echo "Produces response: $HEALTH_CHECK_RESPONSE" + echo "Application is not in an available state" + return 2 +else + echo "Application is available." + return 0 +fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/so-jra-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-jra-script.sh new file mode 100755 index 0000000000..96d9c7a765 --- /dev/null +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-jra-script.sh @@ -0,0 +1,15 @@ +## Query the health check API. +HEALTH_CHECK_ENDPOINT="http://so:8080/networks/rest/healthcheck" +HEALTH_CHECK_RESPONSE=$(curl -s $HEALTH_CHECK_ENDPOINT) + +READY=$(echo $HEALTH_CHECK_RESPONSE | grep "Application ready") + +if [ -n $READY ]; then + echo "Query against health check endpoint: $HEALTH_CHECK_ENDPOINT" + echo "Produces response: $HEALTH_CHECK_RESPONSE" + echo "Application is not in an available state" + return 2 +else + echo "Application is available." + return 0 +fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/so-mariadb-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-mariadb-script.sh new file mode 100755 index 0000000000..a80a790377 --- /dev/null +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/so-mariadb-script.sh @@ -0,0 +1,14 @@ +NAME=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "so-db[^[:space:]]*") + + if [ -n "$NAME" ]; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $NAME -- bash -c 'mysqladmin status -u root -p$MYSQL_ROOT_PASSWORD' > /dev/null; then + echo Success. mariadb process is running. 2>&1 + exit 0 + else + echo Failed. mariadb process is not running. 2>&1 + exit 1 + fi + else + echo Failed. mariadb container is offline. 2>&1 + exit 1 + fi diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/sparky-be-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/sparky-be-script.sh index 7796681902..15175aa80f 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/sparky-be-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/sparky-be-script.sh @@ -1,8 +1,8 @@ -NAME=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "aai-sparky-be[^[:space:]]*") +NAME=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "aai-sparky-be[^[:space:]]*") if [ -n "$NAME" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $NAME -- ps -efww | grep 'java' | grep 'sparky' > /dev/null; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $NAME -- ps -efww | grep 'java' | grep 'sparky' > /dev/null; then echo Success. UI Backend Service process is running. 2>&1 exit 0 diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/tabular-db-availability.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/tabular-db-availability.sh index dc7768fc6e..fe21db504b 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/tabular-db-availability.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/tabular-db-availability.sh @@ -1,6 +1,6 @@ # Query the Hbase service for the cluster status. -GET_CLUSTER_STATUS_RESPONSE=$(curl -si -X GET -H "Accept: text/xml" http://hbase.{{ .Values.nsPrefix }}:8080/status/cluster) +GET_CLUSTER_STATUS_RESPONSE=$(curl -si -X GET -H "Accept: text/xml" http://hbase:8080/status/cluster) if [ -z "$GET_CLUSTER_STATUS_RESPONSE" ]; then echo "Tabular store is unreachable." diff --git a/kubernetes/consul/resources/config/consul-agent-config/scripts/vid-mariadb-script.sh b/kubernetes/consul/resources/config/consul-agent-config/scripts/vid-mariadb-script.sh index bbb080f44d..bc250113aa 100755 --- a/kubernetes/consul/resources/config/consul-agent-config/scripts/vid-mariadb-script.sh +++ b/kubernetes/consul/resources/config/consul-agent-config/scripts/vid-mariadb-script.sh @@ -1,7 +1,7 @@ -NAME=$(/consul/bin/kubectl -n {{ .Values.nsPrefix }} get pod | grep -o "vid-mariadb[^[:space:]]*") +NAME=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "vid-mariadb[^[:space:]]*") if [ -n "$NAME" ]; then - if /consul/bin/kubectl -n {{ .Values.nsPrefix }} exec -it $NAME -- bash -c 'mysqladmin status -u root -p$MYSQL_ROOT_PASSWORD' > /dev/null; then + if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $NAME -- bash -c 'mysqladmin status -u root -p$MYSQL_ROOT_PASSWORD' > /dev/null; then echo Success. mariadb process is running. 2>&1 exit 0 else -- cgit 1.2.3-korg