Skip to content

Commit

Permalink
Update docker-compose local example for clarity and compatibility (#287
Browse files Browse the repository at this point in the history
…) (#288)

* Update docker-compose local example for clarity and compatibility (#287)

* Revamp docker-compose example folder: make local storage example the default.  Move static config files to ./etc/ folder.  Move tempo and other storage to ./example-data/ folder

* Update gitignore path for new example path
  • Loading branch information
mdisibio committed Oct 30, 2020
1 parent 15d3a18 commit 2ee9738
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/bin
.idea
/dist
/example/docker-compose/example-data/tempo
11 changes: 5 additions & 6 deletions example/docker-compose/docker-compose.loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ services:
- "-auth.enabled=false" # disables the requirement for the X-Scope-OrgID header
- "-server.http-listen-port=3100"
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- /tmp/tempo:/tmp/tempo
- ./example-data/tempo:/tmp/tempo
ports:
- "14268" # jaeger ingest
logging:
Expand All @@ -23,7 +22,7 @@ services:
image: grafana/tempo-query:latest
command: ["--grpc-storage-plugin.configuration-file=/etc/tempo-query.yaml"]
volumes:
- ./tempo-query.yaml:/etc/tempo-query.yaml
- ./etc/tempo-query.yaml:/etc/tempo-query.yaml
ports:
- "16686:16686" # jaeger-ui
logging:
Expand All @@ -34,7 +33,7 @@ services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yaml:/etc/prometheus.yaml
- ./etc/prometheus.yaml:/etc/prometheus.yaml
entrypoint:
- /bin/prometheus
- --config.file=/etc/prometheus.yaml
Expand All @@ -48,8 +47,8 @@ services:
grafana:
image: grafana/grafana:7.3.0-beta1
volumes:
- ./datasources:/etc/grafana/provisioning/datasources
- ./dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ./example-data/datasources:/etc/grafana/provisioning/datasources
- ./example-data/dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ../../operations/tempo-mixin/out:/var/lib/grafana/dashboards
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,38 @@ services:

tempo:
image: grafana/tempo:latest
command:
- "-storage.trace.backend=local" # tell tempo where to permanently put traces
- "-storage.trace.local.path=/tmp/tempo/traces"
- "-storage.trace.wal.path=/tmp/tempo/wal" # tell tempo where to store the wal
- "-auth.enabled=false" # disables the requirement for the X-Scope-OrgID header
- "-server.http-listen-port=3100"
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- /tmp/tempo:/tmp/tempo
- ./etc/tempo-s3-minio.yaml:/etc/tempo.yaml
- ./example-data/tempo:/tmp/tempo
ports:
- "14268" # jaeger ingest
- "3100" # tempo
- "14268" # jaeger
- "3100:3100" # tempo

minio:
image: minio/minio:RELEASE.2020-07-27T18-37-02Z
environment:
- MINIO_ACCESS_KEY=tempo
- MINIO_SECRET_KEY=supersecret
ports:
- "9000:9000"
entrypoint:
- sh
- -euc
- mkdir -p /data/tempo && /usr/bin/minio server /data

tempo-query:
image: grafana/tempo-query:latest
command: ["--grpc-storage-plugin.configuration-file=/etc/tempo-query.yaml"]
volumes:
- ./tempo-query.yaml:/etc/tempo-query.yaml
- ./etc/tempo-query.yaml:/etc/tempo-query.yaml
ports:
- "16686:16686" # jaeger-ui

synthetic-load-generator:
image: omnition/synthetic-load-generator:1.0.25
volumes:
- ./load-generator.json:/etc/load-generator.json
- ./etc/load-generator.json:/etc/load-generator.json
environment:
- TOPOLOGY_FILE=/etc/load-generator.json
- JAEGER_COLLECTOR_URL=http://tempo:14268
Expand All @@ -37,7 +44,7 @@ services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yaml:/etc/prometheus.yaml
- ./etc/prometheus.yaml:/etc/prometheus.yaml
entrypoint:
- /bin/prometheus
- --config.file=/etc/prometheus.yaml
Expand All @@ -47,8 +54,8 @@ services:
grafana:
image: grafana/grafana:7.3.0-beta1
volumes:
- ./datasources:/etc/grafana/provisioning/datasources
- ./dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ./example-data/datasources:/etc/grafana/provisioning/datasources
- ./example-data/dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ../../operations/tempo-mixin/out:/var/lib/grafana/dashboards
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
Expand Down
30 changes: 9 additions & 21 deletions example/docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,24 @@ services:
image: grafana/tempo:latest
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- /tmp/tempo:/tmp/tempo
- ./etc/tempo-local.yaml:/etc/tempo.yaml
- ./example-data/tempo:/tmp/tempo
ports:
- "14268" # jaeger
- "3100:3100" # tempo

minio:
image: minio/minio:RELEASE.2020-07-27T18-37-02Z
environment:
- MINIO_ACCESS_KEY=tempo
- MINIO_SECRET_KEY=supersecret
ports:
- "9000:9000"
entrypoint:
- sh
- -euc
- mkdir -p /data/tempo && /usr/bin/minio server /data
- "14268" # jaeger ingest
- "3100" # tempo

tempo-query:
image: grafana/tempo-query:latest
command: ["--grpc-storage-plugin.configuration-file=/etc/tempo-query.yaml"]
volumes:
- ./tempo-query.yaml:/etc/tempo-query.yaml
- ./etc/tempo-query.yaml:/etc/tempo-query.yaml
ports:
- "16686:16686" # jaeger-ui

synthetic-load-generator:
image: omnition/synthetic-load-generator:1.0.25
volumes:
- ./load-generator.json:/etc/load-generator.json
- ./etc/load-generator.json:/etc/load-generator.json
environment:
- TOPOLOGY_FILE=/etc/load-generator.json
- JAEGER_COLLECTOR_URL=http://tempo:14268
Expand All @@ -44,7 +32,7 @@ services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yaml:/etc/prometheus.yaml
- ./etc/prometheus.yaml:/etc/prometheus.yaml
entrypoint:
- /bin/prometheus
- --config.file=/etc/prometheus.yaml
Expand All @@ -54,8 +42,8 @@ services:
grafana:
image: grafana/grafana:7.3.0-beta1
volumes:
- ./datasources:/etc/grafana/provisioning/datasources
- ./dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ./example-data/datasources:/etc/grafana/provisioning/datasources
- ./example-data/dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ../../operations/tempo-mixin/out:/var/lib/grafana/dashboards
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 9 additions & 6 deletions example/docker-compose/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ make docker-images
Tempo can be run with local storage, S3, or GCS backends. See below for examples of [local](#local-storage) and [S3 (Minio)](#s3) storage.

### Local Storage
In this example all data is stored locally in the example-data/tempo folder.

1. First start up the local stack.
1. First start up the local stack.
```
docker-compose -f docker-compose.local.yaml up -d
docker-compose up -d
```

At this point, the following containers should be spun up -
Expand All @@ -43,7 +44,7 @@ docker-compose_tempo_1 /tempo -storage.trace.back ... Up

2. If you're interested you can see the wal/blocks as they are being created.
```
ls /tmp/tempo
ls ./example-data/tempo
```

3. The synthetic-load-generator is now printing out trace ids it's flushing into Tempo. To view its logs use -
Expand Down Expand Up @@ -71,14 +72,15 @@ Also notice that you can query Tempo metrics from the Prometheus data source set
5. To stop the setup use -

```console
docker-compose -f docker-compose.local.yaml down -v
docker-compose down -v
```

### S3
In this example tempo is configured to write data to S3 via MinIO which presents an S3 compatible API.

1. First start up the s3 stack.
```
docker-compose up -d
docker-compose -f docker-compose.s3.minio.yaml up -d
```

At this point, the following containers should be spun up -
Expand Down Expand Up @@ -124,10 +126,11 @@ Also notice that you can query Tempo metrics from the Prometheus data source set
5. To stop the setup use -

```console
docker-compose down -v
docker-compose -f docker-compose.s3.minio.yaml down -v
```

## Loki Derived Fields
This example presents a complete setup using Loki to process all container logs, and linking between the extracted traceIDs and tempo.

1. First we have to install the Loki docker driver. This allows applications in our docker-compose to ship their logs
to Loki.
Expand Down

0 comments on commit 2ee9738

Please sign in to comment.