Skip to content

Commit

Permalink
Reorganize docker-compose examples into subfolders
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenraad Verheyden committed Jun 7, 2021
1 parent 58b5a6e commit e071863
Show file tree
Hide file tree
Showing 38 changed files with 381 additions and 354 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.vscode
/dist
/cmd/tempo-cli/tempo-cli
/example/docker-compose/example-data/tempo
/example/docker-compose/**/tempo-data/
/example/docker-compose/**/gcs-data/
.DS_Store
/tempodb/encoding/benchmark_block
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
version: "3.4"
version: "3"
services:

# Generate fake traces...
synthetic-load-generator:
image: omnition/synthetic-load-generator:1.0.25
volumes:
- ./etc/load-generator.json:/etc/load-generator.json
- ../shared/load-generator.json:/etc/load-generator.json
environment:
- TOPOLOGY_FILE=/etc/load-generator.json
- JAEGER_COLLECTOR_URL=http://agent:14268

# And put them in a Grafana Agent pipeline...
agent:
image: grafana/agent:v0.14.0
image: grafana/agent:v0.15.0
command: [ "-config.file=/etc/agent.yaml" ]
volumes:
- ./etc/agent.yaml:/etc/agent.yaml
command:
- -config.file=/etc/agent.yaml
- ./agent.yaml:/etc/agent.yaml

# To eventually offload to Tempo...
tempo:
image: grafana/tempo:latest
command: ["-config.file=/etc/tempo.yaml"]
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./etc/tempo-local.yaml:/etc/tempo.yaml
- ./example-data/tempo:/tmp/tempo
- ../local/tempo-local.yaml:/etc/tempo.yaml
- ./tempo-data:/tmp/tempo
ports:
- "14268" # jaeger ingest
- "3100" # tempo
- "55680" # otlp grpc
- "55681" # otlp http
- "9411" # zipkin

prometheus:
image: prom/prometheus:latest
command: [ "--config.file=/etc/prometheus.yaml" ]
volumes:
- ../shared/prometheus.yaml:/etc/prometheus.yaml
ports:
- "9090:9090"

grafana:
image: grafana/grafana:7.5.1
image: grafana/grafana:7.5.7
volumes:
- ./example-data/datasources:/etc/grafana/provisioning/datasources
- ./example-data/dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ../../operations/tempo-mixin/out:/var/lib/grafana/dashboards
- ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ This example highlights setting up the Grafana Agent in a simple tracing pipelin
1. First start up the stack.

```console
docker-compose -f docker-compose.agent.yaml up -d
docker-compose up -d
```

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

```console
docker-compose -f docker-compose.agent.yaml ps
docker-compose ps
```
```
Name Command State Ports
----------------------------------------------------------------------------------------------------------
dockercompose_agent_1 /bin/agent -config.file=/e ... Up
dockercompose_grafana_1 /run.sh Up 0.0.0.0:3000->3000/tcp
dockercompose_synthetic-load-generator_1 ./start.sh Up
dockercompose_tempo_1 /tempo --target=all --mult ... Up 0.0.0.0:8081->80/tcp
agent_agent_1 /bin/agent -config.file=/e ... Up
agent_grafana_1 /run.sh Up 0.0.0.0:3000->3000/tcp
agent_synthetic-load-generator_1 ./start.sh Up
agent_tempo_1 /tempo --target=all --mult ... Up 0.0.0.0:8081->80/tcp
```

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

3. The synthetic-load-generator is now printing out trace ids it's flushing into Tempo. To view its logs use -
Expand All @@ -46,10 +46,10 @@ Emitted traceId <traceid> for service frontend route /cart

Copy one of these trace ids.

4. Navigate to [Grafana](http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Tempo%22,%7B%7D%5D) and paste the trace id to request it from Tempo.
4. Navigate to [Grafana](http://localhost:3000/explore) and paste the trace id to request it from Tempo.

5. To stop the setup use -

```console
docker-compose -f docker-compose.agent.yaml down -v
docker-compose down -v
```
57 changes: 57 additions & 0 deletions example/docker-compose/azure/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
version: "3"
services:

tempo:
image: grafana/tempo:latest
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./tempo-azure.yaml:/etc/tempo.yaml
- ./tempo-data:/tmp/tempo
ports:
- "14268" # jaeger
- "3100:3100" # tempo
depends_on:
- azure-cli
- azurite

azurite:
image: mcr.microsoft.com/azure-storage/azurite
ports:
- 10000:10000

# Creates the Azure storage container
azure-cli:
image: mcr.microsoft.com/azure-cli:2.9.1
command: [ "az", "storage","container", "create", "-n","tempo", "--connection-string","DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;" ]
depends_on:
- azurite

synthetic-load-generator:
image: omnition/synthetic-load-generator:1.0.25
volumes:
- ../shared/load-generator.json:/etc/load-generator.json
environment:
- TOPOLOGY_FILE=/etc/load-generator.json
- JAEGER_COLLECTOR_URL=http://tempo:14268
depends_on:
- tempo

prometheus:
image: prom/prometheus:latest
volumes:
- ../shared/prometheus.yaml:/etc/prometheus.yaml
command:
- --config.file=/etc/prometheus.yaml
ports:
- "9090:9090"

grafana:
image: grafana/grafana:7.5.7
volumes:
- ../shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "3000:3000"
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ In this example tempo is configured to write data to Azure via [Azurite](https:/
1. First start up the azure stack.

```console
docker-compose -f docker-compose.azure.azurite.yaml up -d
docker-compose up -d
```

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

```console
docker-compose -f docker-compose.azure.azurite.yaml ps
docker-compose ps
```
```
Name Command State Ports
--------------------------------------------------------------------------------------------------------------------------------------
docker-compose_azure-cli_1 az storage container creat ... Exit 0
docker-compose_azurite_1 docker-entrypoint.sh azuri ... Up 0.0.0.0:10000->10000/tcp, 10001/tcp
docker-compose_grafana_1 /run.sh Up 0.0.0.0:3000->3000/tcp
docker-compose_prometheus_1 /bin/prometheus --config.f ... Up 0.0.0.0:9090->9090/tcp
docker-compose_synthetic-load-generator_1 ./start.sh Up
docker-compose_tempo_1 /tempo -config.file=/etc/t ... Up 0.0.0.0:32768->14268/tcp, 0.0.0.0:3100->3100/tcp
azure_azure-cli_1 az storage container creat ... Exit 0
azure_azurite_1 docker-entrypoint.sh azuri ... Up 0.0.0.0:10000->10000/tcp, 10001/tcp
azure_grafana_1 /run.sh Up 0.0.0.0:3000->3000/tcp
azure_prometheus_1 /bin/prometheus --config.f ... Up 0.0.0.0:9090->9090/tcp
azure_synthetic-load-generator_1 ./start.sh Up
azure_tempo_1 /tempo -config.file=/etc/t ... Up 0.0.0.0:32768->14268/tcp, 0.0.0.0:3100->3100/tcp
```

2. If you're interested you can see the wal/blocks as they are being created. Check [Azure Storage Explorer](https://azure.microsoft.com/en-us/features/storage-explorer/) and [Azurite docs](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azurite).
Expand All @@ -45,11 +45,11 @@ Emitted traceId <traceid> for service frontend route /cart

Copy one of these trace ids.

4. Navigate to [Grafana](http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Tempo%22,%7B%7D%5D) and paste the trace id to request it from Tempo.
4. Navigate to [Grafana](http://localhost:3000/explore) and paste the trace id to request it from Tempo.
Also notice that you can query Tempo metrics from the Prometheus data source setup in Grafana.

5. To stop the setup use -

```console
docker-compose -f docker-compose.azure.azurite.yaml down -v
docker-compose down -v
```
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ingester:
compactor:
compaction:
compaction_window: 1h # blocks in this time window will be compacted together
max_block_bytes: 100_000_000 # maximum size of compacted blocks
max_block_bytes: 100_000_000 # maximum size of compacted blocks
block_retention: 1h
compacted_block_retention: 10m

Expand Down
61 changes: 0 additions & 61 deletions example/docker-compose/docker-compose.azure.azurite.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions example/docker-compose/docker-compose.multitenant.yaml

This file was deleted.

This file was deleted.

Loading

0 comments on commit e071863

Please sign in to comment.