diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-12 06:09:05 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-12 06:09:05 +0000 |
commit | 8c9dc985b90c353b33cb829caf51f8320171bc15 (patch) | |
tree | 9a68886dbea1aefabddb46bbd3faf961eab22ae6 /vendor/elastic_stack | |
parent | 500626a5c953ad81cfc3ed74bf0148c075617e58 (diff) | |
download | gitlab-ce-8c9dc985b90c353b33cb829caf51f8320171bc15.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'vendor/elastic_stack')
-rw-r--r-- | vendor/elastic_stack/values.yaml | 2 | ||||
-rwxr-xr-x | vendor/elastic_stack/wait-for-elasticsearch.sh | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/vendor/elastic_stack/values.yaml b/vendor/elastic_stack/values.yaml index 8b71e5b2c2c..9355a9b6b81 100644 --- a/vendor/elastic_stack/values.yaml +++ b/vendor/elastic_stack/values.yaml @@ -8,7 +8,7 @@ elasticsearch: client: replicas: 1 data: - replicas: 1 + replicas: 2 kibana: enabled: false diff --git a/vendor/elastic_stack/wait-for-elasticsearch.sh b/vendor/elastic_stack/wait-for-elasticsearch.sh new file mode 100755 index 00000000000..1423af2e10b --- /dev/null +++ b/vendor/elastic_stack/wait-for-elasticsearch.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# http://redsymbol.net/articles/unofficial-bash-strict-mode/ +IFS=$'\n\t' +set -euo pipefail + +HOST="$1" + +printf 'Waiting for ES to be reachable ...' +until $(wget -O- -q "$HOST" &>/dev/null); do + printf '.' + sleep 1 +done +echo " OK!" + +printf 'Waiting for ES to be healthy ...' +while : ; do + HEALTH="$(wget -O- -q "$HOST/_cat/health?h=status" 2> /dev/null)" + HEALTH="$(echo "$HEALTH" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "green ") + ([ "$HEALTH" != "green" ] && printf '.' && sleep 1) || break +done +echo " OK!" + +echo "Elastic Search is up!" |