Docker deployment
Prerequisites
- Docker
- Docker Compose v2.0.0+
- Make (optional)
- 6 GB of RAM for the application
Get and run the demo
Clone the Demo repository:
git clone https://github.com/open-telemetry/opentelemetry-demo.git
Change to the demo folder:
cd opentelemetry-demo/
Start the demo1:
make start
docker compose up --force-recreate --remove-orphans --detach
(Optional) Enable API observability-driven testing1:
make start-odd
docker compose --profile odd up --force-recreate --remove-orphans --detach
Verify the web store and Telemetry
Once the images are built and containers are started you can access:
- Web store: http://localhost:8080/
- Grafana: http://localhost:8080/grafana/
- Load Generator UI: http://localhost:8080/loadgen/
- Jaeger UI: http://localhost:8080/jaeger/ui/
- Tracetest UI: http://localhost:11633/, only when using
make start-odd
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 start
ENVOY_PORT=8081 docker compose 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. By default, the collector in the demo application will merge the configuration from two files:
otelcol-config.yml
otelcol-config-extras.yml
To add your backend, open the file src/otelcollector/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: otlphttp/example: endpoint: <your-endpoint-url>
Then override the
exporters
for telemetry pipelines that you want to use for your backend.service: pipelines: traces: exporters: [spanmetrics, otlphttp/example]
Note
When merging YAML values with the Collector, objects are merged and arrays are replaced. Thespanmetrics
exporter must be included in the array of exporters for the traces
pipeline if
overridden. Not including this exporter will result in an error.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.
docker-compose
is deprecated. For details, see Migrate to Compose V2. ↩︎ ↩︎ ↩︎