Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize docker-compose examples into subfolders #740

Merged
merged 3 commits into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion docs/tempo/website/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ server:
See [here](https://github.com/grafana/tempo/blob/main/modules/distributor/config.go) for all configuration options.

Distributors are responsible for receiving spans and forwarding them to the appropriate ingesters. The below configuration
exposes the otlp receiver on port 0.0.0.0:5680. [This configuration](https://github.com/grafana/tempo/blob/main/example/docker-compose/etc/tempo-s3-minio.yaml) shows how to
exposes the otlp receiver on port 0.0.0.0:5680. [This configuration](https://github.com/grafana/tempo/blob/main/example/docker-compose/local/tempo-local.yaml) shows how to
configure all available receiver options.

```
Expand Down
2 changes: 1 addition & 1 deletion docs/tempo/website/configuration/multitenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ of a header: `X-Scope-OrgID`. This guide details how to setup multitenancy.

## Multitenancy

If you're interested in setting up multitenancy, please consult the [multitenant example](https://github.com/grafana/tempo/tree/main/example/docker-compose/docker-compose.multitenant.yaml)
If you're interested in setting up multitenancy, please consult the [multitenant example](https://github.com/grafana/tempo/tree/main/example/docker-compose/otel-collector-multitenant)
in the repo. This example uses the following settings to achieve multitenancy in Tempo:

- Configure the OTEL Collector to attach the X-Scope-OrgID header on push:
Expand Down
2 changes: 1 addition & 1 deletion docs/tempo/website/configuration/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Note that the port of 3100 is a common port used in our examples. Tempo default
## Grafana 7.4.x

Grafana 7.4.x is *not* able to query Tempo directly and requires the tempo-query component as an intermediary. In this case
you need to run Tempo-Query and direct it at Tempo proper. Check out [the Grafana 7.4.x example](https://github.com/grafana/tempo/tree/main/example/docker-compose#grafana-74x) to help with configuration.
you need to run Tempo-Query and direct it at Tempo proper. Check out [the Grafana 7.4.x example](https://github.com/grafana/tempo/tree/main/example/docker-compose/grafana7.4) to help with configuration.

The url entered will be `http://<tempo-query hostname>:16686/`.
2 changes: 1 addition & 1 deletion docs/tempo/website/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Getting started with Tempo is easy.
- If you're looking for examples of how to get started with Tempo, check out the [examples]({{< relref "example-demo-app.md" >}}) topic.
- For production workloads, refer to the [deployment]({{< relref "../operations/deployment" >}}) section.

> **Note:** The Grafana Agent is already set up to use Tempo. Refer to the [configuration](https://github.com/grafana/agent/blob/main/docs/configuration-reference.md#tempo_config) and [example](https://github.com/grafana/agent/blob/main/example/docker-compose/agent/config/agent.yaml) for details.
> **Note:** The Grafana Agent is already set up to use Tempo. Refer to the [configuration](https://github.com/grafana/agent/blob/main/docs/configuration-reference.md#tempo_config) and [example](https://github.com/grafana/agent/blob/main/example/docker-compose/agent/agent.yaml) for details.


## 4. Visualization (Grafana)
Expand Down
2 changes: 1 addition & 1 deletion docs/tempo/website/operations/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ The Compactors stream blocks to and from the backend storage to reduce the total

When using older versions of Grafana (7.4.x), you must also use `tempo-query` in order to visualize traces. The
`tempo-query` is [Jaeger Query](https://www.jaegertracing.io/docs/1.19/deployment/#query-service--ui) with a [GRPC Plugin](https://github.com/jaegertracing/jaeger/tree/master/plugin/storage/grpc) that allows it to query Tempo.
For more information, refer to [these example](https://github.com/grafana/tempo/tree/main/example/docker-compose#grafana-74x) and [these docs](../../configuration/querying).
For more information, refer to [these example](https://github.com/grafana/tempo/tree/main/example/docker-compose/grafana7.4) and [these docs](../../configuration/querying).
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