Skip to content

Commit

Permalink
docker: uses portable config between ES 7 and 8 (#3708)
Browse files Browse the repository at this point in the history
also fixes regression by using an older JRE for ES 8

Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt authored Jan 24, 2024
1 parent a4b07b5 commit 72de5a8
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 65 deletions.
2 changes: 1 addition & 1 deletion docker/test-images/zipkin-elasticsearch7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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.16
ARG elasticsearch7_version=7.17.17

# Download only the OSS distribution (lacks X-Pack)
RUN \
Expand Down
19 changes: 15 additions & 4 deletions docker/test-images/zipkin-elasticsearch7/config/elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,24 @@
# the License.
#

cluster.name: "docker-cluster"
network.host: 0.0.0.0
node.name: zipkin-elasticsearch
cluster.name: "docker-cluster"
xpack.ml.enabled: false
cluster.initial_master_nodes:
- zipkin-elasticsearch

# Enable development mode and disable bootstrap checks
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
discovery.type: single-node

# This is a test image, so we are not afraid to delete all indices. Avoids:
# Wildcard expressions or all indices are not allowed
action.destructive_requires_name: false
# Avoid "flood stage disk watermark" errors
cluster.routing.allocation.disk.threshold_enabled: false
# We don't use geoip
ingest.geoip.downloader.enabled: false

# disable all xpack features than can be disabled
xpack.graph.enabled: false
xpack.ml.enabled: false
xpack.security.enabled: false
xpack.watcher.enabled: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2015-2020 The OpenZipkin Authors
# Copyright 2015-2024 The OpenZipkin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -22,3 +22,6 @@ appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%ma
rootLogger.level = info
rootLogger.appenderRef.console.ref = console

# unsolved https://github.com/sherifabdlnaby/elastdocker/issues/108
logger.aws.name = com.amazonaws.auth.profile.internal.BasicProfileConfigFileLoader
logger.aws.level = error
8 changes: 5 additions & 3 deletions docker/test-images/zipkin-elasticsearch8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.2_p13
ARG java_version=21.0.1_p12

# 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.
Expand All @@ -26,16 +26,18 @@ FROM scratch as scratch

COPY build-bin/docker/docker-healthcheck /docker-bin/
COPY docker/test-images/zipkin-elasticsearch8/start-elasticsearch /docker-bin/
COPY docker/test-images/zipkin-elasticsearch8/config/ /config/
COPY docker/test-images/zipkin-elasticsearch7/config/ /config/

FROM ghcr.io/openzipkin/java:${java_version} as install

WORKDIR /install

# Use latest 7.x version from https://www.elastic.co/downloads/past-releases#elasticsearch
# 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

# Download only the OSS distribution (lacks X-Pack)
RUN \
Expand Down
28 changes: 0 additions & 28 deletions docker/test-images/zipkin-elasticsearch8/config/elasticsearch.yml

This file was deleted.

28 changes: 0 additions & 28 deletions docker/test-images/zipkin-elasticsearch8/config/log4j2.properties

This file was deleted.

0 comments on commit 72de5a8

Please sign in to comment.