Skip to content

Commit

Permalink
[ITs] change healthcheck for elasticsearch (#20514)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Aug 11, 2020
1 parent a58ec5a commit 6892234
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions libbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,13 @@ services:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]

test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
elasticsearchssl:
extends:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD", "curl", "-u", "admin:changeme", "-f", "https://localhost:9200", "--insecure"]
test: ["CMD-SHELL", "curl -u admin:changeme -f http://localhost:9200/_cat/health?h=status --insecure | grep -q green"]
retries: 1200
interval: 5s
start_period: 60s
Expand Down
2 changes: 1 addition & 1 deletion testing/environments/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
interval: 1s
environment:
Expand Down
2 changes: 1 addition & 1 deletion testing/environments/snapshot-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:8.0.0-SNAPSHOT
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
interval: 1s
environment:
Expand Down
2 changes: 1 addition & 1 deletion testing/environments/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 300
interval: 1s
environment:
Expand Down
2 changes: 1 addition & 1 deletion x-pack/libbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
file: ${ES_BEATS}/testing/environments/${TESTING_ENVIRONMENT}.yml
service: elasticsearch
healthcheck:
test: ["CMD-SHELL", "curl http://myelastic:changeme@localhost:9200/_cat/health?h=status | grep -q green"]
test: ["CMD-SHELL", "curl -u myelastic:changeme -f http://localhost:9200/_cat/health?h=status | grep -q green"]
retries: 1200
interval: 5s
start_period: 60s
Expand Down

0 comments on commit 6892234

Please sign in to comment.