Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into upstream-update-202…
Browse files Browse the repository at this point in the history
…4_june

# Conflicts:
#	.env
#	docker-compose.minimal.yml
#	docker-compose.yml
#	src/currencyservice/Dockerfile
#	src/dataprepper/data-prepper-config.yaml
#	src/loadgenerator/requirements.txt
#	src/otelcollector/otelcol-config.yml
#	src/prometheus/prometheus-config.yaml
  • Loading branch information
YANG-DB committed Jun 24, 2024
2 parents dae8942 + 6fd371c commit 8b48179
Show file tree
Hide file tree
Showing 243 changed files with 10,877 additions and 28,203 deletions.
29 changes: 26 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@

# Images
IMAGE_VERSION=1.6.0

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

# Dependent images
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
REDIS_IMAGE=redis: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
Expand All @@ -14,7 +29,7 @@ OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_
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
Expand Down Expand Up @@ -62,6 +77,10 @@ FRONTEND_HOST=frontend
ENVOY_PORT=8080
FRONTEND_PROXY_ADDR=frontend-proxy:${ENVOY_PORT}

# Image Provider
IMAGE_PROVIDER_HOST=imageprovider
IMAGE_PROVIDER_PORT=8081

# Load Generator
LOCUST_WEB_PORT=8089
LOCUST_USERS=10
Expand Down Expand Up @@ -93,6 +112,10 @@ SHIPPING_SERVICE_ADDR=shippingservice:${SHIPPING_SERVICE_PORT}
# ******************
# Dependent Services
# ******************
# flagd
FLAGD_HOST=flagd
FLAGD_PORT=8013

# Kafka
KAFKA_SERVICE_PORT=9092
KAFKA_SERVICE_ADDR=kafka:${KAFKA_SERVICE_PORT}
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
1 change: 1 addition & 0 deletions .github/workflows/assign-reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:
assign-reviewers:
if: github.repository == 'open-telemetry/opentelemetry-demo'
runs-on: ubuntu-latest
steps:
- uses: dyladan/component-owners@main
Expand Down
149 changes: 4 additions & 145 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -1,155 +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:
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/adservice/Dockerfile
tag_suffix: adservice
context: ./
- file: ./src/cartservice/src/Dockerfile
tag_suffix: cartservice
context: ./
- file: ./src/checkoutservice/Dockerfile
tag_suffix: checkoutservice
context: ./
- file: ./src/currencyservice/Dockerfile
tag_suffix: currencyservice
context: ./src/currencyservice
- file: ./src/emailservice/Dockerfile
tag_suffix: emailservice
context: ./src/emailservice
# NOTE:
# https://github.com/open-telemetry/opentelemetry-demo/issues/956
# Until dedicated ARM runners are available for GHA we cannot upgrade
# OTP/Elixir versions. Please do not change the OTP/Elixir versions.
- file: ./src/featureflagservice/Dockerfile
tag_suffix: featureflagservice
context: ./
- file: ./src/frontend/Dockerfile
tag_suffix: frontend
context: ./
- file: ./src/frontendproxy/Dockerfile
tag_suffix: frontendproxy
context: ./
- file: ./src/loadgenerator/Dockerfile
tag_suffix: loadgenerator
context: ./
- file: ./src/paymentservice/Dockerfile
tag_suffix: paymentservice
context: ./
- file: ./src/productcatalogservice/Dockerfile
tag_suffix: productcatalogservice
context: ./
- file: ./src/quoteservice/Dockerfile
tag_suffix: quoteservice
context: ./
- file: ./src/shippingservice/Dockerfile
tag_suffix: shippingservice
context: ./
- file: ./src/recommendationservice/Dockerfile
tag_suffix: recommendationservice
context: ./
- file: ./src/kafka/Dockerfile
tag_suffix: kafka
context: ./
- file: ./src/accountingservice/Dockerfile
tag_suffix: accountingservice
context: ./
- file: ./src/frauddetectionservice/Dockerfile
tag_suffix: frauddetectionservice
context: ./
- file: ./src/frontend/Dockerfile.cypress
tag_suffix: frontend-tests
context: ./
- file: ./test/Dockerfile
tag_suffix: integrationTests
context: ./

steps:
- uses: actions/checkout@v3
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
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[worker.oci]
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false'
uses: docker/build-push-action@v3.3.1
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.GHCR_REPO }}:${{ inputs.version }}-${{ matrix.file_tag.tag_suffix }}
cache-from: type=gha
cache-to: type=gha
build_images:
if: github.repository == 'open-telemetry/opentelemetry-demo'
uses: ./.github/workflows/component_build_images.yml
16 changes: 8 additions & 8 deletions .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 All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: install dependencies
run: npm install
Expand All @@ -32,9 +32,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: run misspell
run: make misspell
Expand All @@ -57,7 +57,7 @@ jobs:
name: markdownlinkcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
Expand All @@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: run sanitycheck.py
run: python3 ./internal/tools/sanitycheck.py
Expand All @@ -78,7 +78,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: install tools
run: make install-tools
- name: run checklicense
Expand Down
Loading

0 comments on commit 8b48179

Please sign in to comment.