From 88d3cbbae08fcdb0ecb08939dcd39ba34697dc65 Mon Sep 17 00:00:00 2001 From: chrismark Date: Fri, 20 Nov 2020 12:50:49 +0200 Subject: [PATCH 1/5] Bump up stack version to 7.10 for testing envs Signed-off-by: chrismark --- metricbeat/docker-compose.yml | 12 ++++++------ metricbeat/module/logstash/docker-compose.yml | 8 ++++---- testing/environments/latest.yml | 6 +++--- x-pack/metricbeat/docker-compose.yml | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/metricbeat/docker-compose.yml b/metricbeat/docker-compose.yml index bb39912eefbd..b8b57664e509 100644 --- a/metricbeat/docker-compose.yml +++ b/metricbeat/docker-compose.yml @@ -15,11 +15,11 @@ services: # Used by base tests elasticsearch: - image: docker.elastic.co/integrations-ci/beats-elasticsearch:${ELASTICSEARCH_VERSION:-7.9.0}-1 + image: docker.elastic.co/integrations-ci/beats-elasticsearch:${ELASTICSEARCH_VERSION:-7.10.0}-1 build: context: ./module/elasticsearch/_meta args: - ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-7.9.0} + ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-7.10.0} environment: - "ES_JAVA_OPTS=-Xms256m -Xmx256m" - "network.host=" @@ -37,11 +37,11 @@ services: # Used by base tests kibana: - image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.9.0}-1 + image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-1 build: context: ./module/kibana/_meta args: - KIBANA_VERSION: ${KIBANA_VERSION:-7.9.0} + KIBANA_VERSION: ${KIBANA_VERSION:-7.10.0} depends_on: - elasticsearch ports: @@ -49,11 +49,11 @@ services: # Used by base tests metricbeat: - image: docker.elastic.co/integrations-ci/beats-metricbeat:${BEAT_VERSION:-7.9.0}-1 + image: docker.elastic.co/integrations-ci/beats-metricbeat:${BEAT_VERSION:-7.10.0}-1 build: context: ./module/beat/_meta args: - BEAT_VERSION: ${BEAT_VERSION:-7.9.0} + BEAT_VERSION: ${BEAT_VERSION:-7.10.0} command: '-e' ports: - 5066 diff --git a/metricbeat/module/logstash/docker-compose.yml b/metricbeat/module/logstash/docker-compose.yml index a776d6d4b665..26b6608c01cd 100644 --- a/metricbeat/module/logstash/docker-compose.yml +++ b/metricbeat/module/logstash/docker-compose.yml @@ -2,22 +2,22 @@ version: '2.3' services: logstash: - image: docker.elastic.co/integrations-ci/beats-logstash:${LOGSTASH_VERSION:-7.9.0}-1 + image: docker.elastic.co/integrations-ci/beats-logstash:${LOGSTASH_VERSION:-7.10.0}-1 build: context: ./_meta args: - LOGSTASH_VERSION: ${LOGSTASH_VERSION:-7.9.0} + LOGSTASH_VERSION: ${LOGSTASH_VERSION:-7.10.0} ports: - 9600 depends_on: - elasticsearch elasticsearch: - image: docker.elastic.co/integrations-ci/beats-elasticsearch:${ELASTICSEARCH_VERSION:-7.9.0}-1 + image: docker.elastic.co/integrations-ci/beats-elasticsearch:${ELASTICSEARCH_VERSION:-7.10.0}-1 build: context: ../elasticsearch/_meta args: - ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-7.9.0} + ELASTICSEARCH_VERSION: ${ELASTICSEARCH_VERSION:-7.10.0} environment: - "network.host=" - "transport.host=127.0.0.1" diff --git a/testing/environments/latest.yml b/testing/environments/latest.yml index 59dde477bedf..43c3ec2d7a14 100644 --- a/testing/environments/latest.yml +++ b/testing/environments/latest.yml @@ -3,7 +3,7 @@ version: '2.3' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.9.0 + image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0 healthcheck: test: ["CMD-SHELL", "curl -s http://localhost:9200/_cat/health?h=status | grep -q green"] retries: 300 @@ -16,7 +16,7 @@ services: - "xpack.security.enabled=false" logstash: - image: docker.elastic.co/logstash/logstash:7.9.0 + image: docker.elastic.co/logstash/logstash:7.10.0 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9600/_node/stats"] retries: 300 @@ -26,7 +26,7 @@ services: - ./docker/logstash/pki:/etc/pki:ro kibana: - image: docker.elastic.co/kibana/kibana:7.9.0 + image: docker.elastic.co/kibana/kibana:7.10.0 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5601"] retries: 300 diff --git a/x-pack/metricbeat/docker-compose.yml b/x-pack/metricbeat/docker-compose.yml index ad95961aadae..f026d2cc7cf2 100644 --- a/x-pack/metricbeat/docker-compose.yml +++ b/x-pack/metricbeat/docker-compose.yml @@ -24,11 +24,11 @@ services: kibana: # Copied configuration from OSS metricbeat because services with depends_on # cannot be extended with extends - image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.9.0}-1 + image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-1 build: context: ../../metricbeat/module/kibana/_meta args: - KIBANA_VERSION: ${KIBANA_VERSION:-7.9.0} + KIBANA_VERSION: ${KIBANA_VERSION:-7.10.0} depends_on: - elasticsearch ports: From 2266dc3e26f8b3e4e6b1e3b8dded786df25fb5de Mon Sep 17 00:00:00 2001 From: chrismark Date: Fri, 20 Nov 2020 18:03:06 +0200 Subject: [PATCH 2/5] fix healthecheck Signed-off-by: chrismark --- metricbeat/docker-compose.yml | 2 +- metricbeat/module/kibana/_meta/Dockerfile | 5 +++-- x-pack/metricbeat/docker-compose.yml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/metricbeat/docker-compose.yml b/metricbeat/docker-compose.yml index b8b57664e509..f28aeb1d7faa 100644 --- a/metricbeat/docker-compose.yml +++ b/metricbeat/docker-compose.yml @@ -37,7 +37,7 @@ services: # Used by base tests kibana: - image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-1 + image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-2 build: context: ./module/kibana/_meta args: diff --git a/metricbeat/module/kibana/_meta/Dockerfile b/metricbeat/module/kibana/_meta/Dockerfile index 850f34e63910..06248881c38d 100644 --- a/metricbeat/module/kibana/_meta/Dockerfile +++ b/metricbeat/module/kibana/_meta/Dockerfile @@ -1,4 +1,5 @@ ARG KIBANA_VERSION FROM docker.elastic.co/kibana/kibana:${KIBANA_VERSION} -HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD python -c 'import urllib, json; response = urllib.urlopen("http://myelastic:changeme@localhost:5601/api/status"); data = json.loads(response.read()); exit(1) if data["status"]["overall"]["state"] != "green" else exit(0);' - +RUN curl https://stedolan.github.io/jq/download/linux64/jq > /usr/share/kibana/jq +RUN chmod +x jq +HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD if [ $(curl -s http://myelastic:changeme@localhost:5601/api/status > status && cat status | ./jq ".status.overall.state") == '"green"' ]; then exit 0; else exit 1; fi diff --git a/x-pack/metricbeat/docker-compose.yml b/x-pack/metricbeat/docker-compose.yml index f026d2cc7cf2..dff2dcaaf563 100644 --- a/x-pack/metricbeat/docker-compose.yml +++ b/x-pack/metricbeat/docker-compose.yml @@ -24,7 +24,7 @@ services: kibana: # Copied configuration from OSS metricbeat because services with depends_on # cannot be extended with extends - image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-1 + image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-2 build: context: ../../metricbeat/module/kibana/_meta args: From 1590dfeeeb3dc36b747bca08a3f69e5a1ef2f479 Mon Sep 17 00:00:00 2001 From: chrismark Date: Mon, 23 Nov 2020 11:42:09 +0200 Subject: [PATCH 3/5] Change Kibana healthcheck Signed-off-by: chrismark --- metricbeat/module/kibana/_meta/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/metricbeat/module/kibana/_meta/Dockerfile b/metricbeat/module/kibana/_meta/Dockerfile index 06248881c38d..f42844f12a58 100644 --- a/metricbeat/module/kibana/_meta/Dockerfile +++ b/metricbeat/module/kibana/_meta/Dockerfile @@ -1,5 +1,3 @@ ARG KIBANA_VERSION FROM docker.elastic.co/kibana/kibana:${KIBANA_VERSION} -RUN curl https://stedolan.github.io/jq/download/linux64/jq > /usr/share/kibana/jq -RUN chmod +x jq -HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD if [ $(curl -s http://myelastic:changeme@localhost:5601/api/status > status && cat status | ./jq ".status.overall.state") == '"green"' ]; then exit 0; else exit 1; fi +HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD curl -u myelastic:changeme -f http://localhost:5601/api/status | grep -q 'Looking good' From 768942d8a9cafcff9935a12db129c8e5ce123415 Mon Sep 17 00:00:00 2001 From: chrismark Date: Mon, 23 Nov 2020 11:43:45 +0200 Subject: [PATCH 4/5] fix image version Signed-off-by: chrismark --- metricbeat/docker-compose.yml | 2 +- x-pack/metricbeat/docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metricbeat/docker-compose.yml b/metricbeat/docker-compose.yml index f28aeb1d7faa..b8b57664e509 100644 --- a/metricbeat/docker-compose.yml +++ b/metricbeat/docker-compose.yml @@ -37,7 +37,7 @@ services: # Used by base tests kibana: - image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-2 + image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-1 build: context: ./module/kibana/_meta args: diff --git a/x-pack/metricbeat/docker-compose.yml b/x-pack/metricbeat/docker-compose.yml index dff2dcaaf563..f026d2cc7cf2 100644 --- a/x-pack/metricbeat/docker-compose.yml +++ b/x-pack/metricbeat/docker-compose.yml @@ -24,7 +24,7 @@ services: kibana: # Copied configuration from OSS metricbeat because services with depends_on # cannot be extended with extends - image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-2 + image: docker.elastic.co/integrations-ci/beats-kibana:${KIBANA_VERSION:-7.10.0}-1 build: context: ../../metricbeat/module/kibana/_meta args: From f2061af4ac74400037d0a430b568c8c37fd3d965 Mon Sep 17 00:00:00 2001 From: chrismark Date: Mon, 23 Nov 2020 14:20:45 +0200 Subject: [PATCH 5/5] Fix healthcheck Signed-off-by: chrismark --- metricbeat/module/kibana/_meta/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metricbeat/module/kibana/_meta/Dockerfile b/metricbeat/module/kibana/_meta/Dockerfile index f42844f12a58..1c34cfd06816 100644 --- a/metricbeat/module/kibana/_meta/Dockerfile +++ b/metricbeat/module/kibana/_meta/Dockerfile @@ -1,3 +1,3 @@ ARG KIBANA_VERSION FROM docker.elastic.co/kibana/kibana:${KIBANA_VERSION} -HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD curl -u myelastic:changeme -f http://localhost:5601/api/status | grep -q 'Looking good' +HEALTHCHECK --interval=1s --retries=300 --start-period=60s CMD curl -u myelastic:changeme -f "http://localhost:5601/api/stats?extended=true&legacy=true&exclude_usage=false" | grep '"status":"green"'