From b459b8aae9bdf0e13a3985079974085662576c5a Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 18 Feb 2020 12:26:43 +0100 Subject: [PATCH] Add supported versions to nats tests (#16317) Add a common entry point to nats docker images so we can use the same docker compose and Dockerfile. Add supported-versions.yml for nats service. Add support for 2.1.4. (cherry picked from commit 46cf3ddcfa2b2d9096ad43f6ad6bf457733a4827) --- CHANGELOG.next.asciidoc | 1 + metricbeat/docs/modules/nats.asciidoc | 2 +- .../_meta/{Dockerfile.2.0.X => Dockerfile} | 7 +++---- metricbeat/module/nats/_meta/Dockerfile.1.3 | 14 -------------- metricbeat/module/nats/_meta/docs.asciidoc | 2 +- metricbeat/module/nats/_meta/run.sh | 18 ++++++++++++++++++ .../module/nats/_meta/supported-versions.yml | 4 ++++ metricbeat/module/nats/docker-compose.yml | 13 +------------ metricbeat/module/nats/test_nats.py | 6 +----- 9 files changed, 30 insertions(+), 37 deletions(-) rename metricbeat/module/nats/_meta/{Dockerfile.2.0.X => Dockerfile} (71%) delete mode 100644 metricbeat/module/nats/_meta/Dockerfile.1.3 create mode 100755 metricbeat/module/nats/_meta/run.sh create mode 100644 metricbeat/module/nats/_meta/supported-versions.yml diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index f9523725fd7c..e3af56927e62 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -232,6 +232,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add collecting AuroraDB metrics in rds metricset. {issue}14142[14142] {pull}16004[16004] - Reuse connections in SQL module. {pull}16001[16001] - Improve the `logstash` module (when `xpack.enabled` is set to `true`) to use the override `cluster_uuid` returned by Logstash APIs. {issue}15772[15772] {pull}15795[15795] +- Add support for NATS 2.1. {pull}16317[16317] *Packetbeat* diff --git a/metricbeat/docs/modules/nats.asciidoc b/metricbeat/docs/modules/nats.asciidoc index 75b3b8a33062..df5c6508fc78 100644 --- a/metricbeat/docs/modules/nats.asciidoc +++ b/metricbeat/docs/modules/nats.asciidoc @@ -12,7 +12,7 @@ The default metricsets are `stats`, `connections`, `routes` and `subscriptions`. [float] === Compatibility -The Nats module is tested with Nats 1.3.0 and 2.0.4 +The Nats module is tested with Nats 1.3.0, 2.0.4 and 2.1.4 [float] diff --git a/metricbeat/module/nats/_meta/Dockerfile.2.0.X b/metricbeat/module/nats/_meta/Dockerfile similarity index 71% rename from metricbeat/module/nats/_meta/Dockerfile.2.0.X rename to metricbeat/module/nats/_meta/Dockerfile index 84c571893198..f846c9689732 100644 --- a/metricbeat/module/nats/_meta/Dockerfile.2.0.X +++ b/metricbeat/module/nats/_meta/Dockerfile @@ -4,11 +4,10 @@ FROM nats:$NATS_VERSION # create an enhanced container with nc command available since nats is based # on scratch image making healthcheck impossible FROM alpine:latest -COPY --from=0 /nats-server /nats-server -COPY --from=0 nats-server.conf nats-server.conf +COPY --from=0 / /opt/nats +COPY run.sh /run.sh # Expose client, management, and cluster ports EXPOSE 4222 8222 6222 HEALTHCHECK --interval=1s --retries=10 CMD nc -w 1 0.0.0.0 8222