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

Merging upstream #57

Merged
merged 32 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5806b89
Adding in merge
lukekraus45 Jun 13, 2024
849e30c
Updating currency service Dockerfile
lukekraus45 Jun 13, 2024
1ff34b8
Updating quote service
lukekraus45 Jun 13, 2024
e5e5a23
Trying to turn on buildkit
lukekraus45 Jun 13, 2024
3d6ee14
FIxing quote service image nuber
lukekraus45 Jun 13, 2024
c718bc7
Trying to change filepath
lukekraus45 Jun 13, 2024
4bc1f52
FInal quote service update
lukekraus45 Jun 13, 2024
d1b7b88
Trying to fix filepath
lukekraus45 Jun 13, 2024
117d59c
Moving pb directory to same context
lukekraus45 Jun 13, 2024
5fbb125
Fixing checkout service
lukekraus45 Jun 13, 2024
ecc696f
Fixing image build failure accounting service
lukekraus45 Jun 13, 2024
a1772c8
Trying to update permissions on dockerfile
lukekraus45 Jun 13, 2024
e37a02f
Edting product catalog service to match remote
lukekraus45 Jun 13, 2024
5c3b9bd
Trying updated go mod
lukekraus45 Jun 13, 2024
aeef5f7
Trying to update to point to Datadog repo
lukekraus45 Jun 13, 2024
5efe90d
Trying updating go.mod
lukekraus45 Jun 13, 2024
57dbf2b
Trying updated dockerfile
lukekraus45 Jun 13, 2024
90e1e69
Removing readonly flag
lukekraus45 Jun 13, 2024
5ef6f8d
Trying to add permissions
lukekraus45 Jun 13, 2024
378bf38
Trying root user
lukekraus45 Jun 13, 2024
5b4d624
Testing out stripped down dockerfile
lukekraus45 Jun 13, 2024
f5b744a
Trying to repush to make build take
lukekraus45 Jun 17, 2024
59b8757
Trying to add apk add
lukekraus45 Jun 17, 2024
406ddfe
Trying to update accountingservice
lukekraus45 Jun 17, 2024
4c91dde
Updatiang image
lukekraus45 Jun 17, 2024
b5f138e
Trying go generate command
lukekraus45 Jun 17, 2024
8d16626
Updating to match upstream
lukekraus45 Jun 17, 2024
6459f86
Adding go generate
lukekraus45 Jun 17, 2024
6330a9b
Adding go build and copy
lukekraus45 Jun 17, 2024
88c5c74
update docker file
dineshg13 Jun 17, 2024
a7b7da1
update docker file for product catalog
dineshg13 Jun 18, 2024
141744c
update docker file for accounting service
dineshg13 Jun 18, 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
41 changes: 20 additions & 21 deletions .env
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@


# Demo App version
IMAGE_VERSION=1.8.0
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.93.0
GRAFANA_IMAGE=grafana/grafana:10.3.1
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.53
# must also update version field in /src/grafana/provisioning/datasources/opensearch.yml
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.11.1
POSTGRES_IMAGE=postgres:16.1
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.49.1
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.yml
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
TRACETEST_IMAGE_VERSION=v0.15.8
TRACETEST_IMAGE=kubeshop/tracetest:${TRACETEST_IMAGE_VERSION}
# must also update the version arg in ./test/tracetesting/Dockerfile
TRACETEST_IMAGE=kubeshop/tracetest:v1.3.0

# Demo Platform
ENV_PLATFORM=local
Expand All @@ -28,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 @@ -56,16 +57,6 @@ CURRENCY_SERVICE_ADDR=currencyservice:${CURRENCY_SERVICE_PORT}
EMAIL_SERVICE_PORT=6060
EMAIL_SERVICE_ADDR=http://emailservice:${EMAIL_SERVICE_PORT}

# Feature Flag Service
FEATURE_FLAG_SERVICE_PORT=8081
FEATURE_FLAG_SERVICE_ADDR=featureflagservice:${FEATURE_FLAG_SERVICE_PORT}
FEATURE_FLAG_SERVICE_HOST=feature-flag-service
FEATURE_FLAG_GRPC_SERVICE_PORT=50053
FEATURE_FLAG_GRPC_SERVICE_ADDR=featureflagservice:${FEATURE_FLAG_GRPC_SERVICE_PORT}

# flagd
FLAGD_HOST=flagd

# Frontend
FRONTEND_PORT=8080
FRONTEND_ADDR=frontend:${FRONTEND_PORT}
Expand All @@ -75,6 +66,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 @@ -106,6 +101,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
13 changes: 1 addition & 12 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
# 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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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
177 changes: 177 additions & 0 deletions .github/workflows/component_build-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

on:
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
dockerhub_repo:
description: Docker Hub repository
default: 'otel/demo'
required: false
type: string
ghcr_repo:
description: GHCR repository
default: 'ghcr.io/open-telemetry/demo'
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 }}"

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:
buildkitd-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@v5.4.0
with:
context: ${{ matrix.file_tag.context }}
file: ${{ matrix.file_tag.file }}
platforms: linux/amd64,linux/arm64
push: ${{ inputs.push }}
tags: |
${{ inputs.dockerhub_repo }}:${{ inputs.version }}-${{matrix.file_tag.tag_suffix }}
${{ inputs.dockerhub_repo }}:latest-${{matrix.file_tag.tag_suffix }}
${{ inputs.ghcr_repo }}:${{ inputs.version }}-${{ matrix.file_tag.tag_suffix }}
${{ inputs.ghcr_repo }}:latest-${{ matrix.file_tag.tag_suffix }}
cache-from: type=gha
cache-to: type=gha
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: gradle/wrapper-validation-action@v2.1.1
- uses: gradle/wrapper-validation-action@v3.3.2
60 changes: 60 additions & 0 deletions .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# adds a label to a pull request if certain files are changed
name: Label Pull Requests

on:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
label:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Check for changed files
id: file_changes
uses: dorny/paths-filter@v2
with:
list-files: shell
filters: |
docsUpdateRequired:
- 'src/flagd/**'
helmUpdateRequired:
- '.env'
- 'docker-compose*.yml'
- 'src/flagd/**'
- 'src/grafana/**'
- 'src/otelcollector/**'
- 'src/prometheus/**'

- name: "Add Label: docs-update-required"
if: steps.file_changes.outputs.docsUpdateRequired == 'true'
uses: actions/github-script@v7
with:
script: |
const issue_number = context.issue.number;
github.rest.issues.addLabels({
issue_number: issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['docs-update-required']
})

- name: "Add Label: helm-update-required"
if: steps.file_changes.outputs.helmUpdateRequired == 'true'
uses: actions/github-script@v7
with:
script: |
const issue_number = context.issue.number;
github.rest.issues.addLabels({
issue_number: issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['helm-update-required']
})
2 changes: 1 addition & 1 deletion .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build_and_push_images:
uses: ./.github/workflows/build-images.yml
uses: ./.github/workflows/component_build-images.yml
if: github.repository == 'open-telemetry/opentelemetry-demo'
with:
push: true
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:

jobs:
build_and_push_images:
uses: ./.github/workflows/build-images.yml
uses: ./.github/workflows/component_build-images.yml
if: github.repository == 'open-telemetry/opentelemetry-demo'
with:
push: true
version: ${{ github.event.release.tag_name }}
Expand Down
Loading
Loading