Skip to content

Commit

Permalink
Update docker compose examples (#3603)
Browse files Browse the repository at this point in the history
* Update local example to mention the path ownership required

* Drop grafana7.4 docker-compose example

* Drop docker-compose example for gcs

* Drop docker-compose example for azure

* Drop docker-compose example for s3

* Update docker compose examples

* Drop deprecated `version` field
* Add init service to chown the volume on startup and set dependency for ordered startup
* Use yaml reference for docker image specification

* Update docker compose example commands for deprecation

* Update top docker-compose readme to point to our docs

* Update integration readme for docker compose command deprecation

* Update tk readme for docker compose command deprecation

* Remove s3 docker compose example and point to the top of the example/docker-compose

* Update wording slightly

* Update changelog

* Be less specific about the possible backend configurations.
  • Loading branch information
zalegrala authored Apr 24, 2024
1 parent 148ba6d commit 9caf167
Show file tree
Hide file tree
Showing 37 changed files with 203 additions and 1,330 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
This impacts impacts all users of the `grafana/tempo` Docker image.
* [CHANGE] Return a less confusing error message to the client when refusing spans due to ingestion rates. [#3485](https://github.com/grafana/tempo/pull/3485) (@ie-pham)
* [CHANGE] Clean Metrics Generator's Prometheus wal before creating instance [#3548](https://github.com/grafana/tempo/pull/3548) (@ie-pham)
* [CHANGE] Update docker examples for permissions, deprecations, and clean-up [#3603](https://github.com/grafana/tempo/pull/3603) (@zalegrala)
* [ENHANCEMENT] Add string interning to TraceQL queries [#3411](https://github.com/grafana/tempo/pull/3411) (@mapno)
* [ENHANCEMENT] Add new (unsafe) query hints for metrics queries [#3396](https://github.com/grafana/tempo/pull/3396) (@mdisibio)
* [ENHANCEMENT] Add nestedSetLeft/Right/Parent instrinsics to TraceQL. [#3497](https://github.com/grafana/tempo/pull/3497) (@joe-elliott)
Expand Down
3 changes: 2 additions & 1 deletion docs/sources/tempo/getting-started/docker-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ weight: 600
The Tempo repository provides [multiple examples](https://github.com/grafana/tempo/tree/main/example/docker-compose) to help you quickly get started using Tempo and distributed tracing data.

Every example has a `docker-compose.yaml` manifest that includes all of the options needed to explore trace data in Grafana, including resource configuration and trace data generation.
The Tempo examples running with Docker using docker-compose all include a version of Tempo and a storage configuration like Amazon S3 and GCS.

The Tempo examples running with Docker using docker-compose include a version of Tempo and a storage configuration suitable for testing or development.

This quick start guide uses the `local` example running Tempo as a single binary (monolithic). Any data is stored locally in the `tempo-data` folder.
To learn more, read the [local storage example README](https://github.com/grafana/tempo/blob/main/example/docker-compose/local).
Expand Down
3 changes: 1 addition & 2 deletions docs/sources/tempo/setup/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ To enable this mode, `-target=all` is used, which is the default.

Find docker-compose deployment examples at:

- [https://github.com/grafana/tempo/tree/main/example/docker-compose/local](https://github.com/grafana/tempo/tree/main/example/docker-compose/local)
- [https://github.com/grafana/tempo/tree/main/example/docker-compose/s3](https://github.com/grafana/tempo/tree/main/example/docker-compose/s3)
- [https://github.com/grafana/tempo/tree/main/example/docker-compose](https://github.com/grafana/tempo/tree/main/example/docker-compose/)

### Scaling monolithic mode

Expand Down
42 changes: 27 additions & 15 deletions example/docker-compose/agent/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
version: "3"
services:

# Tempo runs as user 10001, and docker compose creates the volume as root.
# As such, we need to chown the volume in order for Tempo to start correctly.
init:
image: &tempoImage grafana/tempo:latest
user: root
entrypoint:
- "chown"
- "10001:10001"
- "/var/tempo"
volumes:
- ./tempo-data:/var/tempo

tempo:
image: *tempoImage
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ../shared/tempo.yaml:/etc/tempo.yaml
- ./tempo-data:/var/tempo
ports:
- "14268" # jaeger ingest
- "3200" # tempo
- "4317" # otlp grpc
- "4318" # otlp http
- "9411" # zipkin2024-04-23T16:16:57+0000
depends_on:
- init

# Generate fake traces...
k6-tracing:
image: ghcr.io/grafana/xk6-client-tracing:v0.0.2
Expand All @@ -19,20 +45,6 @@ services:
- /bin/agent
- -config.file=/etc/agent.yaml

# To eventually offload to Tempo...
tempo:
image: grafana/tempo:latest
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ../shared/tempo.yaml:/etc/tempo.yaml
- ./tempo-data:/var/tempo
ports:
- "14268" # jaeger ingest
- "3200" # tempo
- "4317" # otlp grpc
- "4318" # otlp http
- "9411" # zipkin

prometheus:
image: prom/prometheus:latest
command:
Expand Down
6 changes: 3 additions & 3 deletions example/docker-compose/agent/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This example highlights setting up the Grafana Agent in a simple tracing pipelin
1. First start up the stack.

```console
docker-compose up -d
docker compose up -d
```

At this point, the following containers should be spun up -

```console
docker-compose ps
docker compose ps
```
```
Name Command State Ports
Expand All @@ -37,5 +37,5 @@ tab to find traces.
4. To stop the setup use -

```console
docker-compose down -v
docker compose down -v
```
59 changes: 0 additions & 59 deletions example/docker-compose/azure/docker-compose.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions example/docker-compose/azure/readme.md

This file was deleted.

51 changes: 0 additions & 51 deletions example/docker-compose/azure/tempo-azure.yaml

This file was deleted.

31 changes: 15 additions & 16 deletions example/docker-compose/cross-cluster/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
version: "3"
services:

# tempo - a
distributor-a:
image: grafana/tempo:latest
image: &tempoImage grafana/tempo:latest
command: "-target=distributor -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -12,7 +11,7 @@ services:
- "3200" # tempo

ingester-0-a:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=ingester -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -21,7 +20,7 @@ services:
- "3200" # tempo

ingester-1-a:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=ingester -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -30,7 +29,7 @@ services:
- "3200" # tempo

ingester-2-a:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=ingester -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -39,7 +38,7 @@ services:
- "3200" # tempo

query-frontend-a:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=query-frontend -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -48,7 +47,7 @@ services:
- "3200" # tempo

querier-a:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=querier -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -57,7 +56,7 @@ services:
- "3200" # tempo

compactor-a:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=compactor -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -66,7 +65,7 @@ services:
- "3200" # tempo

metrics-generator-a:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=metrics-generator -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -77,7 +76,7 @@ services:
# tempo - b
# there is purposefully no compactor-b. only one cell can compactor or there will be job collisions
distributor-b:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=distributor -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -86,7 +85,7 @@ services:
- "3200" # tempo

ingester-0-b:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=ingester -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -95,7 +94,7 @@ services:
- "3200" # tempo

ingester-1-b:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=ingester -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -104,7 +103,7 @@ services:
- "3200" # tempo

ingester-2-b:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=ingester -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -113,7 +112,7 @@ services:
- "3200" # tempo

query-frontend-b:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=query-frontend -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -122,7 +121,7 @@ services:
- "3200" # tempo

querier-b:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=querier -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand All @@ -131,7 +130,7 @@ services:
- "3200" # tempo

metrics-generator-b:
image: grafana/tempo:latest
image: *tempoImage
command: "-target=metrics-generator -config.file=/etc/tempo.yaml"
restart: always
volumes:
Expand Down
Loading

0 comments on commit 9caf167

Please sign in to comment.