Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjt committed Dec 6, 2024
2 parents 296070e + 615449a commit 32eca07
Show file tree
Hide file tree
Showing 95 changed files with 18,481 additions and 6,530 deletions.
35 changes: 22 additions & 13 deletions .env
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@


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

# Build Args
TRACETEST_IMAGE_VERSION=v1.7.1
OTEL_JAVA_AGENT_VERSION=2.9.0
OPENTELEMETRY_CPP_VERSION=1.17.0

# Dependent images
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.105.0
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.11.1
GRAFANA_IMAGE=grafana/grafana:11.1.1
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.59
# must also update version field in ./src/grafana/provisioning/datasources/opensearch.yaml
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.15.0
POSTGRES_IMAGE=postgres:16.3
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.53.1
VALKEY_IMAGE=valkey/valkey:7.2-alpine
# must also update the version arg in ./test/tracetesting/Dockerfile
TRACETEST_IMAGE=kubeshop/tracetest:v1.4.2
COLLECTOR_CONTRIB_IMAGE=otel/opentelemetry-collector-contrib:0.113.0
FLAGD_IMAGE=ghcr.io/open-feature/flagd:v0.11.4
GRAFANA_IMAGE=grafana/grafana:11.3.0
JAEGERTRACING_IMAGE=jaegertracing/all-in-one:1.62.0
# must also update version field in src/grafana/provisioning/datasources/opensearch.yaml
OPENSEARCH_IMAGE=opensearchproject/opensearch:2.18.0
POSTGRES_IMAGE=postgres:17.0
PROMETHEUS_IMAGE=quay.io/prometheus/prometheus:v2.55.1
VALKEY_IMAGE=valkey/valkey:8.0-alpine
TRACETEST_IMAGE=kubeshop/tracetest:${TRACETEST_IMAGE_VERSION}

# Demo Platform
ENV_PLATFORM=local
Expand Down Expand Up @@ -125,10 +129,15 @@ SHIPPING_SERVICE_DOCKERFILE=./src/shippingservice/Dockerfile
# ******************
# Dependent Services
# ******************
# flagd
# Flagd
FLAGD_HOST=flagd
FLAGD_PORT=8013

# Flagd UI
FLAGD_UI_HOST=flagdui
FLAGD_UI_PORT=4000
FLAGD_UI_DOCKERFILE=./src/flagd-ui/Dockerfile

# Kafka
KAFKA_SERVICE_PORT=9092
KAFKA_SERVICE_ADDR=kafka:${KAFKA_SERVICE_PORT}
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ updates:
interval: "daily"
labels:
- "infra"
- package-ecosystem: "gomod"
directories:
- "/src/checkoutservice"
- "/src/productcatalogservice"
groups:
go-production-dependencies:
dependency-type: "production"
schedule:
interval: "daily"
33 changes: 32 additions & 1 deletion .github/workflows/component-build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,20 @@ on:
type: string

jobs:
protobufcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate
run: make clean docker-generate-protobuf
- name: Check Clean Work Tree
run: make check-clean-work-tree

build_and_push_images:
runs-on: ubuntu-latest
needs: protobufcheck

permissions:
contents: read
packages: write
Expand Down Expand Up @@ -116,6 +128,10 @@ jobs:
tag_suffix: shippingservice
context: ./
setup-qemu: true
- file: ./src/flagd-ui/Dockerfile
tag_suffix: flagdui
context: ./
setup-qemu: true
- file: ./test/tracetesting/Dockerfile
tag_suffix: traceBasedTests
context: ./
Expand All @@ -125,6 +141,17 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Load environment variables from .env file
run: |
if [ -f .env ]; then
# Filter out comments and empty lines, then add each variable to $GITHUB_ENV
grep -vE '^\s*#|^\s*$' .env | while read -r line; do
echo "$line" >> $GITHUB_ENV
done
else
echo ".env file not found!"
exit 1
fi
- name: Check for changes and set push options
id: check_changes
run: |
Expand Down Expand Up @@ -177,12 +204,16 @@ jobs:
max-parallelism = 2
- name: Matrix Build and push demo images
if: steps.check_changes.outputs.skip == 'false'
uses: docker/build-push-action@v6.5.0
uses: docker/build-push-action@v6.10.0
with:
context: ${{ matrix.file_tag.context }}
file: ${{ matrix.file_tag.file }}
platforms: linux/amd64,linux/arm64
push: ${{ inputs.push }}
build-args: |
OTEL_JAVA_AGENT_VERSION=${{ env.OTEL_JAVA_AGENT_VERSION }}
OPENTELEMETRY_CPP_VERSION=${{ env.OPENTELEMETRY_CPP_VERSION }}
TRACETEST_IMAGE_VERSION=${{ env.TRACETEST_IMAGE_VERSION }}
tags: ${{ steps.docker_metatdata.outputs.tags }}
labels: ${{ steps.docker_metatdata.outputs.labels }}
cache-from: type=gha
Expand Down
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/actions/wrapper-validation@v3.5.0
- uses: gradle/actions/wrapper-validation@v4.2.1
2 changes: 1 addition & 1 deletion .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
uses: actions/checkout@v4
- name: run tracetesting
run: |
make build && make run-tracetesting
make build && docker system prune -f && make run-tracetesting
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ test/tracetesting/tracetesting-vars.yaml
/src/frontend/pb/
/src/frontend/protos/
/src/paymentservice/demo.proto
/src/recommendationservice/demo_pb2*.py
/src/shippingservice/proto/
/src/productcatalogservice/genproto
/src/currencyservice/proto
/src/checkoutservice/genproto
/src/accountingservice/genproto
2 changes: 2 additions & 0 deletions .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"src/featureflagservice/assets/vendor/",
"src/featureflagservice/priv/",
"src/productcatalogservice/genproto/",
"src/recommendationservice/demo_pb2.py",
"src/recommendationservice/demo_pb2_grpc.py",
"internal/tools/"
]
}
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,48 @@ the release.

## Unreleased

* [grafana] Update grafana to 11.3.0
([#1764](https://github.com/open-telemetry/opentelemetry-demo/pull/1764))
* [chore] Move build args to .env file
([#1767](https://github.com/open-telemetry/opentelemetry-demo/pull/1767))
* [frontendproxy] add access logs
([#1768](https://github.com/open-telemetry/opentelemetry-demo/pull/1768))
* [grafana] Fix Dashboards
([#1779](https://github.com/open-telemetry/opentelemetry-demo/pull/1779))
* [accountingservice] bump OpenTelemetry .NET Automatic Instrumentation
to 1.9.0 ([#1780](https://github.com/open-telemetry/opentelemetry-demo/pull/1780))
* [chore] update memory limits for flagd, flagdui, and loadgenerator
([#1786](https://github.com/open-telemetry/opentelemetry-demo/pull/1786))
* [chore] Add multi-platform build support
([#1785](https://github.com/open-telemetry/opentelemetry-demo/pull/1785))
* [chore] Generate protobuf code for Go and Python services
([#1794](https://github.com/open-telemetry/opentelemetry-demo/pull/1784))
* [paymentservice] Add nodejs instrumentation for runtime metrics
([#1797](https://github.com/open-telemetry/opentelemetry-demo/pull/1797))

## 1.12.0

* [accountingservice] allow running the container with non root user
([#1692](https://github.com/open-telemetry/opentelemetry-demo/pull/1692))
* [chore] Add yamllint to `make all`
([#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] Add depends on to otelcol to wait on healthy opensearch
([#1724](https://github.com/open-telemetry/opentelemetry-demo/pull/1724))
* [flagd-ui] Add UI for managing Flagd feature flags
([#1725](https://github.com/open-telemetry/opentelemetry-demo/pull/1725))
* [accountingservice] bump OpenTelemetry .NET Automatic Instrumentation
to 1.8.0 together with other dependencies
([#1727](https://github.com/open-telemetry/opentelemetry-demo/pull/1727))
* [frontend] fix imageSlowLoad headers not applied
to 1.8.0 together with other dependencies
([#1733](https://github.com/open-telemetry/opentelemetry-demo/pull/1733))
* [cartservice] Propagate cartservice exceptions
([#1744](https://github.com/open-telemetry/opentelemetry-demo/pull/1744))
* [cartservice] Update cart service to fail when cartServiceFailure is enabled
([#1748](https://github.com/open-telemetry/opentelemetry-demo/pull/1748))

## 1.11.1

* [otel-col] Add docker stats receiver
Expand Down
56 changes: 48 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Welcome to OpenTelemetry Demo Webstore repository!

Before you start - see OpenTelemetry general
[contributing](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md)
requirements and recommendations.
Before you start - see OpenTelemetry
[Contributor Guide](https://github.com/open-telemetry/community/blob/main/guides/contributor/README.md)
for details on code attribution.

## Join a SIG Call

Expand Down Expand Up @@ -80,11 +80,10 @@ cd .\src\adservice\

### Run Docker Compose

- Start the demo (It can take ~20min the first time the command is executed as
all the images will be build):
- Start the demo:

```shell
docker compose up -d
make start
```

### Verify the Webstore & the Telemetry
Expand Down Expand Up @@ -167,9 +166,9 @@ Open a pull request against the main `opentelemetry-demo` repo.
A PR is considered to be **ready to merge** when:

- It has received approval from
[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
[Approvers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver)
/
[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
[Maintainers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
- Major feedbacks are resolved.
- It has been open for review for at least one working day. This gives people
reasonable time to review.
Expand Down Expand Up @@ -197,6 +196,47 @@ on each other), the owner should try to get people aligned by:
the owner should bring it to the OpenTelemetry Community Demo SIG
[meeting](README.md#contributing).

## Multi-platform Builds

Creating multi-platform builds requires docker buildx to be installed. This
is part of Docker Desktop for macOS, or can be installed using
`apt install docker-buildx` on Ubuntu.

To build and load the multi-platform images locally you will need to configure
docker to use `containerd`. This can be done in Docker Desktop settings on MacOS
or Windows. Please follow
[these instructions](https://docs.docker.com/engine/storage/containerd/#enable-containerd-image-store-on-docker-engine)
to configure Docker Engine on Linux/Ubuntu.

You will need a multi-platform capable builder with a limiter set on parallelism
to avoid errors while building the images. It is recommended to limit the
parallelism to 4. This can be done by specifying a configuration file when
creating the builder. The `buildkitd.toml` file in this repository can be used
as the builder configuration file.

To create a multi-platform builder with a parallelism limit of 4, use the
following command:

```shell
make create-multiplatform-builder
```

A builder will be created and set as the active builder. You can check the
builder status with `docker buildx inspect`. To build multi-platform images for
linux/amd64 and linux/arm64, use the following command:

```shell
make build-multiplatform
```

To build and push multi-platform images to a registry, ensure to set
`IMAGE_NAME` to the name of the registry and image repository to use in the
`.env.override` file and run:

```shell
make build-multiplatform-and-push
```

## Making a new release

Maintainers can create a new release when desired by following these steps.
Expand Down
Loading

0 comments on commit 32eca07

Please sign in to comment.