Skip to content

feat(docker): modular Docker Compose with layered -f files#3229

Open
puckpuck wants to merge 8 commits intoopen-telemetry:mainfrom
puckpuck:puckpuck.demo-modules
Open

feat(docker): modular Docker Compose with layered -f files#3229
puckpuck wants to merge 8 commits intoopen-telemetry:mainfrom
puckpuck:puckpuck.demo-modules

Conversation

@puckpuck
Copy link
Copy Markdown
Contributor

@puckpuck puckpuck commented Apr 9, 2026

Closes #2195
Supersedes #3107 (takes a -f layering approach instead of profiles)

Summary

Replaces the monolithic docker-compose.yml with four composable files:

File Contents
compose.yaml Core/minimal services — always the base
compose.full.yaml Kafka group (accounting, fraud-detection, kafka)
compose.observability.yaml Jaeger, Prometheus, OpenSearch, Grafana
compose.extras.yaml Empty stub for vendor/fork customizations

The OTel Collector config is split into similar layers (otelcol-config.yml, otelcol-config-full.yml, otelcol-config-observability.yml, otelcol-config-extras.yml) and loaded via --config flags in the same order.

Four make targets cover the combinations:

make start                  # full + observability (default)
make start-minimal          # core + observability
make start-no-o11y          # full, no observability stack
make start-minimal-no-o11y  # core only

Forks can update the otherwise empty compose.extras.yaml and otelcol-config-extras.yml overrides to add custom o11y backends or demo services without touching upstream files.

Replaces monolithic docker-compose.yml with four composable layers:
- compose.yaml: core/minimal services
- compose.full.yaml: Kafka group (accounting, fraud-detection, kafka)
- compose.observability.yaml: Jaeger, Prometheus, OpenSearch, Grafana
- compose.extras.yaml: empty stub for vendor/fork customizations

OTel Collector config split into matching layers loaded via --config flags.

Adds make targets: start, start-minimal, start-no-o11y, start-minimal-no-o11y.
@github-actions github-actions Bot added the helm-update-required Requires an update to the Helm chart when released label Apr 9, 2026
@puckpuck puckpuck marked this pull request as ready for review April 9, 2026 06:01
@puckpuck puckpuck requested a review from a team as a code owner April 9, 2026 06:01
@julianocosta89
Copy link
Copy Markdown
Member

Please, let's not have 4 different collector config files and 4 different compose files.
This will be a mess maintaining and configuring.

Why can't we use docker profiles?
We can keep it all in one single compose file and just configure which profile will be executed via make.

@puckpuck
Copy link
Copy Markdown
Contributor Author

The issue is when you have the same service that is run multiple different ways (collector, checkout, recommendation, etc) based on which profile it belongs to. To make this work with profiles you still need multiple -f files, so with profiles we are now mixing the -f CLI option and the profile construct.

This approach just doesn't use profiles at all and stays with -f, but in a cleaner way than we have today.

@puckpuck puckpuck closed this Apr 15, 2026
@puckpuck puckpuck deleted the puckpuck.demo-modules branch April 15, 2026 21:58
@puckpuck puckpuck restored the puckpuck.demo-modules branch April 16, 2026 02:45
@puckpuck puckpuck reopened this Apr 16, 2026
@rogercoll
Copy link
Copy Markdown
Contributor

Please, let's not have 4 different collector config files and 4 different compose files. This will be a mess maintaining and configuring.

Why can't we use docker profiles? We can keep it all in one single compose file and just configure which profile will be executed via make.

I would also prefer not having 4 different compose files, but we might require them either way with Docker Profiles. Profiles can't patch services across boundaries, thus services like checkout needs KAFKA_ADDR and depends_on: kafka only in full mode, and otel-collector needs depends_on: jaeger/opensearch only with the observability mode. Profiles select which services to start, but they can't conditionally add env vars or dependencies to a service that's always on.

See that in #3107 a new compose.full.yaml was needed for the full profile.

Comment thread compose.yaml
- FLAGD_HOST
- FLAGD_PORT
- FLAGD_UI_HOST
- FLAGD_UI_PORT
Copy link
Copy Markdown
Contributor

@osullivandonal osullivandonal Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need to add these env vars to the front-end proxy to get this to work:

  - TELEMETRY_DOCS_HOST
  - TELEMETRY_DOCS_PORT

Without the above when I run any make start-* the front-end proxy restarts with this error:

: Proto constraint validation failed (BootstrapValidationError.StaticResources: embedded message failed validation | caused by StaticResourcesValidationError.Clusters[9]: embedded message failed validation | caused by ClusterValidationError.LoadAssignment: embedded message failed validation | caused by ClusterLoadAssignmentValidationError.Endpoints[0]: embedded message failed validation | caused by LocalityLbEndpointsValidationError.LbEndpoints[0]: embedded message failed validation | caused by LbEndpointValidationError.Endpoint: embedded message failed validation | caused by EndpointValidationError.Address: embedded message failed validation | caused by AddressValidationError.SocketAddress: embedded message failed validation | caused by SocketAddressValidationError.Address: value length must be at least 1 characters)

@osullivandonal
Copy link
Copy Markdown
Contributor

Even with the added maintenance burden of multiple compose files, I do like the idea of the compose.extras.yaml file to allow forks to easily specify there backends, o11y setup. Makes it a lot easier than the current setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

helm-update-required Requires an update to the Helm chart when released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create OpenTelemetry Demo Light Branch

4 participants