X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-aux%2Fhelm%2Fmc-stack%2Fcharts%2Felasticsearch%2Fexamples%2Fdefault%2Frolling_upgrade.sh;fp=ric-aux%2Fhelm%2Fmc-stack%2Fcharts%2Felasticsearch%2Fexamples%2Fdefault%2Frolling_upgrade.sh;h=c5a2a887ba5fef0a6b02427aa609c4af5a6f2f2a;hb=dc00cdf008775e2ac5dddb186d1eb81e80370b69;hp=0000000000000000000000000000000000000000;hpb=ca9b3ee64b3966fa1d20226b361b4f614434129e;p=it%2Fdep.git diff --git a/ric-aux/helm/mc-stack/charts/elasticsearch/examples/default/rolling_upgrade.sh b/ric-aux/helm/mc-stack/charts/elasticsearch/examples/default/rolling_upgrade.sh new file mode 100755 index 00000000..c5a2a887 --- /dev/null +++ b/ric-aux/helm/mc-stack/charts/elasticsearch/examples/default/rolling_upgrade.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash -x + +kubectl proxy || true & + +make & +PROC_ID=$! + +while kill -0 "$PROC_ID" >/dev/null 2>&1; do + echo "PROCESS IS RUNNING" + if curl --fail 'http://localhost:8001/api/v1/proxy/namespaces/default/services/elasticsearch-master:9200/_search' ; then + echo "cluster is healthy" + else + echo "cluster not healthy!" + exit 1 + fi + sleep 1 +done +echo "PROCESS TERMINATED" +exit 0