diff --git a/.env b/.env index 4a7e37cccc..90d5c648da 100644 --- a/.env +++ b/.env @@ -10,13 +10,16 @@ COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.108.0 FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.11.2 GRAFANA_IMAGE=grafana/grafana:11.2.0 JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.60 -# must also update version field in ./src/grafana/provisioning/datasources/opensearch.yaml -OPENSEARCH_IMAGE=opensearchproject/opensearch:2.16.0 +OPENSEARCH_IMAGE_VERSION=2.16.0 +OPENSEARCH_IMAGE=opensearchproject/opensearch:${OPENSEARCH_IMAGE_VERSION} POSTGRES_IMAGE=postgres:16.4 PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.54.1 -VALKEY_IMAGE=valkey/valkey:8.0-alpine -# must also update the version arg in ./test/tracetesting/Dockerfile -TRACETEST_IMAGE=kubeshop/tracetest:v1.5.2 +TRACETEST_IMAGE_VERSION=v1.5.4 +TRACETEST_IMAGE=kubeshop/tracetest:${TRACETEST_IMAGE_VERSION} +VALKEY_IMAGE=valkey/valkey:7.2-alpine + +# OTel Java Agent Version +JAVA_AGENT_VERSION=2.7.0 # Demo Platform ENV_PLATFORM=local diff --git a/CHANGELOG.md b/CHANGELOG.md index 0256ebf0cd..f7da2e247f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ the release. ([#1707](https://github.com/open-telemetry/opentelemetry-demo/pull/1707)) * [chore] Fix gen-proto for accountingservice ([#1709](https://github.com/open-telemetry/opentelemetry-demo/pull/1709)) +* [chore] Move dependencies control to .env file + ([#1715](https://github.com/open-telemetry/opentelemetry-demo/pull/1715)) * [accountingservice] bump OpenTelemetry .NET Automatic Instrumentation to 1.8.0 together with other dependencies ([#1727](https://github.com/open-telemetry/opentelemetry-demo/pull/1727)) diff --git a/docker-compose-tests.yml b/docker-compose-tests.yml index 1c97ceb6ac..8bab0cb0cd 100644 --- a/docker-compose-tests.yml +++ b/docker-compose-tests.yml @@ -34,6 +34,8 @@ services: build: context: ./ dockerfile: ./test/tracetesting/Dockerfile + args: + TRACETEST_IMAGE_VERSION: ${TRACETEST_IMAGE_VERSION} environment: - AD_SERVICE_ADDR - CART_SERVICE_ADDR diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index 68fe04d93e..0c63bd0bae 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -25,6 +25,8 @@ services: build: context: ./ dockerfile: ${AD_SERVICE_DOCKERFILE} + args: + VERSION: ${JAVA_AGENT_VERSION} cache_from: - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice deploy: @@ -565,7 +567,7 @@ services: memory: 100M restart: unless-stopped environment: - - "GF_INSTALL_PLUGINS=grafana-opensearch-datasource" + - "GF_INSTALL_PLUGINS=grafana-opensearch-datasource ${OPENSEARCH_IMAGE_VERSION}" volumes: - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini - ./src/grafana/provisioning/:/etc/grafana/provisioning/ diff --git a/docker-compose.yml b/docker-compose.yml index 33358b6f4a..20b520fca6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,6 +51,8 @@ services: build: context: ./ dockerfile: ${AD_SERVICE_DOCKERFILE} + args: + VERSION: ${JAVA_AGENT_VERSION} cache_from: - ${IMAGE_NAME}:${IMAGE_VERSION}-adservice deploy: @@ -222,6 +224,8 @@ services: build: context: ./ dockerfile: ${FRAUD_SERVICE_DOCKERFILE} + args: + VERSION: ${JAVA_AGENT_VERSION} cache_from: - ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice deploy: @@ -604,6 +608,8 @@ services: build: context: ./ dockerfile: ${KAFKA_SERVICE_DOCKERFILE} + args: + VERSION: ${JAVA_AGENT_VERSION} cache_from: - ${IMAGE_NAME}:${IMAGE_VERSION}-kafka deploy: @@ -676,7 +682,7 @@ services: memory: 100M restart: unless-stopped environment: - - "GF_INSTALL_PLUGINS=grafana-opensearch-datasource" + - "GF_INSTALL_PLUGINS=grafana-opensearch-datasource ${OPENSEARCH_IMAGE_VERSION}" volumes: - ./src/grafana/grafana.ini:/etc/grafana/grafana.ini - ./src/grafana/provisioning/:/etc/grafana/provisioning/ diff --git a/src/adservice/Dockerfile b/src/adservice/Dockerfile index 97c2ebd1ed..aca648210d 100644 --- a/src/adservice/Dockerfile +++ b/src/adservice/Dockerfile @@ -20,11 +20,11 @@ RUN ./gradlew installDist -PprotoSourceDir=./proto FROM eclipse-temurin:21-jre -ARG version=2.6.0 +ARG VERSION WORKDIR /usr/src/app/ COPY --from=builder /usr/src/app/ ./ -ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar +ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$VERSION/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar EXPOSE ${AD_SERVICE_PORT} diff --git a/src/frauddetectionservice/Dockerfile b/src/frauddetectionservice/Dockerfile index c7e17158b3..7ca8b1c144 100644 --- a/src/frauddetectionservice/Dockerfile +++ b/src/frauddetectionservice/Dockerfile @@ -14,11 +14,11 @@ RUN gradle shadowJar FROM gcr.io/distroless/java17-debian11 -ARG version=2.4.0 +ARG VERSION WORKDIR /usr/src/app/ COPY --from=builder /usr/src/app/build/libs/frauddetectionservice-1.0-all.jar ./ -ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /app/opentelemetry-javaagent.jar +ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$VERSION/opentelemetry-javaagent.jar /app/opentelemetry-javaagent.jar ENV JAVA_TOOL_OPTIONS=-javaagent:/app/opentelemetry-javaagent.jar ENTRYPOINT [ "java", "-jar", "frauddetectionservice-1.0-all.jar" ] diff --git a/src/grafana/provisioning/datasources/opensearch.yaml b/src/grafana/provisioning/datasources/opensearch.yaml index 4d23b5f7b5..d1c1671762 100644 --- a/src/grafana/provisioning/datasources/opensearch.yaml +++ b/src/grafana/provisioning/datasources/opensearch.yaml @@ -17,4 +17,3 @@ datasources: logMessageField: body pplEnabled: true timeField: observedTimestamp - version: 2.16.0 diff --git a/src/kafka/Dockerfile b/src/kafka/Dockerfile index b3e6a236b5..381ec46d47 100644 --- a/src/kafka/Dockerfile +++ b/src/kafka/Dockerfile @@ -5,11 +5,11 @@ FROM apache/kafka:3.7.0 USER root -ARG version=2.4.0 +ARG VERSION USER appuser -ADD --chown=appuser:appuser https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /tmp/opentelemetry-javaagent.jar +ADD --chown=appuser:appuser https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$VERSION/opentelemetry-javaagent.jar /tmp/opentelemetry-javaagent.jar ENV KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093 ENV KAFKA_CONTROLLER_QUORUM_VOTERS='1@0.0.0.0:9093' diff --git a/test/tracetesting/Dockerfile b/test/tracetesting/Dockerfile index 388269cd48..a76dea5d52 100644 --- a/test/tracetesting/Dockerfile +++ b/test/tracetesting/Dockerfile @@ -7,7 +7,7 @@ FROM alpine WORKDIR /app # The build-images workflow action does not set a build-arg so we need to specify a default value here -ARG TRACETEST_IMAGE_VERSION=v1.5.2 +ARG TRACETEST_IMAGE_VERSION RUN apk --update add bash jq curl RUN curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash -s -- $TRACETEST_IMAGE_VERSION