Docker deployment
You are viewing the English version of this page because it has not yet been fully translated. Interested in helping out? See Contributing.
Prerequisites
- Docker
- Docker Compose v2.0.0+
- Make (optional)
- 6 GB of RAM for the application (or ~3 GB using minimal mode)
- 14 GB of disk space
Get and run the demo
Clone the Demo repository:
git clone https://github.com/open-telemetry/opentelemetry-demo.gitChange to the demo folder:
cd opentelemetry-demo/Start the demo1:
make startdocker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.full.yaml \ -f compose.observability.yaml -f compose.extras.yaml \ up --force-recreate --remove-orphans --detachNotăA bare
docker compose uploads onlycompose.yaml. That starts the web store, but without Kafka or any of the observability backends, so there is nowhere to view the telemetry. Pass the files explicitly, as shown above, or usemake start.Deployment modes
The demo supports several deployment modes. The default
make startruns the full demo with all services and the observability stack. Other modes let you reduce resource usage or exclude certain components:Mode Make target Description Full make startAll services and observability backends (default) Minimal make start-minimalExcludes Kafka and its dependent services ( accounting,fraud-detection,kafka), reducing memory usage to ~3 GBNo observability make start-no-o11yAll services without the observability backends (Jaeger, Grafana, Prometheus, OpenSearch) Minimal, no observability make start-minimal-no-o11yMinimal services without the observability backends Profiling make start-profilingFull mode with an eBPF profiler and the Firepit UI for profiling data Agentic make start-agenticFull mode with an AI agent, MCP server, and chatbot for interacting with the demo For example, to start the demo in minimal mode:
make start-minimaldocker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.observability.yaml -f compose.extras.yaml \ up --force-recreate --remove-orphans --detachRun with the AI agent
The agent, MCP server, and chatbot are not started by default. To add them1:
make start-agenticdocker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.full.yaml \ -f compose.observability.yaml -f compose.extras.yaml \ -f compose.agent.yaml \ up --force-recreate --remove-orphans --detachThis adds the Chatbot UI at http://localhost:8080/chatbot/. By default the agent replays recorded LLM responses (
USE_VCR=True), so no API key is required. To talk to a real LLM, setLLM_BASE_URL,LLM_MODEL, andAPI_KEYin.env.override.Run with continuous profiling
To add the eBPF profiler and the Firepit profiling UI1:
make start-profilingdocker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.full.yaml \ -f compose.observability.yaml -f compose.profiling.yaml \ -f compose.extras.yaml \ up --force-recreate --remove-orphans --detachProfiles are then available at http://localhost:8080/profiles/.
(Optional) Run telemetry sanity tests:
The demo includes a suite of telemetry sanity tests that verify each service is producing traces, metrics, and logs and that they reach the expected backends (Jaeger, Prometheus, OpenSearch). For details, see test/telemetry/README.md.
Test scope Make target Starts Full make run-telemetry-testsFull deployment ( make start)Minimal make run-telemetry-tests-minimalMinimal deployment ( make start-minimal)Agentic make run-telemetry-tests-agenticAgentic deployment (with agent, MCP, and chatbot) Each target builds the test image from
./test/telemetry, starts the corresponding deployment, runs the tests, and then tears down the demo.make run-telemetry-tests# The demo must be running before you start the tests. docker build -t opentelemetry-demo-telemetry-tests ./test/telemetry docker run --rm --network opentelemetry-demo \ --env-file .env --env-file .env.override \ -e TEST_SCOPE=full \ opentelemetry-demo-telemetry-tests(Optional) Run the frontend end-to-end tests1:
The Cypress frontend tests run against a demo that is already up:
make run-frontend-testsdocker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.full.yaml \ -f compose.observability.yaml -f compose.extras.yaml \ -f compose.tests.yaml \ run frontendTests
Verify the web store and Telemetry
Once the images are built and containers are started you can access:
- Web store: http://localhost:8080/
- Load Generator UI: http://localhost:8080/loadgen/
- Flagd configurator UI: http://localhost:8080/feature
- Telemetry documentation (generated by Weaver): http://localhost:8080/telemetry/
The following are available when the observability stack is running (i.e., not
in *-no-o11y modes):
- Grafana: http://localhost:8080/grafana/
- Jaeger UI: http://localhost:8080/jaeger/ui/
- OpAMP UI: http://localhost:8080/opamp/
The following are available only in specific deployment modes:
- Firepit UI (profiling mode): http://localhost:8080/profiles/
- Chatbot (agentic mode): http://localhost:8080/chatbot/
Changing the demo’s primary port number
By default, the demo application will start a proxy for all browser traffic
bound to port 8080. To change the port number, set the ENVOY_PORT environment
variable before starting the demo.
For example, to use port 80811:
ENVOY_PORT=8081 make startENVOY_PORT=8081 docker compose --env-file .env --env-file .env.override \ -f compose.yaml -f compose.full.yaml \ -f compose.observability.yaml -f compose.extras.yaml \ up --force-recreate --remove-orphans --detach
Bring your own backend
Likely you want to use the web store as a demo application for an observability backend you already have (e.g., an existing instance of Jaeger, Zipkin, or one of the vendors of your choice).
OpenTelemetry Collector can be used to export telemetry data to multiple backends. The collector in the demo application layers its configuration from several files, each merged on top of the previous one. Which files are loaded depends on how you start the demo:
otelcol-config.yml— the base configuration, always loadedotelcol-config-full.yml— adds the receivers for services that only run in the full demo, such as Kafkaotelcol-config-observability.yml— wires up the bundled backends (Jaeger, Prometheus, and OpenSearch)otelcol-config-extras.yml— your own additions, always loaded last
make start and make start-minimal load all four files. Starting the demo
without the observability stack loads fewer of them, but
otelcol-config-extras.yml is always applied last, so your changes take
precedence in every mode.
To add your backend, open the file src/otel-collector/otelcol-config-extras.yml with an editor.
Start by adding a new exporter. For example, if your backend supports OTLP over HTTP, add the following:
exporters: otlp_http/example: endpoint: <your-endpoint-url>Then override the
exportersfor telemetry pipelines that you want to use for your backend.service: pipelines: traces: exporters: [debug, otlp_grpc/jaeger, span_metrics, otlp_http/example]
When merging YAML values with the Collector, objects are merged and arrays are
replaced. The span_metrics connector bridges traces to metrics, so it must
be retained on traces exporters and metrics receivers when overriding
those pipelines — omitting it causes the collector to crash. All other
exporters are optional: omitting one simply stops data from being sent to that
backend. The upstream exporter names are:
- traces:
debug,otlp_grpc/jaeger,span_metrics(required) - metrics:
debug,otlp_http/prometheus - logs:
debug,opensearch
Vendor backends might require you to add additional parameters for authentication, please check their documentation. Some backends require different exporters, you may find them and their documentation available at opentelemetry-collector-contrib/exporter.
After updating the otelcol-config-extras.yml, start the demo by running
make start. After a while, you should see the traces flowing into your backend
as well.
Comentariu
A fost utilă această pagină?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!