From 56d17d225dc967b1d0058e8e20bf311c3c908a70 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Fri, 12 Apr 2024 14:27:52 -1000 Subject: [PATCH 1/3] docker: fix cassandra pip install and bump all images Signed-off-by: Adrian Cole --- .../zipkin2/server/ServerIntegratedBenchmark.java | 12 ++++++------ docker/examples/docker-compose-prometheus.yml | 6 +++--- docker/test-images/zipkin-activemq/Dockerfile | 4 ++-- docker/test-images/zipkin-cassandra/install.sh | 5 +++-- docker/test-images/zipkin-elasticsearch7/Dockerfile | 4 ++-- docker/test-images/zipkin-elasticsearch8/Dockerfile | 4 ++-- docker/test-images/zipkin-eureka/pom.xml | 6 +++--- docker/test-images/zipkin-mysql/Dockerfile | 2 +- docker/test-images/zipkin-rabbitmq/Dockerfile | 2 +- .../collector/activemq/ActiveMQExtension.java | 2 +- .../java/zipkin2/collector/kafka/KafkaExtension.java | 2 +- .../collector/rabbitmq/RabbitMQExtension.java | 2 +- .../server/internal/eureka/BaseITZipkinEureka.java | 2 +- .../storage/cassandra/CassandraContainer.java | 2 +- .../integration/ElasticsearchExtension.java | 2 +- .../zipkin2/storage/mysql/v1/MySQLExtension.java | 2 +- 16 files changed, 30 insertions(+), 29 deletions(-) diff --git a/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java b/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java index 250f905f0d..08c0a5896b 100644 --- a/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java +++ b/benchmarks/src/test/java/zipkin2/server/ServerIntegratedBenchmark.java @@ -81,7 +81,7 @@ class ServerIntegratedBenchmark { @Test void elasticsearch() throws Exception { GenericContainer elasticsearch = - new GenericContainer<>(parse("ghcr.io/openzipkin/zipkin-elasticsearch7:3.1.0")) + new GenericContainer<>(parse("ghcr.io/openzipkin/zipkin-elasticsearch7:3.1.1")) .withNetwork(Network.SHARED) .withNetworkAliases("elasticsearch") .withLabel("name", "elasticsearch") @@ -95,7 +95,7 @@ class ServerIntegratedBenchmark { @Test void cassandra3() throws Exception { GenericContainer cassandra = - new GenericContainer<>(parse("ghcr.io/openzipkin/zipkin-cassandra:3.1.0")) + new GenericContainer<>(parse("ghcr.io/openzipkin/zipkin-cassandra:3.1.1")) .withNetwork(Network.SHARED) .withNetworkAliases("cassandra") .withLabel("name", "cassandra") @@ -109,7 +109,7 @@ class ServerIntegratedBenchmark { @Test void mysql() throws Exception { GenericContainer mysql = - new GenericContainer<>(parse("ghcr.io/openzipkin/zipkin-mysql:3.1.0")) + new GenericContainer<>(parse("ghcr.io/openzipkin/zipkin-mysql:3.1.1")) .withNetwork(Network.SHARED) .withNetworkAliases("mysql") .withLabel("name", "mysql") @@ -147,7 +147,7 @@ void runBenchmark(@Nullable GenericContainer storage, GenericContainer zip // Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas // Use same version as in docker/examples/docker-compose-prometheus.yml GenericContainer prometheus = - new GenericContainer<>(parse("quay.io/prometheus/prometheus:v2.48.0")) + new GenericContainer<>(parse("quay.io/prometheus/prometheus:v2.51.2")) .withNetwork(Network.SHARED) .withNetworkAliases("prometheus") .withExposedPorts(9090) @@ -157,7 +157,7 @@ void runBenchmark(@Nullable GenericContainer storage, GenericContainer zip // Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas // Use same version as in docker/examples/docker-compose-prometheus.yml - GenericContainer grafana = new GenericContainer<>(parse("quay.io/giantswarm/grafana:7.5.4")) + GenericContainer grafana = new GenericContainer<>(parse("quay.io/giantswarm/grafana:7.5.9")) .withNetwork(Network.SHARED) .withNetworkAliases("grafana") .withExposedPorts(3000) @@ -169,7 +169,7 @@ void runBenchmark(@Nullable GenericContainer storage, GenericContainer zip // Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas // Use same version as in docker/examples/docker-compose-prometheus.yml GenericContainer grafanaDashboards = - new GenericContainer<>(parse("quay.io/cilium/alpine-curl:v1.8.0")) + new GenericContainer<>(parse("quay.io/cilium/alpine-curl:v1.9.0")) .withNetwork(Network.SHARED) .withWorkingDirectory("/tmp") .withLogConsumer(new Slf4jLogConsumer(LOG)) diff --git a/docker/examples/docker-compose-prometheus.yml b/docker/examples/docker-compose-prometheus.yml index d311f91f3f..0b142abe87 100644 --- a/docker/examples/docker-compose-prometheus.yml +++ b/docker/examples/docker-compose-prometheus.yml @@ -16,7 +16,7 @@ services: prometheus: # Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas # Use latest from https://quay.io/repository/prometheus/prometheus?tab=tags - image: quay.io/prometheus/prometheus:v2.48.0 + image: quay.io/prometheus/prometheus:v2.51.2 container_name: prometheus ports: - 9090:9090 @@ -29,7 +29,7 @@ services: grafana: # Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas # Use latest from https://quay.io/repository/app-sre/grafana?tab=tags - image: quay.io/giantswarm/grafana:7.5.4 + image: quay.io/giantswarm/grafana:7.5.9 container_name: grafana ports: - 3000:3000 @@ -43,7 +43,7 @@ services: # This is an arbitrary small image that has curl installed # Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas # Use latest from https://quay.io/repository/quay.io/rackspace/curl?tab=tags - image: quay.io/cilium/alpine-curl:v1.8.0 + image: quay.io/cilium/alpine-curl:v1.9.0 container_name: setup_grafana_datasource depends_on: - grafana diff --git a/docker/test-images/zipkin-activemq/Dockerfile b/docker/test-images/zipkin-activemq/Dockerfile index 1b689355aa..59f7933d71 100644 --- a/docker/test-images/zipkin-activemq/Dockerfile +++ b/docker/test-images/zipkin-activemq/Dockerfile @@ -23,7 +23,7 @@ FROM ghcr.io/openzipkin/java:${java_version} as install WORKDIR /install # Use latest version from https://activemq.apache.org/components/classic/download/ -ARG activemq_version=6.0.1 +ARG activemq_version=6.1.1 # Download the distribution RUN \ @@ -37,7 +37,7 @@ https://archive.apache.org/dist/activemq/${activemq_version}/apache-activemq-${a # which isn't in our JRE. FROM ghcr.io/openzipkin/java:${java_version} as zipkin-activemq LABEL org.opencontainers.image.description="ActiveMQ Classic on OpenJDK and Alpine Linux" -ARG activemq_version=6.0.1 +ARG activemq_version=6.1.1 LABEL activemq-version=$activemq_version # Add HEALTHCHECK and ENTRYPOINT scripts into the default search path diff --git a/docker/test-images/zipkin-cassandra/install.sh b/docker/test-images/zipkin-cassandra/install.sh index ced0f86fa4..22bf93ce35 100755 --- a/docker/test-images/zipkin-cassandra/install.sh +++ b/docker/test-images/zipkin-cassandra/install.sh @@ -47,7 +47,7 @@ cat > pom.xml <<-'EOF' net.java.dev.jna jna - 5.13.0 + 5.14.0 @@ -170,7 +170,7 @@ is_cassandra_alive() { is_cassandra_alive || exit 1 echo "*** Installing cqlsh" -apk add --update --no-cache python3 py3-pip +apk add --update --no-cache python3 # Installing cqlsh requires cffi package. Normally this doesn't need # to be compiled, but something isn't right with aarch64 when installing # cqlsh it needs to build cffi. To unblock support for aarch64, adding @@ -180,6 +180,7 @@ apk add --update --no-cache gcc python3-dev musl-dev libffi-dev # PEP 668 protects against mixing system and pip packages. Setup virtual env to avoid this. python3 -m venv .venv . .venv/bin/activate +python3 -m ensurepip --upgrade pip install -Iq cqlsh cql() { cqlsh "$@" 127.0.0.1 ${temp_native_transport_port} diff --git a/docker/test-images/zipkin-elasticsearch7/Dockerfile b/docker/test-images/zipkin-elasticsearch7/Dockerfile index a52de52e15..2ce08ddb7f 100644 --- a/docker/test-images/zipkin-elasticsearch7/Dockerfile +++ b/docker/test-images/zipkin-elasticsearch7/Dockerfile @@ -26,7 +26,7 @@ WORKDIR /install # Use latest 7.x version from https://www.elastic.co/downloads/past-releases#elasticsearch-no-jdk # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG elasticsearch7_version=7.17.18 +ARG elasticsearch7_version=7.17.20 # Download only the OSS distribution (lacks X-Pack) RUN \ @@ -41,7 +41,7 @@ COPY --from=scratch /config/ ./config/ # production -jre base layer used by zipkin and zipkin-slim. FROM ghcr.io/openzipkin/java:${java_version} as zipkin-elasticsearch7 LABEL org.opencontainers.image.description="Elasticsearch distribution on OpenJDK and Alpine Linux" -ARG elasticsearch7_version=7.17.18 +ARG elasticsearch7_version=7.17.20 LABEL elasticsearch-version=$elasticsearch7_version # The full license is also included in the image at /elasticsearch/LICENSE.txt. diff --git a/docker/test-images/zipkin-elasticsearch8/Dockerfile b/docker/test-images/zipkin-elasticsearch8/Dockerfile index 2721c0d369..8c786af804 100644 --- a/docker/test-images/zipkin-elasticsearch8/Dockerfile +++ b/docker/test-images/zipkin-elasticsearch8/Dockerfile @@ -26,7 +26,7 @@ WORKDIR /install # Use latest 8.x version from https://www.elastic.co/downloads/past-releases#elasticsearch # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG elasticsearch8_version=8.12.2 +ARG elasticsearch8_version=8.13.2 # Download only the OSS distribution (lacks X-Pack) RUN \ @@ -41,7 +41,7 @@ COPY --from=scratch /config/ ./config/ # production -jre base layer used by zipkin and zipkin-slim. FROM ghcr.io/openzipkin/java:${java_version} as zipkin-elasticsearch8 LABEL org.opencontainers.image.description="Elasticsearch distribution on OpenJDK and Alpine Linux" -ARG elasticsearch8_version=8.12.2 +ARG elasticsearch8_version=8.13.2 LABEL elasticsearch-version=$elasticsearch8_version # The full license is also included in the image at /elasticsearch/LICENSE.txt. diff --git a/docker/test-images/zipkin-eureka/pom.xml b/docker/test-images/zipkin-eureka/pom.xml index f75d09c83b..1b176b1549 100644 --- a/docker/test-images/zipkin-eureka/pom.xml +++ b/docker/test-images/zipkin-eureka/pom.xml @@ -29,7 +29,7 @@ org.springframework.boot spring-boot-dependencies - 3.2.3 + 3.2.4 pom import @@ -37,7 +37,7 @@ com.google.guava guava - 33.0.0-jre + 33.1.0-jre com.thoughtworks.xstream @@ -56,7 +56,7 @@ org.springframework.cloud spring-cloud-starter-netflix-eureka-server - 4.1.0 + 4.1.1 diff --git a/docker/test-images/zipkin-mysql/Dockerfile b/docker/test-images/zipkin-mysql/Dockerfile index 51b3cc269f..994bbaff85 100644 --- a/docker/test-images/zipkin-mysql/Dockerfile +++ b/docker/test-images/zipkin-mysql/Dockerfile @@ -28,7 +28,7 @@ HEALTHCHECK --interval=1s --start-period=30s --timeout=5s CMD ["docker-healthche ENTRYPOINT ["start-mysql"] # Use latest from https://pkgs.alpinelinux.org/packages?name=mysql (without the -r[0-9]) -ARG mysql_version=10.11.6 +ARG mysql_version=10.11.7 LABEL mysql-version=$mysql_version ENV MYSQL_VERSION=$mysql_version diff --git a/docker/test-images/zipkin-rabbitmq/Dockerfile b/docker/test-images/zipkin-rabbitmq/Dockerfile index d5b2de9715..e4b7a6ade5 100644 --- a/docker/test-images/zipkin-rabbitmq/Dockerfile +++ b/docker/test-images/zipkin-rabbitmq/Dockerfile @@ -4,7 +4,7 @@ # # Use latest from https://hub.docker.com/_/rabbitmq/tags?page=1&name=alpine -ARG rabbitmq_version=3.13.0 +ARG rabbitmq_version=3.13.1 # We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. diff --git a/zipkin-collector/activemq/src/test/java/zipkin2/collector/activemq/ActiveMQExtension.java b/zipkin-collector/activemq/src/test/java/zipkin2/collector/activemq/ActiveMQExtension.java index 7f576ea083..bb86b9c7b0 100644 --- a/zipkin-collector/activemq/src/test/java/zipkin2/collector/activemq/ActiveMQExtension.java +++ b/zipkin-collector/activemq/src/test/java/zipkin2/collector/activemq/ActiveMQExtension.java @@ -54,7 +54,7 @@ String brokerURL() { // mostly waiting for https://github.com/testcontainers/testcontainers-java/issues/3537 static final class ActiveMQContainer extends GenericContainer { ActiveMQContainer() { - super(parse("ghcr.io/openzipkin/zipkin-activemq:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-activemq:3.1.1")); withExposedPorts(ACTIVEMQ_PORT); waitStrategy = Wait.forListeningPorts(ACTIVEMQ_PORT); withStartupTimeout(Duration.ofSeconds(60)); diff --git a/zipkin-collector/kafka/src/test/java/zipkin2/collector/kafka/KafkaExtension.java b/zipkin-collector/kafka/src/test/java/zipkin2/collector/kafka/KafkaExtension.java index 0a66e0532c..cc04e15a75 100644 --- a/zipkin-collector/kafka/src/test/java/zipkin2/collector/kafka/KafkaExtension.java +++ b/zipkin-collector/kafka/src/test/java/zipkin2/collector/kafka/KafkaExtension.java @@ -83,7 +83,7 @@ KafkaCollector.Builder newCollectorBuilder(String topic, int streams) { // mostly waiting for https://github.com/testcontainers/testcontainers-java/issues/3537 static final class KafkaContainer extends GenericContainer { KafkaContainer() { - super(parse("ghcr.io/openzipkin/zipkin-kafka:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-kafka:3.1.1")); waitStrategy = Wait.forHealthcheck(); // 19092 is for connections from the Docker host and needs to be used as a fixed port. // TODO: someone who knows Kafka well, make ^^ comment better! diff --git a/zipkin-collector/rabbitmq/src/test/java/zipkin2/collector/rabbitmq/RabbitMQExtension.java b/zipkin-collector/rabbitmq/src/test/java/zipkin2/collector/rabbitmq/RabbitMQExtension.java index 5f4e47502d..9f3c2a1e6a 100644 --- a/zipkin-collector/rabbitmq/src/test/java/zipkin2/collector/rabbitmq/RabbitMQExtension.java +++ b/zipkin-collector/rabbitmq/src/test/java/zipkin2/collector/rabbitmq/RabbitMQExtension.java @@ -74,7 +74,7 @@ int port() { // mostly waiting for https://github.com/testcontainers/testcontainers-java/issues/3537 static final class RabbitMQContainer extends GenericContainer { RabbitMQContainer() { - super(parse("ghcr.io/openzipkin/zipkin-rabbitmq:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-rabbitmq:3.1.1")); withExposedPorts(RABBIT_PORT); waitStrategy = Wait.forLogMessage(".*Server startup complete.*", 1); withStartupTimeout(Duration.ofSeconds(60)); diff --git a/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java b/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java index e7cb15ea82..4243e2632e 100644 --- a/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java +++ b/zipkin-server/src/test/java/zipkin2/server/internal/eureka/BaseITZipkinEureka.java @@ -139,7 +139,7 @@ static final class EurekaContainer extends GenericContainer { static final int EUREKA_PORT = 8761; EurekaContainer(Map env) { - super(parse("ghcr.io/openzipkin/zipkin-eureka:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-eureka:3.1.1")); withEnv(env); withExposedPorts(EUREKA_PORT); waitStrategy = Wait.forHealthcheck(); diff --git a/zipkin-storage/cassandra/src/test/java/zipkin2/storage/cassandra/CassandraContainer.java b/zipkin-storage/cassandra/src/test/java/zipkin2/storage/cassandra/CassandraContainer.java index 536738e492..f89cf4fd37 100644 --- a/zipkin-storage/cassandra/src/test/java/zipkin2/storage/cassandra/CassandraContainer.java +++ b/zipkin-storage/cassandra/src/test/java/zipkin2/storage/cassandra/CassandraContainer.java @@ -33,7 +33,7 @@ class CassandraContainer extends GenericContainer { CqlSession globalSession; CassandraContainer() { - super(parse("ghcr.io/openzipkin/zipkin-cassandra:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-cassandra:3.1.1")); addExposedPort(9042); waitStrategy = Wait.forHealthcheck(); withLogConsumer(new Slf4jLogConsumer(LOGGER)); diff --git a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ElasticsearchExtension.java b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ElasticsearchExtension.java index 0f155be7a5..15b405d81f 100644 --- a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ElasticsearchExtension.java +++ b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ElasticsearchExtension.java @@ -117,7 +117,7 @@ String baseUrl() { // mostly waiting for https://github.com/testcontainers/testcontainers-java/issues/3537 static final class ElasticsearchContainer extends GenericContainer { ElasticsearchContainer(int majorVersion) { - super(parse("ghcr.io/openzipkin/zipkin-elasticsearch" + majorVersion + ":3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-elasticsearch" + majorVersion + ":3.1.1")); addExposedPort(9200); waitStrategy = Wait.forHealthcheck(); withLogConsumer(new Slf4jLogConsumer(LOGGER)); diff --git a/zipkin-storage/mysql-v1/src/test/java/zipkin2/storage/mysql/v1/MySQLExtension.java b/zipkin-storage/mysql-v1/src/test/java/zipkin2/storage/mysql/v1/MySQLExtension.java index dab75f501c..057bd33566 100644 --- a/zipkin-storage/mysql-v1/src/test/java/zipkin2/storage/mysql/v1/MySQLExtension.java +++ b/zipkin-storage/mysql-v1/src/test/java/zipkin2/storage/mysql/v1/MySQLExtension.java @@ -103,7 +103,7 @@ int port() { // mostly waiting for https://github.com/testcontainers/testcontainers-java/issues/3537 static final class MySQLContainer extends GenericContainer { MySQLContainer() { - super(parse("ghcr.io/openzipkin/zipkin-mysql:3.1.0")); + super(parse("ghcr.io/openzipkin/zipkin-mysql:3.1.1")); addExposedPort(3306); waitStrategy = Wait.forHealthcheck(); withLogConsumer(new Slf4jLogConsumer(LOGGER)); From 3c8f1b51a0520d5b8073cef96ad6fc6eaf8b4cc1 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Fri, 12 Apr 2024 14:39:03 -1000 Subject: [PATCH 2/3] cve Signed-off-by: Adrian Cole --- docker/test-images/zipkin-eureka/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/test-images/zipkin-eureka/pom.xml b/docker/test-images/zipkin-eureka/pom.xml index 1b176b1549..4304d7df4d 100644 --- a/docker/test-images/zipkin-eureka/pom.xml +++ b/docker/test-images/zipkin-eureka/pom.xml @@ -49,6 +49,11 @@ httpclient 4.5.14 + + software.amazon.ion + ion-java + 1.5.1 + From 854a8c5813210c604082028ba6ff6574f4892b89 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Fri, 12 Apr 2024 14:56:40 -1000 Subject: [PATCH 3/3] force python 3.11 Signed-off-by: Adrian Cole --- docker/test-images/zipkin-cassandra/install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/test-images/zipkin-cassandra/install.sh b/docker/test-images/zipkin-cassandra/install.sh index 22bf93ce35..8f00088784 100755 --- a/docker/test-images/zipkin-cassandra/install.sh +++ b/docker/test-images/zipkin-cassandra/install.sh @@ -170,13 +170,16 @@ is_cassandra_alive() { is_cassandra_alive || exit 1 echo "*** Installing cqlsh" -apk add --update --no-cache python3 +# cqlsh 4.x is not compatible with Python 3.12 by default. +# See https://issues.apache.org/jira/browse/CASSANDRA-19206 +python3_version=3.11 +apk add --update --no-cache python3=~${python3_version} # Installing cqlsh requires cffi package. Normally this doesn't need # to be compiled, but something isn't right with aarch64 when installing # cqlsh it needs to build cffi. To unblock support for aarch64, adding # the following are necessary for compiling cffi. If pip someday changes and # doesn't compile cffi on aarch64 then we can remove these dependencies. -apk add --update --no-cache gcc python3-dev musl-dev libffi-dev +apk add --update --no-cache gcc python3-dev=~${python3_version} musl-dev libffi-dev # PEP 668 protects against mixing system and pip packages. Setup virtual env to avoid this. python3 -m venv .venv . .venv/bin/activate