diff options
Diffstat (limited to 'cluster/staging')
-rw-r--r-- | cluster/staging/app/garage/config/garage.toml | 2 | ||||
-rw-r--r-- | cluster/staging/app/garage/deploy/garage.hcl | 2 | ||||
-rw-r--r-- | cluster/staging/app/telemetry/deploy/telemetry.hcl | 125 |
3 files changed, 111 insertions, 18 deletions
diff --git a/cluster/staging/app/garage/config/garage.toml b/cluster/staging/app/garage/config/garage.toml index 19ee22f..1cb3c6f 100644 --- a/cluster/staging/app/garage/config/garage.toml +++ b/cluster/staging/app/garage/config/garage.toml @@ -30,4 +30,4 @@ index = "index.html" api_bind_addr = "0.0.0.0:3909" admin_token = "{{ key "secrets/garage-staging/admin_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" diff --git a/cluster/staging/app/garage/deploy/garage.hcl b/cluster/staging/app/garage/deploy/garage.hcl index fee8b59..55f8d75 100644 --- a/cluster/staging/app/garage/deploy/garage.hcl +++ b/cluster/staging/app/garage/deploy/garage.hcl @@ -79,7 +79,7 @@ job "garage-staging" { resources { memory = 2000 memory_max = 3000 - cpu = 1000 + cpu = 500 } kill_signal = "SIGINT" diff --git a/cluster/staging/app/telemetry/deploy/telemetry.hcl b/cluster/staging/app/telemetry/deploy/telemetry.hcl index cfd26f3..b141781 100644 --- a/cluster/staging/app/telemetry/deploy/telemetry.hcl +++ b/cluster/staging/app/telemetry/deploy/telemetry.hcl @@ -44,7 +44,7 @@ job "telemetry" { resources { memory = 500 - cpu = 500 + cpu = 200 } service { @@ -102,8 +102,8 @@ job "telemetry" { } resources { - memory = 200 - cpu = 1000 + memory = 100 + cpu = 100 } } @@ -114,36 +114,36 @@ job "telemetry" { network_mode = "host" ports = [ "grafana" ] volumes = [ - "../alloc/data:/var/lib/grafana", + "../alloc/data:/var/lib/grafana", "secrets/prometheus.yaml:/etc/grafana/provisioning/datasources/prometheus.yaml" ] } template { data = file("../config/grafana-datasource-prometheus.yaml") - destination = "secrets/prometheus.yaml" + destination = "secrets/prometheus.yaml" } template { data = <<EOH -GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel,grafana-worldmap-panel,grafana-polystat-panel -GF_SERVER_HTTP_PORT=3719 -EOH - destination = "secrets/env" - env = true + GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel,grafana-worldmap-panel,grafana-polystat-panel + GF_SERVER_HTTP_PORT=3719 + EOH + destination = "secrets/env" + env = true } resources { - memory = 500 - cpu = 100 + memory = 300 + cpu = 300 } service { tags = [ - "grafana", - "tricot grafana.staging.deuxfleurs.org", + "grafana", + "tricot grafana.staging.deuxfleurs.org", ] - port = 3719 + port = 3719 address_mode = "driver" name = "grafana" check { @@ -181,9 +181,102 @@ EOH } resources { - memory = 200 + memory = 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 + } + } + } + } + } } |