forked from Deuxfleurs/nixcfg
Staging: tricot with metrics
This commit is contained in:
parent
b260b01915
commit
27b23e15ec
2 changed files with 19 additions and 1 deletions
|
@ -12,6 +12,7 @@ job "frontend" {
|
||||||
network {
|
network {
|
||||||
port "http_port" { static = 80 }
|
port "http_port" { static = 80 }
|
||||||
port "https_port" { static = 443 }
|
port "https_port" { static = 443 }
|
||||||
|
port "metrics_port" { static = 8334 }
|
||||||
}
|
}
|
||||||
|
|
||||||
task "server" {
|
task "server" {
|
||||||
|
@ -19,7 +20,7 @@ job "frontend" {
|
||||||
|
|
||||||
config {
|
config {
|
||||||
packages = [
|
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"
|
command = "tricot"
|
||||||
# cap_add = [ "net_bind_service" ] # this doesn't work for whatever reason, so we need to put user = "root" instead
|
# 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_CONSUL_CLIENT_KEY=/etc/tricot/consul-client.key
|
||||||
TRICOT_HTTP_BIND_ADDR=[::]:80
|
TRICOT_HTTP_BIND_ADDR=[::]:80
|
||||||
TRICOT_HTTPS_BIND_ADDR=[::]:443
|
TRICOT_HTTPS_BIND_ADDR=[::]:443
|
||||||
|
TRICOT_METRICS_BIND_ADDR=[::]:8334
|
||||||
RUST_LOG=tricot=debug
|
RUST_LOG=tricot=debug
|
||||||
EOH
|
EOH
|
||||||
destination = "secrets/env"
|
destination = "secrets/env"
|
||||||
|
@ -83,6 +85,12 @@ EOH
|
||||||
/* tags = [ "(diplonat (tcp_port 443))" ] */
|
/* tags = [ "(diplonat (tcp_port 443))" ] */
|
||||||
address_mode = "host"
|
address_mode = "host"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "tricot-metrics"
|
||||||
|
port = "metrics_port"
|
||||||
|
address_mode = "host"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,3 +28,13 @@ scrape_configs:
|
||||||
ca_file: /etc/prom/consul.crt
|
ca_file: /etc/prom/consul.crt
|
||||||
cert_file: /etc/prom/consul-client.crt
|
cert_file: /etc/prom/consul-client.crt
|
||||||
key_file: /etc/prom/consul-client.key
|
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
|
||||||
|
|
Loading…
Reference in a new issue