Commit graph iac/nixos/hosts/asxpio-ops/traefik.nix
Author SHA1 Message Date
1a3d283e63
asxpio: container removed; its monitor runs on services now
All checks were successful
nixos / nixos (push) Successful in 24s
The asxpio and asxpio-monitor containers, their images and /opt/asxpio
are gone from asxpio-ops, so the native monitor worker starts and the
routes no longer have to outrank container labels.

Assisted-by: Claude:opus-5-5
2026-11-17 14:16:20 +04:00
05ed9f5375
asxpio: route asxp.io and admin.asxp.io to the service on asxpio-services
All checks were successful
nixos / nixos (push) Successful in 24s
Priority 2000 over the container's labels until it is removed;
admin.asxp.io keeps the internal-only allowlist (WireGuard + VPC). The
failed-login alert and the Security dashboard count asxpio's routers by
their new names, and the dashboard's Grafana panel by grafana@file, the
name it has had since Grafana became a native service.

Assisted-by: Claude:opus-5-5
2026-11-17 14:14:50 +04:00
1100800576
datacenterbingo: container removed, its route needs no priority
All checks were successful
nixos / nixos (push) Successful in 23s
Assisted-by: Claude:opus-5-5
2026-11-17 13:57:07 +04:00
4e967372ae
datacenterbingo: route to the service on asxpio-services
All checks were successful
nixos / nixos (push) Successful in 23s
Priority 2000 over the container's labels (1000), until the container
is removed. The listening process is puma, as the baseline sees it.

Assisted-by: Claude:opus-5-5
2026-11-17 13:54:59 +04:00
9cd41e7543
czsk: container removed, its route needs no priority
All checks were successful
nixos / nixos (push) Successful in 22s
Assisted-by: Claude:opus-5-5
2026-11-17 13:33:18 +04:00
521f04fb58
czsk: route czsk.it to the service on asxpio-services
All checks were successful
nixos / nixos (push) Successful in 22s
Priority 2000 over the container's labels, until the container is
removed.

Assisted-by: Claude:opus-5-5
2026-11-17 13:31:57 +04:00
cb9db0ed73
traefik: routes from a watched file, no restart on a route change
All checks were successful
nixos / nixos (push) Successful in 21s
The NixOS module writes the routes (dynamicConfigOptions) into the
static configuration, so every route change restarted Traefik: about 15
seconds with every site down (08:24 and 09:14 today; the second broke
czsk's image push). The routes now go to /etc/traefik/dynamic.toml, a
copy activation replaces, and Traefik's file provider watches it; the
static configuration stays the same. This deploy restarts Traefik once.

Assisted-by: Claude:opus-5-5
2026-11-17 13:16:57 +04:00
677c7eb34a
blog: container removed, its route needs no priority
All checks were successful
nixos / nixos (push) Successful in 21s
The blog container and /opt/blog are gone from asxpio-ops, so the route
to the NixOS service no longer has to outrank its labels.

Assisted-by: Claude:opus-5-5
2026-11-17 13:13:24 +04:00
c51e7414ae
blog: route to the service on asxpio-services; automerge app bumps
All checks were successful
nixos / nixos (push) Successful in 21s
Traefik routes blog.asxp.io to the blog's NixOS service at priority
2000, above the container's labels; removing the route falls back to the
container. Renovate merges bumps of the app inputs (blog for now) onto
main by itself once CI passes, as a signed fast-forward, so comin deploys
an app commit without anyone merging it.

Assisted-by: Claude:opus-5-5
2026-11-17 12:23:24 +04:00
4a6c4ac3a3
services: serve the blog from its flake, beside the container
All checks were successful
nixos / nixos (push) Successful in 22s
The blog's repository now exports the built site and a module serving it
from an nginx virtual host. services runs it on :8081 next to the
container on ops; Traefik does not route to it yet. Routes get an
optional priority, so the new route can take over from the container's
labels (1000) without removing them first. nginx now reloads for a
changed virtual host instead of restarting.

Assisted-by: Claude:opus-5-5
2026-11-17 12:19:50 +04:00
cbf14b4b99
nixos: monitoring as native services
Every host runs node_exporter, cAdvisor (now against Podman), Alloy and
the security-metrics script, on its private address. Each service
declares its own expected ports, users and privileged containers next
to its definition, so the security baseline follows the config instead
of a separate inventory list.

On ops: Prometheus, Loki, Grafana, the blackbox prober and the Postgres
exporter, with the same scrape jobs, probes, retention, dashboards and
33 alert rules. Two rules matched container-era names and now match the
native ones: Forgejo's log is unit forgejo.service, Grafana's route is
grafana@file.

Grafana keeps its default secret_key on production, because its
database was written with it; rotating it is a separate step.

Prometheus, Grafana and Alloy come from nixos-unstable: their data is
from newer versions than 26.05 ships.

LLMNR and mDNS are off: the baseline flagged them as public listeners.

Tried on the rehearsal pair: all 28 scrape targets up, logs from both
hosts in Loki, Grafana WireGuard-only, no unexpected port, user or
container on either host.

Assisted-by: Claude:opus-5-5
2026-11-17 04:48:56 +04:00
e95d97869f
nixos: Traefik and the CI runners as native services
Traefik keeps its role and its acme.json. Routes for the native
services (Forgejo, Garage, the dashboard, the XMPP certificate) are
written from Nix; the app containers keep declaring theirs as labels,
which Traefik reads through Podman's socket as it did through Docker's.

The asxpio runner uses the NixOS module and starts jobs through Podman;
the interop runner is its own unit because it connects with a UUID and
token instead of registering.

Tried on the rehearsal pair: Forgejo and Garage through Traefik, a
label-routed container, anonymous reads of the public bucket only, and
a workflow with a nix-latest and an ubuntu-latest job.

A restored Forgejo database still holds production's queued jobs,
schedules and Actions secrets. The test runner tried to take a queued
production job and was stopped only by the different secret key.
migration/rehearsal-sanitize-forgejo.sh removes all of that and must
run before a runner meets restored data.

Assisted-by: Claude:fable-5-2
2026-11-16 23:17:09 +04:00