From 6b9ea28e3940628d29913e4e054d97d15eb2d27e Mon Sep 17 00:00:00 2001 From: Crypt Keeper <64215+codefromthecrypt@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:27:18 +0700 Subject: [PATCH] Fixes logging glitches and updates docker images (#3717) This does a few things that polish docker test images and logging: * updates base layers to Alpine 3.19.1 * uses Elasticsearch 8.12.1 which allows re-use of a consistent JRE * Fixes logging glitch in zipkin-eureka * Fixes ES_HTTP_LOGGING in zipkin-slim (which uses simplelogger) Signed-off-by: Adrian Cole --- build-bin/docker-compose-zipkin.yml | 2 +- docker/test-images/zipkin-elasticsearch8/Dockerfile | 12 +++++------- docker/test-images/zipkin-eureka/pom.xml | 7 +++++++ docker/test-images/zipkin-mysql/Dockerfile | 2 +- docker/test-images/zipkin-ui/Dockerfile | 2 +- .../src/main/resources/simplelogger.properties | 4 ++++ 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/build-bin/docker-compose-zipkin.yml b/build-bin/docker-compose-zipkin.yml index 09960f346a9..95b9876a5b8 100755 --- a/build-bin/docker-compose-zipkin.yml +++ b/build-bin/docker-compose-zipkin.yml @@ -23,7 +23,7 @@ services: # Use fixed service and container name 'sut; so our test script can copy/pasta sut: container_name: sut - image: ghcr.io/openzipkin/alpine:3.19.0 + image: ghcr.io/openzipkin/alpine:3.19.1 entrypoint: /bin/sh # Keep the container running until HEALTHCHECK passes command: "-c \"sleep 5m\"" diff --git a/docker/test-images/zipkin-elasticsearch8/Dockerfile b/docker/test-images/zipkin-elasticsearch8/Dockerfile index 4c5ff2ff4bb..8c6a219993d 100644 --- a/docker/test-images/zipkin-elasticsearch8/Dockerfile +++ b/docker/test-images/zipkin-elasticsearch8/Dockerfile @@ -17,7 +17,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG java_version=21.0.1_p12 +ARG java_version=21.0.2_p13 # 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. @@ -35,16 +35,14 @@ 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 elasticsearch7_version=8.12.0 -# TODO ^^ match java_version with others and remove this comment on 8.13.1 -# See https://github.com/elastic/elasticsearch/pull/104347 +ARG elasticsearch8_version=8.12.1 # Download only the OSS distribution (lacks X-Pack) RUN \ # Connection resets are frequent in GitHub Actions workflows \ wget --random-wait --tries=5 -qO- \ # We don't download bin scripts as we customize for reasons including BusyBox problems -https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${elasticsearch7_version}-linux-x86_64.tar.gz| tar xz \ +https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${elasticsearch8_version}-linux-x86_64.tar.gz| tar xz \ --wildcards --strip=1 --exclude=jdk --exclude=*/bin COPY --from=scratch /config/ ./config/ @@ -52,8 +50,8 @@ 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 elasticsearch7_version=8.12.0 -LABEL elasticsearch-version=$elasticsearch7_version +ARG elasticsearch8_version=8.12.1 +LABEL elasticsearch-version=$elasticsearch8_version # The full license is also included in the image at /elasticsearch/LICENSE.txt. LABEL org.opencontainers.image.licenses="Elastic-License-2.0" diff --git a/docker/test-images/zipkin-eureka/pom.xml b/docker/test-images/zipkin-eureka/pom.xml index bf142bcd52c..488ad731513 100644 --- a/docker/test-images/zipkin-eureka/pom.xml +++ b/docker/test-images/zipkin-eureka/pom.xml @@ -60,6 +60,13 @@ org.springframework.cloud spring-cloud-starter-netflix-eureka-server 4.1.0 + + + + commons-logging + commons-logging + + diff --git a/docker/test-images/zipkin-mysql/Dockerfile b/docker/test-images/zipkin-mysql/Dockerfile index 47f7ba7f77c..2a232818648 100644 --- a/docker/test-images/zipkin-mysql/Dockerfile +++ b/docker/test-images/zipkin-mysql/Dockerfile @@ -15,7 +15,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/alpine # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG alpine_version=3.19.0 +ARG alpine_version=3.19.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/docker/test-images/zipkin-ui/Dockerfile b/docker/test-images/zipkin-ui/Dockerfile index 46563f76628..5672571b9a0 100644 --- a/docker/test-images/zipkin-ui/Dockerfile +++ b/docker/test-images/zipkin-ui/Dockerfile @@ -15,7 +15,7 @@ # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/alpine # This is defined in many places because Docker has no "env" script functionality unless you use # docker-compose: When updating, update everywhere. -ARG alpine_version=3.19.0 +ARG alpine_version=3.19.1 # java_version is used during the installation process to build or download the zipkin-lens jar. # diff --git a/zipkin-server/src/main/resources/simplelogger.properties b/zipkin-server/src/main/resources/simplelogger.properties index 8bb407b9899..2e9b535f598 100644 --- a/zipkin-server/src/main/resources/simplelogger.properties +++ b/zipkin-server/src/main/resources/simplelogger.properties @@ -13,3 +13,7 @@ org.slf4j.simpleLogger.showShortLogName=true org.slf4j.simpleLogger.log.com.linecorp.armeria=WARN # But allow to say it's ready to serve requests org.slf4j.simpleLogger.log.com.linecorp.armeria.server.Server=INFO +# # and when registered in Eureka +org.slf4j.simpleLogger.log.com.linecorp.armeria.server.eureka.EurekaUpdatingListener=INFO +# # and when http-logging is enabled +org.slf4j.simpleLogger.log.com.linecorp.armeria.client.logging.LoggingClient=INFO