aboutsummaryrefslogtreecommitdiff
path: root/cluster
diff options
context:
space:
mode:
Diffstat (limited to 'cluster')
-rw-r--r--cluster/staging/app/frontend/deploy/frontend-tricot.hcl10
-rw-r--r--cluster/staging/app/telemetry/config/prometheus.yml10
2 files changed, 19 insertions, 1 deletions
diff --git a/cluster/staging/app/frontend/deploy/frontend-tricot.hcl b/cluster/staging/app/frontend/deploy/frontend-tricot.hcl
index 30ee599..ae46d4a 100644
--- a/cluster/staging/app/frontend/deploy/frontend-tricot.hcl
+++ b/cluster/staging/app/frontend/deploy/frontend-tricot.hcl
@@ -12,6 +12,7 @@ job "frontend" {
network {
port "http_port" { static = 80 }
port "https_port" { static = 443 }
+ port "metrics_port" { static = 8334 }
}
task "server" {
@@ -19,7 +20,7 @@ job "frontend" {
config {
packages = [
- "git+https://git.deuxfleurs.fr/Deuxfleurs/tricot.git?ref=main&rev=0ae7f5fbd924a293dcd3f1b6b61fc3cc46bd3876"
+ "git+https://git.deuxfleurs.fr/Deuxfleurs/tricot.git?ref=main&rev=ba5bf133f61c3a56728c2ab73e11abf47ef8348c"
]
command = "tricot"
# cap_add = [ "net_bind_service" ] # this doesn't work for whatever reason, so we need to put user = "root" instead
@@ -64,6 +65,7 @@ TRICOT_CONSUL_CLIENT_CERT=/etc/tricot/consul-client.crt
TRICOT_CONSUL_CLIENT_KEY=/etc/tricot/consul-client.key
TRICOT_HTTP_BIND_ADDR=[::]:80
TRICOT_HTTPS_BIND_ADDR=[::]:443
+TRICOT_METRICS_BIND_ADDR=[::]:8334
RUST_LOG=tricot=debug
EOH
destination = "secrets/env"
@@ -83,6 +85,12 @@ EOH
/* tags = [ "(diplonat (tcp_port 443))" ] */
address_mode = "host"
}
+
+ service {
+ name = "tricot-metrics"
+ port = "metrics_port"
+ address_mode = "host"
+ }
}
}
}
diff --git a/cluster/staging/app/telemetry/config/prometheus.yml b/cluster/staging/app/telemetry/config/prometheus.yml
index 0203ca4..75c87a0 100644
--- a/cluster/staging/app/telemetry/config/prometheus.yml
+++ b/cluster/staging/app/telemetry/config/prometheus.yml
@@ -28,3 +28,13 @@ scrape_configs:
ca_file: /etc/prom/consul.crt
cert_file: /etc/prom/consul-client.crt
key_file: /etc/prom/consul-client.key
+
+ - job_name: 'tricot'
+ consul_sd_configs:
+ - server: 'https://localhost:8501'
+ services:
+ - 'tricot-metrics'
+ tls_config:
+ ca_file: /etc/prom/consul.crt
+ cert_file: /etc/prom/consul-client.crt
+ key_file: /etc/prom/consul-client.key