Add jaeger service to staging to view Garage traces

This commit is contained in:
Alex 2022-09-26 15:53:32 +02:00
parent 711b788eb4
commit 32658ff4d3
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE
3 changed files with 111 additions and 18 deletions

View file

@ -30,4 +30,4 @@ index = "index.html"
api_bind_addr = "0.0.0.0:3909" api_bind_addr = "0.0.0.0:3909"
admin_token = "{{ key "secrets/garage-staging/admin_token" | trimSpace }}" admin_token = "{{ key "secrets/garage-staging/admin_token" | trimSpace }}"
metrics_token = "{{ key "secrets/garage-staging/metrics_token" | trimSpace }}" metrics_token = "{{ key "secrets/garage-staging/metrics_token" | trimSpace }}"
#trace_sink = "http://{{ env "attr.unique.network.ip-address" }}:4317" trace_sink = "http://jaeger-otlp-grpc.service.staging.consul:4317"

View file

@ -79,7 +79,7 @@ job "garage-staging" {
resources { resources {
memory = 2000 memory = 2000
memory_max = 3000 memory_max = 3000
cpu = 1000 cpu = 500
} }
kill_signal = "SIGINT" kill_signal = "SIGINT"

View file

@ -44,7 +44,7 @@ job "telemetry" {
resources { resources {
memory = 500 memory = 500
cpu = 500 cpu = 200
} }
service { service {
@ -102,8 +102,8 @@ job "telemetry" {
} }
resources { resources {
memory = 200 memory = 100
cpu = 1000 cpu = 100
} }
} }
@ -114,36 +114,36 @@ job "telemetry" {
network_mode = "host" network_mode = "host"
ports = [ "grafana" ] ports = [ "grafana" ]
volumes = [ volumes = [
"../alloc/data:/var/lib/grafana", "../alloc/data:/var/lib/grafana",
"secrets/prometheus.yaml:/etc/grafana/provisioning/datasources/prometheus.yaml" "secrets/prometheus.yaml:/etc/grafana/provisioning/datasources/prometheus.yaml"
] ]
} }
template { template {
data = file("../config/grafana-datasource-prometheus.yaml") data = file("../config/grafana-datasource-prometheus.yaml")
destination = "secrets/prometheus.yaml" destination = "secrets/prometheus.yaml"
} }
template { template {
data = <<EOH data = <<EOH
GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel,grafana-worldmap-panel,grafana-polystat-panel GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel,grafana-worldmap-panel,grafana-polystat-panel
GF_SERVER_HTTP_PORT=3719 GF_SERVER_HTTP_PORT=3719
EOH EOH
destination = "secrets/env" destination = "secrets/env"
env = true env = true
} }
resources { resources {
memory = 500 memory = 300
cpu = 100 cpu = 300
} }
service { service {
tags = [ tags = [
"grafana", "grafana",
"tricot grafana.staging.deuxfleurs.org", "tricot grafana.staging.deuxfleurs.org",
] ]
port = 3719 port = 3719
address_mode = "driver" address_mode = "driver"
name = "grafana" name = "grafana"
check { check {
@ -181,9 +181,102 @@ EOH
} }
resources { resources {
memory = 200 memory = 100
cpu = 100 cpu = 100
} }
} }
} }
group "jaeger" {
count = 1
network {
port "jaeger-frontend" {
to = 16686
}
port "jaeger-otlp-grpc" {
static = 4317
to = 4317
}
port "jaeger-otlp-http" {
static = 4318
to = 4318
}
}
task "jaeger" {
driver = "docker"
config {
image = "jaegertracing/all-in-one:1.36"
ports = [ "jaeger-frontend", "jaeger-otlp-grpc", "jaeger-otlp-http" ]
}
resources {
memory = 2000
cpu = 300
}
template {
data = <<EOH
COLLECTOR_OTLP_ENABLED=true
EOH
destination = "secrets/env"
env = true
}
service {
port = "jaeger-frontend"
address_mode = "host"
name = "jaeger-frontend"
tags = [ "tricot jaeger.staging.deuxfleurs.org" ]
check {
type = "tcp"
port = "jaeger-frontend"
address_mode = "host"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
service {
port = "jaeger-otlp-grpc"
address_mode = "host"
name = "jaeger-otlp-grpc"
check {
type = "tcp"
port = "jaeger-otlp-grpc"
address_mode = "host"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
service {
port = "jaeger-otlp-http"
address_mode = "host"
name = "jaeger-otlp-http"
check {
type = "tcp"
port = "jaeger-otlp-grpc"
address_mode = "host"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
} }