Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Move dependencies control to .env file #1715

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
julianocosta89 marked this conversation as resolved.
Show resolved Hide resolved

# OTel Java Agent Version
JAVA_AGENT_VERSION=2.7.0

# Demo Platform
ENV_PLATFORM=local
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ services:
build:
context: ./
dockerfile: ${AD_SERVICE_DOCKERFILE}
args:
VERSION: ${JAVA_AGENT_VERSION}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-adservice
deploy:
Expand Down Expand Up @@ -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/
Expand Down
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ services:
build:
context: ./
dockerfile: ${AD_SERVICE_DOCKERFILE}
args:
VERSION: ${JAVA_AGENT_VERSION}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-adservice
deploy:
Expand Down Expand Up @@ -222,6 +224,8 @@ services:
build:
context: ./
dockerfile: ${FRAUD_SERVICE_DOCKERFILE}
args:
VERSION: ${JAVA_AGENT_VERSION}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-frauddetectionservice
deploy:
Expand Down Expand Up @@ -604,6 +608,8 @@ services:
build:
context: ./
dockerfile: ${KAFKA_SERVICE_DOCKERFILE}
args:
VERSION: ${JAVA_AGENT_VERSION}
cache_from:
- ${IMAGE_NAME}:${IMAGE_VERSION}-kafka
deploy:
Expand Down Expand Up @@ -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/
Expand Down
4 changes: 2 additions & 2 deletions src/adservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions src/frauddetectionservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
1 change: 0 additions & 1 deletion src/grafana/provisioning/datasources/opensearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ datasources:
logMessageField: body
pplEnabled: true
timeField: observedTimestamp
version: 2.16.0
4 changes: 2 additions & 2 deletions src/kafka/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]:9093'
Expand Down
2 changes: 1 addition & 1 deletion test/tracetesting/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading