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

[refactor] Align with OTel Demo v1.11.0 #37

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
e91611b
Fix kafka permission in dockerfile (#1574)
zzh8829 Jun 1, 2024
b5983f2
Resolve proto directory dynamically for dotnet cartservice (#1579)
Mpdreamz Jun 1, 2024
925ddee
[cartservice] bump Otel .NET SDK to 1.8.1 (#1580)
rogercoll Jun 1, 2024
3ee280d
add flagd service to minimal docker compose (#1585)
rogercoll Jun 1, 2024
3afe19e
[kafka] increase kafka memory limits (#1592)
puckpuck Jun 3, 2024
b9c5d37
[imageprovider] reduce image size (#1589)
puckpuck Jun 3, 2024
379cf62
chore(ci): reusable container image generation (#1581)
rogercoll Jun 3, 2024
b2f6fbf
chore: introduce .env.override for docker-compose (#1584)
rogercoll Jun 3, 2024
2ca2be6
[chore] release prep: update dependencies for all services (#1591)
puckpuck Jun 5, 2024
d75c9d8
chore: Add service version to OTEL_RESOURCE_ATTRIBUTES (#1594)
julianocosta89 Jun 5, 2024
cc29172
[checkout] fix kafka restart (#1590)
puckpuck Jun 6, 2024
7e4f1f6
Update demo image version (#1597)
julianocosta89 Jun 7, 2024
9dc4a67
updated buildx config (#1596)
puckpuck Jun 7, 2024
6202972
Bump docker/build-push-action from 5.0.0 to 5.4.0 (#1598)
dependabot[bot] Jun 10, 2024
a61ab14
chore: configure renovate to bump image deps (#1599)
rogercoll Jun 13, 2024
6fd371c
fix: start-minimal make target (#1604)
rogercoll Jun 14, 2024
2a651e4
update to 1.10.0 release (#1602)
puckpuck Jun 18, 2024
616f7c7
build(deps): bump docker/build-push-action from 5.4.0 to 6.0.0 (#1607)
dependabot[bot] Jun 18, 2024
f7c3b24
build(deps): bump gradle/wrapper-validation-action from 3.3.2 to 3.4.…
dependabot[bot] Jun 18, 2024
f89d3af
update to 1.10.0 release (#1612)
puckpuck Jun 18, 2024
ee92851
Use native runners (#1613)
austinlparker Jun 18, 2024
b063b3c
add secrets inheritance (#1614)
austinlparker Jun 18, 2024
e8c03dc
[cartservice] Bump OTel .NET SDK to 1.9.0 (#1610)
Kielek Jun 18, 2024
d658220
Revert "add secrets inheritance (#1614)" (#1615)
austinlparker Jun 18, 2024
c0fa17f
Revert "Use native runners (#1613)" (#1616)
austinlparker Jun 18, 2024
8a211c0
chore: parametrize services Dockerfile path (#1600)
rogercoll Jun 19, 2024
0d092eb
[chore] replace gh action gradle/wrapper-validation-action by gradle/…
Kielek Jun 20, 2024
d335b8d
build(deps): bump docker/build-push-action from 6.0.0 to 6.0.1 (#1618)
dependabot[bot] Jun 20, 2024
11ef3c6
[Valkey] Replace Redis with Valkey (#1619)
julianocosta89 Jun 21, 2024
e5e1a0d
build(deps): bump docker/build-push-action from 6.0.1 to 6.1.0 (#1620)
dependabot[bot] Jun 26, 2024
49992a3
fix: emailservice docker compose image (#1630)
rogercoll Jun 26, 2024
3058ede
add collector configs as environment variable (#1632)
rogercoll Jun 26, 2024
5caa07d
fix(frontend): Use port 443 as default to connect to flagd if https i…
SvenKirschbaum Jun 26, 2024
918e86a
Update recommendation flag to match flagd configuration (#1634)
flands Jun 27, 2024
5400099
Change AccountService from Go to DotNet (auto) (#1538)
RassK Jun 27, 2024
9e31317
build(deps): bump docker/build-push-action from 6.1.0 to 6.2.0 (#1636)
dependabot[bot] Jun 27, 2024
2957ad4
[chore] clarify complete release process (#1638)
puckpuck Jun 28, 2024
0a75389
update to 1.11.0 release (#1639)
puckpuck Jun 28, 2024
60754cb
update to 1.11.0 release (#1640)
puckpuck Jun 28, 2024
b375970
[chore] update demo role memberships (#1649)
puckpuck Jul 1, 2024
ebc32b9
[otel-col] Add docker stats receiver (#1650)
julianocosta89 Jul 2, 2024
25b24fa
add Kafka Dockerfile env variable (#1652)
rogercoll Jul 2, 2024
9dad087
build(deps): bump docker/build-push-action from 6.2.0 to 6.3.0 (#1656)
dependabot[bot] Jul 3, 2024
59a64bd
align with v1.11.0
bpschmitt Jul 8, 2024
25fb8bf
update k8s docs
bpschmitt Jul 8, 2024
8072ee7
update prom agent app values
bpschmitt Jul 8, 2024
b82c5c7
add standard label
bpschmitt Jul 8, 2024
a831113
add nr image override to rec svc
bpschmitt Jul 8, 2024
14e7f8f
Simplify error scenario logic (#1657)
beeme1mr Jul 8, 2024
62d1d9b
[tests] - optimize trace testing (#1659)
puckpuck Jul 8, 2024
c417bdb
[chore] fix build-images workflow (#1661)
puckpuck Jul 9, 2024
4eaef4a
resolve merge conflicts
bpschmitt Jul 11, 2024
18e9413
Merge branch 'main' into values-update
bpschmitt Jul 11, 2024
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
54 changes: 40 additions & 14 deletions .env
Original file line number Diff line number Diff line change
@@ -1,72 +1,91 @@


# Demo App version
IMAGE_VERSION=1.9.0
IMAGE_VERSION=1.11.0
IMAGE_NAME=ghcr.io/open-telemetry/demo
DEMO_VERSION=latest

# Dependent images
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.100.0
GRAFANA_IMAGE=grafana/grafana:10.4.2
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.55
# must also update version field in ./src/grafana/provisioning/datasources/opensearch.yml
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.13.0
POSTGRES_IMAGE=postgres:16.2
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.51.2
REDIS_IMAGE=redis:7.2-alpine
TRACETEST_IMAGE=kubeshop/tracetest:v1.0.0
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.102.1
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.10.2
GRAFANA_IMAGE=grafana/grafana:10.4.3
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.57
# must also update version field in ./src/grafana/provisioning/datasources/opensearch.yaml
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.14.0
POSTGRES_IMAGE=postgres:16.3
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.52.0
VALKEY_IMAGE=valkey/valkey:7.2-alpine
# must also update the version arg in ./test/tracetesting/Dockerfile
TRACETEST_IMAGE=kubeshop/tracetest:v1.3.0

# Demo Platform
ENV_PLATFORM=local

# OpenTelemetry Collector
DOCKER_SOCK=/var/run/docker.sock
OTEL_COLLECTOR_HOST=otelcol
OTEL_COLLECTOR_PORT_GRPC=4317
OTEL_COLLECTOR_PORT_HTTP=4318
OTEL_COLLECTOR_CONFIG=./src/otelcollector/otelcol-config.yml
OTEL_COLLECTOR_CONFIG_EXTRAS=./src/otelcollector/otelcol-config-extras.yml
OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_GRPC}
PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:8080/otlp-http/v1/traces

# OpenTelemetry Resource Definitions
OTEL_RESOURCE_ATTRIBUTES="service.namespace=opentelemetry-demo"
OTEL_RESOURCE_ATTRIBUTES=service.namespace=opentelemetry-demo,service.version=${IMAGE_VERSION}

# Metrics Temporality
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative

# ******************
# Core Demo Services
# ******************
# Accounting Service
ACCOUNTING_SERVICE_DOCKERFILE=./src/accountingservice/Dockerfile

# Ad Service
AD_SERVICE_PORT=9555
AD_SERVICE_ADDR=adservice:${AD_SERVICE_PORT}
AD_SERVICE_DOCKERFILE=./src/adservice/Dockerfile

# Cart Service
CART_SERVICE_PORT=7070
CART_SERVICE_ADDR=cartservice:${CART_SERVICE_PORT}
CART_SERVICE_DOCKERFILE=./src/cartservice/src/Dockerfile

# Checkout Service
CHECKOUT_SERVICE_PORT=5050
CHECKOUT_SERVICE_ADDR=checkoutservice:${CHECKOUT_SERVICE_PORT}
CHECKOUT_SERVICE_DOCKERFILE=./src/checkoutservice/Dockerfile

# Currency Service
CURRENCY_SERVICE_PORT=7001
CURRENCY_SERVICE_ADDR=currencyservice:${CURRENCY_SERVICE_PORT}
CURRENCY_SERVICE_DOCKERFILE=./src/currencyservice/Dockerfile

# Email Service
EMAIL_SERVICE_PORT=6060
EMAIL_SERVICE_ADDR=http://emailservice:${EMAIL_SERVICE_PORT}
EMAIL_SERVICE_DOCKERFILE=./src/emailservice/Dockerfile

# Fraud Service
FRAUD_SERVICE_DOCKERFILE=./src/frauddetectionservice/Dockerfile

# Frontend
FRONTEND_PORT=8080
FRONTEND_ADDR=frontend:${FRONTEND_PORT}
FRONTEND_DOCKERFILE=./src/frontend/Dockerfile

# Frontend Proxy (Envoy)
FRONTEND_HOST=frontend
ENVOY_PORT=8080
FRONTEND_PROXY_ADDR=frontend-proxy:${ENVOY_PORT}
FRONTEND_PROXY_DOCKERFILE=./src/frontendproxy/Dockerfile

# Image Provider
IMAGE_PROVIDER_HOST=imageprovider
IMAGE_PROVIDER_PORT=8081
IMAGE_PROVIDER_DOCKERFILE=./src/imageprovider/Dockerfile

# Load Generator
LOCUST_WEB_PORT=8089
Expand All @@ -75,26 +94,32 @@ LOCUST_HOST=http://${FRONTEND_PROXY_ADDR}
LOCUST_WEB_HOST=loadgenerator
LOCUST_AUTOSTART=true
LOCUST_HEADLESS=false
LOAD_GENERATOR_DOCKERFILE=./src/loadgenerator/Dockerfile

# Payment Service
PAYMENT_SERVICE_PORT=50051
PAYMENT_SERVICE_ADDR=paymentservice:${PAYMENT_SERVICE_PORT}
PAYMENT_SERVICE_DOCKERFILE=./src/paymentservice/Dockerfile

# Product Catalog Service
PRODUCT_CATALOG_SERVICE_PORT=3550
PRODUCT_CATALOG_SERVICE_ADDR=productcatalogservice:${PRODUCT_CATALOG_SERVICE_PORT}
PRODUCT_CATALOG_DOCKERFILE=./src/productcatalogservice/Dockerfile

# Quote Service
QUOTE_SERVICE_PORT=8090
QUOTE_SERVICE_ADDR=http://quoteservice:${QUOTE_SERVICE_PORT}
QUOTE_SERVICE_DOCKERFILE=./src/quoteservice/Dockerfile

# Recommendation Service
RECOMMENDATION_SERVICE_PORT=9001
RECOMMENDATION_SERVICE_ADDR=recommendationservice:${RECOMMENDATION_SERVICE_PORT}
RECOMMENDATION_SERVICE_DOCKERFILE=./src/recommendationservice/Dockerfile

# Shipping Service
SHIPPING_SERVICE_PORT=50050
SHIPPING_SERVICE_ADDR=shippingservice:${SHIPPING_SERVICE_PORT}
SHIPPING_SERVICE_DOCKERFILE=./src/shippingservice/Dockerfile

# ******************
# Dependent Services
Expand All @@ -106,10 +131,11 @@ FLAGD_PORT=8013
# Kafka
KAFKA_SERVICE_PORT=9092
KAFKA_SERVICE_ADDR=kafka:${KAFKA_SERVICE_PORT}
KAFKA_SERVICE_DOCKERFILE=./src/kafka/Dockerfile

# Redis
REDIS_PORT=6379
REDIS_ADDR=redis-cart:${REDIS_PORT}
# Valkey
VALKEY_PORT=6379
VALKEY_ADDR=valkey-cart:${VALKEY_PORT}

# ********************
# Telemetry Components
Expand Down
2 changes: 2 additions & 0 deletions .env.override
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DO NOT PUSH CHANGES OF THIS FILE TO opentelemetry/opentelemetry-demo
# PLACE YOUR .env ENVIRONMENT VARIABLES OVERRIDES IN THIS FILE
166 changes: 3 additions & 163 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -1,174 +1,14 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
name: Test image generation

on:
push:
paths:
- 'src/**'
- 'test/**'
workflow_call:
inputs:
push:
description: Should the images be pushed
default: false
required: false
type: boolean
version:
description: The version used when tagging the image
default: 'dev'
required: false
type: string

jobs:
build_and_push_images:
build_images:
if: github.repository == 'open-telemetry/opentelemetry-demo'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

env:
RELEASE_VERSION: "${{ github.event.release.tag_name }}"
DOCKERHUB_REPO: "otel/demo"
GHCR_REPO: "ghcr.io/open-telemetry/demo"

strategy:
fail-fast: false
matrix:
file_tag:
- file: ./src/accountingservice/Dockerfile
tag_suffix: accountingservice
context: ./
setup-qemu: true
- file: ./src/adservice/Dockerfile
tag_suffix: adservice
context: ./
setup-qemu: true
- file: ./src/cartservice/src/Dockerfile
tag_suffix: cartservice
context: ./
setup-qemu: false
- file: ./src/checkoutservice/Dockerfile
tag_suffix: checkoutservice
context: ./
setup-qemu: true
- file: ./src/currencyservice/Dockerfile
tag_suffix: currencyservice
context: ./
setup-qemu: true
- file: ./src/emailservice/Dockerfile
tag_suffix: emailservice
context: ./src/emailservice
setup-qemu: true
- file: ./src/frauddetectionservice/Dockerfile
tag_suffix: frauddetectionservice
context: ./
setup-qemu: true
- file: ./src/frontend/Dockerfile
tag_suffix: frontend
context: ./
setup-qemu: true
- file: ./src/frontendproxy/Dockerfile
tag_suffix: frontendproxy
context: ./
setup-qemu: true
- file: ./src/frontend/Dockerfile.cypress
tag_suffix: frontend-tests
context: ./
setup-qemu: true
- file: ./src/imageprovider/Dockerfile
tag_suffix: imageprovider
context: ./
setup-qemu: true
- file: ./src/kafka/Dockerfile
tag_suffix: kafka
context: ./
setup-qemu: true
- file: ./src/loadgenerator/Dockerfile
tag_suffix: loadgenerator
context: ./
setup-qemu: true
- file: ./src/paymentservice/Dockerfile
tag_suffix: paymentservice
context: ./
setup-qemu: true
- file: ./src/productcatalogservice/Dockerfile
tag_suffix: productcatalogservice
context: ./
setup-qemu: true
- file: ./src/quoteservice/Dockerfile
tag_suffix: quoteservice
context: ./
setup-qemu: true
- file: ./src/recommendationservice/Dockerfile
tag_suffix: recommendationservice
context: ./
setup-qemu: true
- file: ./src/shippingservice/Dockerfile
tag_suffix: shippingservice
context: ./
setup-qemu: true
- file: ./test/tracetesting/Dockerfile
tag_suffix: traceBasedTests
context: ./
setup-qemu: true

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for changes and set push options
id: check_changes
run: |
DOCKERFILE_DIR=$(dirname ${{ matrix.file_tag.file }})
FILES_CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- $DOCKERFILE_DIR)
FORCE_PUSH=${{ inputs.push }}
if [ "$FORCE_PUSH" = true ]; then
echo "Force push is enabled, proceeding with build."
echo "skip=false" >> "$GITHUB_OUTPUT"
elif [ -z "$FILES_CHANGED" ]; then
echo "No changes in ${{ matrix.file_tag.context }}, skipping build."
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "Changes detected in ${{ matrix.file_tag.context }}, proceeding with build."
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ inputs.push }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ inputs.push }}
- name: Set up QEMU
if: ${{ matrix.file_tag.setup-qemu }}
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config-inline: |
[worker.oci]
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false'
uses: docker/[email protected]
with:
context: ${{ matrix.file_tag.context }}
file: ${{ matrix.file_tag.file }}
platforms: linux/amd64,linux/arm64
push: ${{ inputs.push }}
tags: |
${{ env.DOCKERHUB_REPO }}:${{ inputs.version }}-${{matrix.file_tag.tag_suffix }}
${{ env.DOCKERHUB_REPO }}:latest-${{matrix.file_tag.tag_suffix }}
${{ env.GHCR_REPO }}:${{ inputs.version }}-${{ matrix.file_tag.tag_suffix }}
${{ env.GHCR_REPO }}:latest-${{ matrix.file_tag.tag_suffix }}
cache-from: type=gha
cache-to: type=gha
uses: ./.github/workflows/component-build-images.yml
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build_images:
uses: ./.github/workflows/build-images.yml
uses: ./.github/workflows/component-build-images.yml
with:
push: false
version: 'dev'
Expand Down
Loading
Loading