convert tempo to stack

This commit is contained in:
2024-08-11 06:15:47 -07:00
parent b13b470157
commit fd97d27bd6
2 changed files with 28 additions and 8 deletions

View File

@ -122,19 +122,16 @@ config.volumes = "loki-data = /loki"
## ##
[[deployment]] [[stack]]
name = "tempo-tracing" name = "tempo-tracing"
description = "OTLP: port 4317. HTTP: 3200. GRPC: 9096" description = "OTLP: port 4317. HTTP: 3200. GRPC: 9096"
tags = ["logging"] tags = ["logging"]
deploy = true deploy = true
config.server_id = "demo-server" config.server_id = "demo-server"
config.image.type = "Image" config.file_paths = ["tempo.compose.yaml"]
config.image.params.image = "grafana/tempo" config.git_provider = "git.demo.monitor.dev"
config.restart = "unless-stopped" config.git_account = "mbecks"
config.command = "-server.http-listen-port=3200 -server.grpc-listen-port=9096 --storage.trace.backend=local --storage.trace.local.path=/tmp/tempo/traces --storage.trace.wal.path=/tmp/tempo/wal" config.repo = "mbecks/demo-sync"
config.network = "host" # So it can be reached by Monitor Core at host.docker.internal:4317
config.volumes = "tempo-data = /tmp/tempo"
config.labels = "vector = key-value" # So vector picks up the logs, ships to loki
#################### ####################
# Vector (Logging) # # Vector (Logging) #

23
tempo.compose.yaml Normal file
View File

@ -0,0 +1,23 @@
# https://github.com/grafana/tempo/blob/main/example/docker-compose/shared/tempo.yaml
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: [ "-server.http-listen-port=3200 --storage.trace.backend=local --storage.trace.local.path=/var/tempo/blocks --storage.trace.wal.path=/var/tempo/wal" ]
volumes:
- tempo-data:/var/tempo
network_mode: host # so all the other containers can send to it easily
depends_on:
- init