Both servers run NixOS. The Ansible code and the move itself leave main for their own branches: `ansible` is the Debian/Ansible setup as it was before the migration, `migration` keeps the plan and record, the data scripts and everything else the move needed. README and RESTORE describe the setup as it is now: NixOS, Podman, sops, OpenTofu, the backup paths and hooks of the new layout. The README carries the TODO list that MIGRATION.md had. The Forgejo sanitising script stays, under hosts/rehearsal, with the rules for rehearsing on restored production data in the NixOS README. Renovate no longer looks at Ansible files. Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
168fd2ecb9
commit
6d9122eeff
159 changed files with 135 additions and 34955 deletions
438
MIGRATION.md
438
MIGRATION.md
|
|
@ -1,438 +0,0 @@
|
||||||
# Moving production from Ansible and Terraform to NixOS and OpenTofu
|
|
||||||
|
|
||||||
The plan and the runbook. Delete this file when the last step is done.
|
|
||||||
|
|
||||||
**End state:** both servers run NixOS built from `nixos/`, deployed by
|
|
||||||
`.forgejo/workflows/nixos.yaml`; services are native NixOS services
|
|
||||||
where nixpkgs has a module and Podman containers otherwise; no Docker
|
|
||||||
daemon, no Ansible; infrastructure in `tofu/` is applied with
|
|
||||||
OpenTofu. The servers themselves stay: they are billed below today's
|
|
||||||
list price, so each one is converted **in place** and never recreated.
|
|
||||||
|
|
||||||
**Nothing in production changes without the owner's go-ahead for that
|
|
||||||
step.** Every step below that touches a server says so.
|
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
- [ ] **2026-11-24 or later**, if services has run without surprises:
|
|
||||||
`rm -rf /old-root` on asxpio-services (about 47 GB of Debian and its
|
|
||||||
Docker data), then delete its snapshot `pre-nixos-2026-11-17` in the
|
|
||||||
Hetzner console.
|
|
||||||
- [ ] Delete the two offline runners (ids 1 and 2) in Forgejo → Site
|
|
||||||
administration → Runners.
|
|
||||||
- [x] Phase 2 (asxpio-ops), 2026-11-17.
|
|
||||||
- [ ] Merge asxpio's `podman-healthcheck` branch: until then its CI
|
|
||||||
deploy times out waiting for "healthy" (the app itself runs).
|
|
||||||
- [ ] **2026-11-24 or later:** `rm -rf /old-root` on asxpio-ops (the old
|
|
||||||
image layers are already gone; what is left are the Postgres 17/18
|
|
||||||
rollback volumes and Debian itself), then delete its snapshot
|
|
||||||
`asxpio-ops-pre-nixos-2026-11-17`.
|
|
||||||
- [ ] Delete `claude-test-nixos-a` and the rehearsal network and firewall
|
|
||||||
(they hold restored production data).
|
|
||||||
- [ ] Phase 3.
|
|
||||||
|
|
||||||
## Where things stand (2026-11-17)
|
|
||||||
|
|
||||||
**Both servers run NixOS** since 2026-11-17 (Phases 1 and 2 below, done)
|
|
||||||
and are deployed by `.forgejo/workflows/nixos.yaml` from `main`, ops
|
|
||||||
first. Ansible's deploy is gone; its code stays until Phase 3. Snapshots
|
|
||||||
`pre-nixos-2026-11-17` (services) and `asxpio-ops-pre-nixos-2026-11-17`
|
|
||||||
are kept until each host's `/old-root` is deleted.
|
|
||||||
|
|
||||||
Phase 2 took 18.5 minutes of downtime (04:52–05:10 UTC) plus a minute
|
|
||||||
for the reboot. WireGuard was down from 04:52 to 05:04 and came back with
|
|
||||||
the first `test` activation; the dead-man reboot was not needed. Found on
|
|
||||||
the day: nixos-infect's bootstrap system only accepts the keys Debian's
|
|
||||||
root had (the RSA key from `tofu/keys.tofu`); on the new system root
|
|
||||||
takes the `me@asxp.io` key. The disk reached 90% with the old Docker
|
|
||||||
store under `/old-root`; deleting its image layers brought it to 71%.
|
|
||||||
|
|
||||||
Phase 1 took 34 minutes of downtime (02:29–03:03 UTC, plus a few seconds
|
|
||||||
for XMPP at 03:31), most of it the first build. What it taught, and is
|
|
||||||
now in the config or the runbook:
|
|
||||||
|
|
||||||
- **Xray on services carries the admin's uplink** (all traffic, WireGuard
|
|
||||||
included, because of DPI). It was moved to a temporary server
|
|
||||||
(`claude-test-xray`, same config from sops) and the admin's client
|
|
||||||
switched before anything stopped. Phase 2 does not stop it.
|
|
||||||
- **Build on the server, not from the workstation.** `nixos-rebuild
|
|
||||||
--build-host` sent every derivation through the admin's slow uplink;
|
|
||||||
copying the repo (`git archive HEAD | ssh … tar -x`) and running
|
|
||||||
`nixos-rebuild switch` on the host took four minutes.
|
|
||||||
- **Podman DNS** was open on podman0 only: CI jobs (own networks) could
|
|
||||||
not resolve names. Fixed in `modules/podman.nix`.
|
|
||||||
- **IPv6 for published ports:** Podman's default network forwards IPv4
|
|
||||||
only, Docker on Debian did both; XMPP was unreachable over IPv6 for
|
|
||||||
half an hour. XMPP has its own IPv6 network now; anything else that
|
|
||||||
publishes ports and has an AAAA record needs the same.
|
|
||||||
- The rehearsal ran nothing that downloads inside a CI job, and never
|
|
||||||
tested IPv6 from outside. Both are now part of the checks below.
|
|
||||||
|
|
||||||
Everything else ran first on the rehearsal pair (two cx23 in the
|
|
||||||
personal project), most of it on a restored copy of production data:
|
|
||||||
|
|
||||||
| Area | Rehearsed | Notes |
|
|
||||||
|---|---|---|
|
|
||||||
| First boot (cloud-init + nixos-infect) | yes | 3–4 min to a bare NixOS |
|
|
||||||
| In-place conversion with Docker data | yes | data kept under `/old-root` |
|
|
||||||
| Base, SSH, firewall, WireGuard, sops | yes | same host keys, same peers |
|
|
||||||
| Postgres 18.7, Garage 2.5, Forgejo 17 | yes, prod data | roles, buckets, keys from sops |
|
|
||||||
| Traefik, label routing via Podman | yes | certificates: staging CA only |
|
|
||||||
| asxpio, datacenterbingo on Podman | yes, prod data | mail and IndexNow disabled |
|
|
||||||
| Minecraft, SillyTavern, Xray, ACME forward | yes, prod data | Discord plugin kept off |
|
|
||||||
| XMPP (ejabberd, apushd, tackygram) | dummy data only | never started on prod data on purpose |
|
|
||||||
| CI runner + jobs | yes | against the rehearsal Forgejo |
|
|
||||||
| Backup, restore, bucket replica | yes | replica: config only, no run |
|
|
||||||
| Monitoring, logs, alerts, security baseline | yes | 28 targets up, 0 unknown items |
|
|
||||||
| CI deploy job | evaluate only | deploys nothing until a host is NixOS |
|
|
||||||
|
|
||||||
What each service became, and why:
|
|
||||||
|
|
||||||
| Was (Ansible role, container) | Now |
|
|
||||||
|---|---|
|
|
||||||
| `base`, `ssh_hardening`, `swap` | `modules/base.nix`, `hetzner.nix` |
|
|
||||||
| `wireguard` | `modules/wireguard.nix`, keys in sops |
|
|
||||||
| `traefik` | native `services.traefik`; native services' routes in Nix, apps keep labels |
|
|
||||||
| `forgejo` | native `services.forgejo` as user `git`; no SSH passthrough needed |
|
|
||||||
| storage repo: Postgres, Garage | native `services.postgresql`, `services.garage` (2.x pinned) |
|
|
||||||
| `monitoring`, `monitoring_agent` | native Prometheus, Loki, Grafana, Alloy, exporters, cAdvisor (Podman) |
|
|
||||||
| `restic_backup`, `s3_replicate`, `crawler_alert`, `xmpp_cert_sync` | systemd units from Nix, same scripts and schedules |
|
|
||||||
| `forgejo_runner`, `forgejo_runner_interop` | native runner module; interop as its own unit |
|
|
||||||
| `sillytavern`, `minecraft`, `xray`, `acme_forward` | native modules |
|
|
||||||
| `xmpp` | Podman containers (a custom build, not nixpkgs' ejabberd) |
|
|
||||||
| App stacks (asxpio, datacenterbingo, blog, czsk, vhpbot) | unchanged compose stacks on Podman, deployed by their own CI |
|
|
||||||
|
|
||||||
## Phase 0: preparation (no downtime)
|
|
||||||
|
|
||||||
Everything here can be done while Ansible still runs production.
|
|
||||||
|
|
||||||
1. **Push `nix`** and let CI evaluate it. It does not deploy: the job
|
|
||||||
skips any host without `/etc/NIXOS`, and branches never deploy.
|
|
||||||
|
|
||||||
2. **OpenTofu.** Once, from a workstation:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd tofu
|
|
||||||
tofu init -reconfigure
|
|
||||||
tofu plan # expected: only the new user_data output
|
|
||||||
tofu apply # writes the output; changes no resource
|
|
||||||
```
|
|
||||||
|
|
||||||
The state is the one Terraform wrote; the servers ignore
|
|
||||||
`user_data`, `image` and `ssh_keys`, so nothing can be replaced.
|
|
||||||
|
|
||||||
3. **App repositories: healthcheck in the compose file.** Podman ignores
|
|
||||||
the `HEALTHCHECK` of OCI-format images, which is what the app CI
|
|
||||||
builds, so the deploy's wait for "healthy" would time out on NixOS.
|
|
||||||
Copy each image's healthcheck into its compose file (asxpio,
|
|
||||||
datacenterbingo, blog; czsk has none). Under Docker the result is the
|
|
||||||
same, so this ships now, through the normal deploy. The exact block
|
|
||||||
for asxpio:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL","ruby -rnet/http -e 'port = ENV.fetch(\"PUMA_PORT\", \"3000\"); exit(Net::HTTP.get_response(URI(\"http://127.0.0.1:#{port}/healthz\")).code == \"200\" ? 0 : 1)'"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 5s
|
|
||||||
start_period: 20s
|
|
||||||
retries: 3
|
|
||||||
```
|
|
||||||
|
|
||||||
Read the others with `skopeo inspect --raw --config docker://<image>`.
|
|
||||||
|
|
||||||
4. **Storage repo: stop its deploys.** Its CI starts Postgres and Garage
|
|
||||||
containers in `/opt/storage`; after the ops conversion those would
|
|
||||||
fight the native services for their ports. Disable the deploy
|
|
||||||
workflow (or archive the repo) before Phase 2. Its secrets
|
|
||||||
(`ASXPIO_*`, `BINGO_*`, `PUBLIC_*`) stay: the app repos use the same
|
|
||||||
values.
|
|
||||||
|
|
||||||
5. **Secrets.** `nixos/secrets/asxpio-*.yaml` were filled on 2026-11-16
|
|
||||||
and 17 from the Ansible vault, `/opt/storage/.env` and the Garage RPC
|
|
||||||
secret. If any of those changed since, update the sops file
|
|
||||||
(`sops nixos/secrets/asxpio-ops.yaml`). Keys: WireGuard, Xray config,
|
|
||||||
restic password, S3, alert SMTP, Forgejo (secret key, internal token,
|
|
||||||
JWT secrets, SMTP, metrics token), Postgres roles, Garage keys and RPC
|
|
||||||
secret, Traefik ACME email, runner tokens, Grafana admin password,
|
|
||||||
Hetzner read-only token. The vault and sops must agree until Ansible
|
|
||||||
is gone.
|
|
||||||
|
|
||||||
6. **Freeze.** On conversion day: no pushes to the app repos, to `iac`,
|
|
||||||
or Renovate merges, from the start of a phase until its checks pass.
|
|
||||||
|
|
||||||
7. **Rehearse once more against the latest backups** (both hosts), on a
|
|
||||||
fresh rehearsal pair, following `nixos/README.md` → Rehearsal and the
|
|
||||||
rules at the end of this file. It costs about €0.02 an hour and is the
|
|
||||||
only way to know that the night's data still fits the config.
|
|
||||||
|
|
||||||
**Phase 1 is done** (2026-11-17); the steps stay as the record and for a
|
|
||||||
reinstall. **Go/no-go for Phase 1:** steps 1–7 done, last night's restic backup of
|
|
||||||
both hosts green, a Hetzner snapshot of the host just taken.
|
|
||||||
|
|
||||||
## Phase 1: asxpio-services (owner's go-ahead required)
|
|
||||||
|
|
||||||
Downtime about 15–20 minutes for Minecraft, SillyTavern, XMPP, Xray and
|
|
||||||
CI. asxpio-ops and everything on it stays up. Services first: it has
|
|
||||||
less data and nothing on ops depends on it.
|
|
||||||
|
|
||||||
From a workstation on WireGuard, in the repo:
|
|
||||||
|
|
||||||
1. **Snapshot** (the rollback):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
hcloud server create-image --type snapshot --description pre-nixos asxpio-services
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Stop what writes, then Docker:**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ssh root@10.20.0.20 'docker stop -t 120 minecraft; cd /opt/xmpp && docker compose stop; \
|
|
||||||
docker stop forgejo-runner forgejo-runner-interop sillytavern xray acme-forward; \
|
|
||||||
systemctl stop docker.socket docker containerd'
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Convert** (the same lines cloud-init runs; `tofu output -json
|
|
||||||
user_data | jq -r '."asxpio-services"'` shows them filled in). Write
|
|
||||||
`/etc/nixos/bootstrap.nix` with the content from there, then:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ssh root@10.20.0.20 'umount -l /tmp; curl -fsSL -o /root/nixos-infect \
|
|
||||||
https://raw.githubusercontent.com/elitak/nixos-infect/40f62a680bb0e8f2f607d79abfaaecd99d59401c/nixos-infect \
|
|
||||||
&& echo "4354bd68773b41da65c0e815202c43c8549713b3ed3ff6381c71fbc0b0a840ab /root/nixos-infect" | sha256sum -c \
|
|
||||||
&& PROVIDER=hetznercloud NIX_CHANNEL=nixos-26.05 NIXOS_IMPORT=./bootstrap.nix \
|
|
||||||
setsid bash /root/nixos-infect > /var/log/nixos-infect.log 2>&1 < /dev/null &'
|
|
||||||
```
|
|
||||||
|
|
||||||
It reboots into a bare NixOS after about four minutes. WireGuard is
|
|
||||||
down until step 4; reach it through ops over the private network:
|
|
||||||
`ssh -J root@10.20.0.10 root@10.10.0.20`.
|
|
||||||
|
|
||||||
4. **Switch to the flake** (through ops, as above):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd nixos
|
|
||||||
NIX_SSHOPTS="-J root@10.20.0.10" nixos-rebuild switch --flake .#asxpio-services \
|
|
||||||
--target-host root@10.10.0.20 --build-host root@10.10.0.20
|
|
||||||
```
|
|
||||||
|
|
||||||
Services that own data stay stopped: the marker file is missing.
|
|
||||||
|
|
||||||
5. **Move the data and start everything:**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ssh root@10.20.0.20 'bash -s /old-root' < migration/services-data.sh
|
|
||||||
ssh root@10.20.0.20 reboot
|
|
||||||
```
|
|
||||||
|
|
||||||
6. **Check:**
|
|
||||||
- `wg show` on ops: the services peer has a fresh handshake.
|
|
||||||
- `systemctl --failed` empty; Grafana's security panel shows nothing
|
|
||||||
unknown for asxpio-services.
|
|
||||||
- Minecraft log reaches `Done`; join once (Java and Bedrock).
|
|
||||||
- SillyTavern on `http://10.20.0.20:8000`.
|
|
||||||
- An XMPP client logs in; a message to a contact goes through.
|
|
||||||
- Forgejo → Site administration → Runners: the new runner idle (it
|
|
||||||
registered itself again); delete the old, offline entry. Push an
|
|
||||||
empty commit to an app repo and watch a full CI run.
|
|
||||||
- `systemctl start restic-backup` succeeds (it continues the same
|
|
||||||
repositories).
|
|
||||||
|
|
||||||
**Rollback:** until step 3, start Docker and the containers again.
|
|
||||||
After it: `hcloud server disable-protection asxpio-services rebuild`,
|
|
||||||
rebuild from the snapshot, `tofu apply`. Debian comes back as it was at
|
|
||||||
the snapshot.
|
|
||||||
|
|
||||||
After a week without surprises: `rm -rf /old-root`, delete the snapshot.
|
|
||||||
|
|
||||||
## Phase 2: asxpio-ops (owner's go-ahead required)
|
|
||||||
|
|
||||||
Harder than Phase 1 for one reason: **ops is the WireGuard hub.** Every
|
|
||||||
admin connection (and asxpio-services' only admin path) goes through
|
|
||||||
`wg0` on ops. While ops is converted, WireGuard is down for everyone
|
|
||||||
(laptop, aleks, zerrtika, sanya, and services' spoke).
|
|
||||||
|
|
||||||
The admin's internet keeps working throughout: it leaves through Xray on
|
|
||||||
services, which this phase does not touch. Its exit address is services'
|
|
||||||
public IPv4, **46.62.228.216**, and that is the address ops sees for
|
|
||||||
anything the admin sends it outside WireGuard.
|
|
||||||
|
|
||||||
### How ops is reached at each point
|
|
||||||
|
|
||||||
| Point | Path | Why it works |
|
|
||||||
|---|---|---|
|
|
||||||
| Debian, before the stop | WireGuard, as now | — |
|
|
||||||
| nixos-infect's bootstrap system | `ssh root@135.181.27.77` | Hetzner allows 22 from anywhere (Forgejo's git SSH); the bootstrap sshd has no `AllowUsers`; same host key |
|
|
||||||
| `nixos-rebuild test` (new system, not yet the boot default) | WireGuard again (same keys); **break-glass:** `ssh root@135.181.27.77` from 46.62.228.216 | the flake allows root from that one address during this phase only |
|
|
||||||
| locked out anyway | wait: a dead-man timer reboots into the bootstrap system after 15 min | `test` does not change the boot default |
|
|
||||||
| after `switch` | WireGuard; break-glass until removed | — |
|
|
||||||
|
|
||||||
services during the window: unreachable from outside (its SSH is
|
|
||||||
WireGuard/private only); reach it through ops once ops answers:
|
|
||||||
`ssh -J root@135.181.27.77 root@10.10.0.20`. It keeps running; only its
|
|
||||||
log shipping to Loki and the runner's link to Forgejo pause.
|
|
||||||
|
|
||||||
### Before the window (no downtime)
|
|
||||||
|
|
||||||
1. **App healthchecks in the compose files** (Phase 0 step 3): asxpio,
|
|
||||||
datacenterbingo, blog. Deployed on Debian through their normal CI, so
|
|
||||||
the first deploy on NixOS can reach "healthy".
|
|
||||||
2. **Storage repo:** disable its deploy workflow (Phase 0 step 4).
|
|
||||||
3. **Secrets:** compare every ops secret in sops with the vault,
|
|
||||||
`/opt/storage/.env` and the live values, as was done for services.
|
|
||||||
4. **Final rehearsal on `claude-test-nixos-a`** — **done 2026-11-17** with
|
|
||||||
that night's ops backup (7.8 GiB): fresh Debian → cloud-init conversion
|
|
||||||
(4 min) → build and switch on the host (7 min on this cx23, the same
|
|
||||||
size as ops) → restore → `ops-data.sh` (10 s) → apps pulled and started
|
|
||||||
(31 s) and healthy with the compose healthchecks → reboot, everything
|
|
||||||
back by itself (1.5 min). It found four bugs, all fixed: the apps did
|
|
||||||
not come back after a reboot (podman-restart was not enabled), no
|
|
||||||
`/opt` on a fresh system, the repositories moved one level too deep,
|
|
||||||
and a Forgejo command that no longer exists.
|
|
||||||
5. **Break-glass in the flake:** root SSH from 46.62.228.216 for ops only
|
|
||||||
(`asxpio.sshFrom` override in `hosts/asxpio-ops`), merged before the
|
|
||||||
window, removed after it.
|
|
||||||
6. **Announce** to the WireGuard users: their tunnel drops for about 30
|
|
||||||
minutes; to everyone: sites, Forgejo and the registry are down for
|
|
||||||
about 30 minutes. Freeze pushes (Phase 0 step 6).
|
|
||||||
7. **Snapshot** of ops in the Hetzner console (the prod token is
|
|
||||||
read-only), `pre-nixos-<date>`.
|
|
||||||
|
|
||||||
### The window (about 20–25 minutes of downtime, by the rehearsal)
|
|
||||||
|
|
||||||
From a workstation on WireGuard, in the repo. Every step is a separate
|
|
||||||
go-ahead.
|
|
||||||
|
|
||||||
1. **Ansible off:** merge a commit to `main` that removes
|
|
||||||
`.forgejo/workflows/deploy.yaml`; check no run is left. Ansible would
|
|
||||||
otherwise apply the Debian roles to the converted ops on the next push.
|
|
||||||
2. **Fresh backup, dumps, stop** (WireGuard still up):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ssh root@10.20.0.10 'restic-backup run; set -e; d=/var/backups/restic-stage; install -d -m 700 $d; \
|
|
||||||
docker stop asxpio asxpio-monitor datacenterbingo blog czsk vhpbot vhpbot-dev || true; \
|
|
||||||
docker exec storage-postgres pg_dumpall -U postgres > $d/pg_dumpall.sql; \
|
|
||||||
sqlite3 /opt/forgejo/data/gitea/gitea.db ".backup $d/forgejo-gitea.db"; \
|
|
||||||
docker exec storage-garage /garage meta snapshot --all; \
|
|
||||||
docker image prune -af; docker ps -q | xargs -r docker stop -t 60; \
|
|
||||||
systemctl stop docker.socket docker containerd'
|
|
||||||
```
|
|
||||||
|
|
||||||
**Downtime starts.** Undo: `systemctl start docker`.
|
|
||||||
|
|
||||||
3. **Convert:** write `/etc/nixos/bootstrap.nix` (from `tofu output -json
|
|
||||||
user_data | jq -r '."asxpio-ops"'`), then run nixos-infect as in Phase
|
|
||||||
1 step 3. Its existing 2 GB swapfile carries the build. **WireGuard goes
|
|
||||||
down here.** Wait for `ssh root@135.181.27.77 'test -d /old-root'`.
|
|
||||||
4. **Build and test, not switch**, on the host (Phase 1 lesson):
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git archive HEAD | ssh root@135.181.27.77 'rm -rf /root/iac; mkdir /root/iac; tar -x -C /root/iac'
|
|
||||||
ssh root@135.181.27.77 'systemd-run --unit=deadman --on-active=15min systemctl reboot; \
|
|
||||||
cd /root/iac/nixos && NIX_CONFIG="experimental-features = nix-command flakes" \
|
|
||||||
nixos-rebuild test --flake .#asxpio-ops'
|
|
||||||
```
|
|
||||||
|
|
||||||
Then from the laptop: WireGuard handshake, `ssh root@10.20.0.10`,
|
|
||||||
`ssh root@10.20.0.20`. Only then: `systemctl stop deadman.timer`. If
|
|
||||||
anything fails, do nothing: in 15 minutes ops reboots into the
|
|
||||||
bootstrap system, reachable on 135.181.27.77, and the cause can be
|
|
||||||
fixed there.
|
|
||||||
5. **Make it the boot default:** `nixos-rebuild switch --flake .#asxpio-ops`
|
|
||||||
(same build, instant).
|
|
||||||
6. **Data, start, images:** `ssh root@10.20.0.10 'bash -s /old-root' <
|
|
||||||
nixos/migration/ops-data.sh`, then reboot once.
|
|
||||||
7. **Check** (all from outside where possible):
|
|
||||||
- WireGuard: all five peers handshake again (`wg show` on ops).
|
|
||||||
- Every site over IPv4 **and IPv6** (Grafana → Probes, plus `curl -6`
|
|
||||||
from services); certificates are the old ones from `acme.json`.
|
|
||||||
- Forgejo: web, `git clone` and push over SSH and HTTPS, the registry
|
|
||||||
serves a pull; CI on services reaches Forgejo again.
|
|
||||||
- asxpio: admin login, render an invoice. datacenterbingo: photos,
|
|
||||||
`/data.json`. `garage status`; an anonymous read of the public bucket.
|
|
||||||
- An app deploy from CI reaches "healthy".
|
|
||||||
- Grafana: targets up, logs from both hosts, security panel clean;
|
|
||||||
the first alert evaluation after the move sends nothing unexpected.
|
|
||||||
- `systemctl start restic-backup xmpp-cert-sync` succeed (the push now
|
|
||||||
uses the new key).
|
|
||||||
- `systemctl --failed` empty; the login summary is clean.
|
|
||||||
|
|
||||||
### After
|
|
||||||
|
|
||||||
- Remove the break-glass from the flake, and the Debian ops key from
|
|
||||||
`xmppCertSyncKeysExtra` (`hosts/asxpio-services/xmpp-cert-install.nix`).
|
|
||||||
- Delete `/old-root/var/lib/docker` once the apps run (frees the old
|
|
||||||
images on the small disk); the rest of `/old-root` after a week (TODO).
|
|
||||||
- Phase 3.
|
|
||||||
|
|
||||||
**Rollback:** before step 3, `systemctl start docker`. After it, rebuild
|
|
||||||
from the snapshot in the Hetzner console. services keeps working against
|
|
||||||
a Debian ops: nothing on it depends on how ops is built.
|
|
||||||
|
|
||||||
## Phase 3: clean-up
|
|
||||||
|
|
||||||
1. Merge `nix` into `main`: `deploy.yaml` (Ansible) then finds no change
|
|
||||||
to apply, `nixos.yaml` deploys both hosts from now on.
|
|
||||||
2. Delete `ansible/`, `.forgejo/workflows/deploy.yaml`, the
|
|
||||||
`ANSIBLE_VAULT_PASSWORD` secret, `ansible/known_hosts` (the root copy
|
|
||||||
`known_hosts` stays), the Ansible parts of `renovate.json`.
|
|
||||||
3. Retire the storage repo (archive). Optional, later: drop the
|
|
||||||
`storage` network from the app compose files and point their
|
|
||||||
`DATABASE_URL`/`S3_ENDPOINT` at the host, then remove `apps.nix`'s
|
|
||||||
compatibility entries.
|
|
||||||
4. On both hosts after a week: `rm -rf /old-root`; delete the snapshots;
|
|
||||||
on ops remove the old Postgres 17 volume data, which went with
|
|
||||||
`/old-root`.
|
|
||||||
5. Delete the rehearsal servers, network and firewall (`managed-by=claude`
|
|
||||||
in the personal project), and `claude-test-xray` once the admin's
|
|
||||||
client points at the production Xray again.
|
|
||||||
6. Rotate what sat in the old history and the vault for a year
|
|
||||||
(`INTERNAL_TOKEN`, the JWT secrets, runner tokens), now in sops; and
|
|
||||||
give Grafana its own `secret_key` (production keeps the default for
|
|
||||||
now because its database was written with it; Grafana documents the
|
|
||||||
rotation).
|
|
||||||
7. Update the workspace `CLAUDE.md` (servers, deploys, gotchas).
|
|
||||||
8. Branches, last, because until then `main` is what deploys:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git push origin main:retired/ansible # keep the Ansible line
|
|
||||||
# Forgejo → Settings → Branches: default branch nix; unprotect main
|
|
||||||
git push origin --delete main
|
|
||||||
git push origin nix:main
|
|
||||||
# Forgejo: default branch main again; then
|
|
||||||
git push origin --delete nix
|
|
||||||
git branch -m main retired/ansible && git branch -m nix main
|
|
||||||
```
|
|
||||||
|
|
||||||
## Rules for the rehearsal pair
|
|
||||||
|
|
||||||
Restored data carries production credentials inside it. Anything that
|
|
||||||
would use them outward is kept from starting in `hosts/rehearsal/`, and
|
|
||||||
the following must hold every time:
|
|
||||||
|
|
||||||
- **Before a runner meets restored Forgejo data,** run
|
|
||||||
`migration/rehearsal-sanitize-forgejo.sh` on the rehearsal ops. A
|
|
||||||
restored database still has production's queued jobs, schedules and
|
|
||||||
Actions secrets; on 2026-11-16 the test runner picked up a queued
|
|
||||||
production job and was stopped only by the different secret key.
|
|
||||||
- XMPP and the Telegram gateway, Forgejo's mail, mirrors and webhooks,
|
|
||||||
Grafana mail, the crawler mail, the bucket replica and the interop
|
|
||||||
runner do not start there. The Minecraft plugins that talk outward
|
|
||||||
(DiscordSRV, ServerBackup, AutoUpdateGeyser) are set aside before
|
|
||||||
every start: on 2026-11-16 DiscordSRV was missed on the first start
|
|
||||||
and logged the production bot in from the test server for 15 seconds.
|
|
||||||
- Apps run with mail pointed at nothing and `INDEXNOW_KEY` empty; the
|
|
||||||
asxpio monitor worker (external probes) stays off.
|
|
||||||
- SSH is limited by a Hetzner firewall to the admin; backup credentials
|
|
||||||
are on the servers only in `/run`, only during a restore.
|
|
||||||
- Delete the servers when testing ends: they hold production data.
|
|
||||||
|
|
||||||
## Risks
|
|
||||||
|
|
||||||
| Risk | Mitigation |
|
|
||||||
|---|---|
|
|
||||||
| Lock-out after the switch | Phase steps say how each host is reached at each point; services through ops and the other way round; Hetzner console last |
|
|
||||||
| nixos-infect breaks with a later NixOS | pinned by commit and checksum; `nix_channel` pinned to 26.05; nixos-anywhere as the fallback (`nixos/README.md`) |
|
|
||||||
| ops disk (38 GB) | 18 GB free today; the Nix store adds 3–5 GB, `/old-root` holds the old images until deleted; delete `/old-root/var/lib/docker` once the apps run |
|
|
||||||
| Data of newer versions than 26.05 ships | Prometheus, Grafana, Xray, SillyTavern from nixos-unstable; Garage 2.x pinned; checked on the rehearsal pair with prod data |
|
|
||||||
| Something only production does | XMPP on real data and Let's Encrypt issuance were not rehearsed; both have a snapshot rollback and are checked first in their phase |
|
|
||||||
| A deploy during the window | freeze (Phase 0 step 6); the storage repo's deploy is off (step 4) |
|
|
||||||
199
README.md
199
README.md
|
|
@ -1,162 +1,93 @@
|
||||||
# asxp.io infrastructure
|
# asxp.io infrastructure
|
||||||
|
|
||||||
Two Hetzner Cloud servers, described by OpenTofu. They are moving from
|
Two Hetzner Cloud servers running NixOS, described by OpenTofu.
|
||||||
Debian configured by Ansible to NixOS (`MIGRATION.md`); until a host has
|
|
||||||
moved, pushing to `main` still applies `ansible/site.yaml` to it.
|
|
||||||
|
|
||||||
- Build the servers from nothing: `nixos/README.md`
|
- `tofu/`: servers, network, firewalls, DNS, Object Storage buckets
|
||||||
- Restore data from backups: `RESTORE.md`
|
(OpenTofu, applied by hand; `tofu/README.md`)
|
||||||
|
- `nixos/`: the whole system of each server (one flake; `nixos/README.md`)
|
||||||
|
- `RESTORE.md`: restoring data from the backups
|
||||||
|
|
||||||
|
Branches: `main` is what runs. `ansible` is the Debian/Ansible setup as
|
||||||
|
it was before the move to NixOS (2026-11-16), `migration` the move
|
||||||
|
itself: its plan and record, the data scripts and the rehearsal rules.
|
||||||
|
|
||||||
## Servers
|
## Servers
|
||||||
|
|
||||||
| Server | Size | Runs |
|
| Server | Size | Runs |
|
||||||
|--------|------|------|
|
|--------|------|------|
|
||||||
| asxpio-ops | 2 vCPU, 4 GB | Traefik, Forgejo, monitoring, crawler stats; app stacks deployed from their own repos |
|
| asxpio-ops | CX23: 2 vCPU, 4 GB | WireGuard hub, Traefik, Forgejo (+ registry), Postgres, Garage, monitoring; app stacks deployed from their own repos |
|
||||||
| asxpio-services | 8 vCPU, 16 GB | Forgejo Actions runners, Minecraft (Paper), SillyTavern, XMPP (asxp.io), Xray |
|
| asxpio-services | CX43: 8 vCPU, 16 GB | Forgejo Actions runners, Minecraft (Paper), SillyTavern, XMPP (asxp.io), Xray |
|
||||||
|
|
||||||
Both are reachable for administration only over WireGuard
|
Administration only over WireGuard (10.20.0.0/24) or the private network
|
||||||
(10.20.0.0/24) or the private network (10.10.0.0/20).
|
(10.10.0.0/20). Both servers are billed below today's list price: never
|
||||||
|
delete or recreate them, reinstall in place (`nixos/README.md`).
|
||||||
## Layout
|
|
||||||
|
|
||||||
- `tofu/`: servers, network, firewalls, DNS, object storage buckets (OpenTofu).
|
|
||||||
Applied by hand; see `tofu/README.md`.
|
|
||||||
- `ansible/site.yaml`: everything the pipeline manages (see below).
|
|
||||||
- `ansible/playbooks/`: host bootstrap, run by hand.
|
|
||||||
- `.forgejo/workflows/deploy.yaml`: the pipeline.
|
|
||||||
|
|
||||||
## What the pipeline manages
|
|
||||||
|
|
||||||
| Role | Host | What |
|
|
||||||
|------|------|------|
|
|
||||||
| `base` | both | unattended upgrades, fail2ban, journal size cap, Docker daemon config, weekly image prune |
|
|
||||||
| `monitoring_agent` | both | node_exporter, cAdvisor and Alloy on the VPC address |
|
|
||||||
| `traefik` | ops | reverse proxy, TLS, dashboard on WireGuard |
|
|
||||||
| `xmpp_cert_sync` | ops | pushes Traefik's XMPP certificates to ejabberd (see below) |
|
|
||||||
| `crawler_alert` | ops | crawler reports (daily, weekly) and metrics every 5 min |
|
|
||||||
| `monitoring` | ops | Prometheus, Loki, Grafana, blackbox and Postgres exporters, alerts |
|
|
||||||
| `forgejo` | ops | Forgejo at git.asxp.io (git.czsk.it is an alias), SSH passthrough |
|
|
||||||
| `forgejo_runner` | services | Actions runner and its job labels |
|
|
||||||
| `forgejo_runner_interop` | services | runner for another-im/interop on dev.another.im |
|
|
||||||
| `sillytavern` | services | SillyTavern on the WireGuard address |
|
|
||||||
| `minecraft` | services | Paper server |
|
|
||||||
| `xmpp` | services | ejabberd, apushd and tackygram for asxp.io; secrets stay in `/opt/xmpp/state` |
|
|
||||||
| `acme_forward` | services | port 80: ACME challenges to Traefik on ops, 404 otherwise |
|
|
||||||
| `xray` | services | Xray VLESS Reality on :443, config in the vault |
|
|
||||||
| `monitoring_agent` | both | node_exporter, cAdvisor, Alloy (logs to Loki); `security-metrics` timer |
|
|
||||||
| `monitoring` | ops | Prometheus, Loki, Grafana at gf.asxp.io (WireGuard only), dashboards and alert rules |
|
|
||||||
| `restic_backup` | both | nightly restic backup to object storage, hel1 and fsn1 |
|
|
||||||
| `s3_replicate` | services | daily copy of the hel1 buckets into their fsn1 twins |
|
|
||||||
|
|
||||||
Not managed here: the app stacks on asxpio-ops (asxpio, datacenterbingo,
|
|
||||||
blog, czsk, vhpbot, storage). Each deploys from its own repository into
|
|
||||||
`/opt/<app>`.
|
|
||||||
|
|
||||||
## Changing something
|
## Changing something
|
||||||
|
|
||||||
1. Edit the role or variable, for example an image tag in
|
Edit `nixos/`, push a branch (CI evaluates every host), merge to `main`:
|
||||||
`ansible/inventory/group_vars/` or a compose file under
|
`.forgejo/workflows/nixos.yaml` builds each host on itself and switches
|
||||||
`ansible/roles/<role>/files/`. Versions are pinned exactly; Renovate
|
to it, ops first. Only units whose definition changed restart. Undo
|
||||||
opens a PR per bump.
|
with `nixos-rebuild switch --rollback` on the host.
|
||||||
2. Push a branch. The pipeline does a dry run against production.
|
|
||||||
3. Merge to `main`. The pipeline dry-runs again, then applies.
|
|
||||||
|
|
||||||
A run with nothing to change touches nothing and restarts nothing.
|
Versions are pinned (`flake.lock`, image tags); Renovate opens a PR per
|
||||||
|
bump and updates `flake.lock` weekly.
|
||||||
|
|
||||||
Things to know:
|
Things to know:
|
||||||
|
|
||||||
- **Game servers** are saved and stopped with a 120 s timeout before a
|
- The runner executes the deploy. A change to it restarts it mid-job:
|
||||||
compose change recreates them.
|
the change lands, the job shows as cancelled, the next run confirms.
|
||||||
- **The runner** executes the pipeline. A change to it recreates the
|
- App stacks (asxpio, datacenterbingo, blog, czsk, vhpbot) are Podman
|
||||||
container mid-job: the change lands, that job is reported as failed,
|
containers that their own repositories deploy with `docker compose`
|
||||||
and the next run confirms it.
|
as user `deploy`. `docker` and `podman` talk to the system Podman for
|
||||||
- **Forgejo** restarts on a config change; the job log may pause for a
|
every admin.
|
||||||
few seconds.
|
- Your workstation's uplink may run through Xray on services: never stop
|
||||||
- **New systemd units** don't exist yet during the dry run, so tasks that
|
it without another path.
|
||||||
enable them use `ignore_errors: "{{ ansible_check_mode }}"`.
|
|
||||||
|
|
||||||
To run it yourself, over WireGuard:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cd ansible
|
|
||||||
ansible-playbook site.yaml --check --diff # dry run
|
|
||||||
ansible-playbook site.yaml --tags traefik # one service
|
|
||||||
```
|
|
||||||
|
|
||||||
## Monitoring
|
## Monitoring
|
||||||
|
|
||||||
Grafana is at https://gf.asxp.io, reachable over WireGuard and the VPC
|
Grafana at https://gf.asxp.io (WireGuard only). Dashboards and the 33
|
||||||
only. Dashboards are provisioned from
|
alert rules are provisioned from `nixos/hosts/asxpio-ops/monitoring/`;
|
||||||
`ansible/roles/monitoring/files/dashboards/` and can't be saved from the
|
change them there, not in the UI. Alerts mail `asxpio.alertEmail`.
|
||||||
UI: change the JSON and deploy. The overview is the home dashboard.
|
|
||||||
|
|
||||||
- **Metrics:** Prometheus scrapes both hosts over the VPC and keeps 90
|
- **Metrics:** Prometheus on ops scrapes both hosts, 90 days.
|
||||||
days. Scripts add metrics through node_exporter's textfile directory
|
- **Logs:** Alloy ships the journal, container logs and Traefik's access
|
||||||
(`monitoring_textfile_dir`).
|
log to Loki (bucket `asxpio-loki-main`), 2 years.
|
||||||
- **Logs:** Alloy ships the journal and container logs to Loki, kept 2
|
- **Probes:** blackbox checks every site and TCP/TLS service from ops.
|
||||||
years. From 2026-11-14 chunks go to bucket `asxpio-loki-main` (hel1);
|
- **Security baseline:** every host reports its WireGuard peers, devices
|
||||||
older ones stay on disk until they expire.
|
on the private network, accounts, listening ports and privileged
|
||||||
- **Probes:** blackbox_exporter checks the sites and the TCP/TLS services
|
containers; anything not declared in the config alerts. Each service
|
||||||
from outside (`monitoring_probes`).
|
declares what it expects (`asxpio.security`). SSH logins show the same
|
||||||
- **Alerts** mail `monitoring_alert_email`. Rules are in
|
summary.
|
||||||
`templates/alert-rules.yaml.j2`.
|
|
||||||
|
|
||||||
Settings: `ansible/inventory/group_vars/all/monitoring.yaml`.
|
|
||||||
|
|
||||||
## XMPP certificates
|
|
||||||
|
|
||||||
Traefik issues them; ejabberd on services only loads files.
|
|
||||||
|
|
||||||
1. The router `xmpp-cert` in Traefik's dynamic config requests
|
|
||||||
xmpp.asxp.io + conference.asxp.io. The HTTP challenge reaches services
|
|
||||||
(where those names point), and `acme_forward` passes it to ops.
|
|
||||||
asxp.io itself is the site's certificate: Traefik never requests a
|
|
||||||
name it already holds.
|
|
||||||
2. `xmpp-cert-sync.path` on ops fires when `acme.json` changes (and a
|
|
||||||
timer daily). It pushes both certificates over SSH with a key that
|
|
||||||
only runs `xmpp-cert-install`, from ops' VPC address.
|
|
||||||
3. `xmpp-cert-install` checks name, expiry and key, writes
|
|
||||||
`/opt/xmpp/state/certs/<name>.pem` and reloads ejabberd, which picks
|
|
||||||
a file per domain.
|
|
||||||
|
|
||||||
Alerts: sync not successful for 2 days; served certificate older than
|
|
||||||
Traefik's for 6 hours; expiry under 14 days. Names: `xmpp_cert.yaml`.
|
|
||||||
|
|
||||||
## Backups
|
## Backups
|
||||||
|
|
||||||
Hetzner's server backups are off. Each host runs `restic-backup.timer`
|
Nightly restic on each host (ops 03:30, services 04:15 UTC) into
|
||||||
nightly (ops 03:30, services 04:15 UTC) into two independent
|
`restic/<host>` in `asxpio-backups-main` (hel1) and `asxpio-backups-repl`
|
||||||
repositories, `restic/<host>` in `asxpio-backups-main` (hel1) and
|
(fsn1); a failed run mails. A daily replica (services, ~06:00) copies
|
||||||
`asxpio-backups-repl` (fsn1). Databases go in as dumps or online
|
`asxpio-backups-main` (minus `restic/`), `asxpio-tofu-main`,
|
||||||
copies; see `restic_pre_hooks` in `ansible/inventory/host_vars/`.
|
`asxpio-loki-main` and `k8s-asxpio-main` to their fsn1 twins. Details
|
||||||
A failed run mails its journal.
|
and restores: `RESTORE.md`.
|
||||||
|
|
||||||
```sh
|
|
||||||
restic-backup hel1 snapshots
|
|
||||||
restic-backup fsn1 restore latest --target /tmp/restore --include /opt/xmpp
|
|
||||||
```
|
|
||||||
|
|
||||||
The password is `vault_restic_password` in the vault. Keep a copy
|
|
||||||
outside the servers and this repo's CI: without it nothing can be read.
|
|
||||||
|
|
||||||
`s3_replicate` copies `asxpio-backups-main` (minus `restic/`),
|
|
||||||
`asxpio-tofu-main`, `asxpio-loki-main` and `k8s-asxpio-main` to their fsn1 twins daily
|
|
||||||
around 06:10 UTC. A run that would delete over 1000 objects stops and
|
|
||||||
mails instead.
|
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|
||||||
Nothing secret is stored in the clear. Service secrets live in
|
Service secrets are in `nixos/secrets/<host>.yaml`, encrypted with sops
|
||||||
`ansible/inventory/group_vars/all/vault.yaml`, encrypted with Ansible
|
for the admin's age key and each host's SSH host key; the hosts decrypt
|
||||||
Vault. The pipeline needs two repository secrets:
|
them at boot. CI holds only `SSH_DEPLOY_KEY`. Keep a copy of the admin
|
||||||
|
age key (`~/.config/sops/age/keys.txt`) outside this machine.
|
||||||
|
|
||||||
- `ANSIBLE_VAULT_PASSWORD`: decrypts the vault.
|
## TODO
|
||||||
- `SSH_DEPLOY_KEY`: private key of user `deploy` on both servers.
|
|
||||||
|
|
||||||
Locally, put the vault password in `ansible/.vault_pass` (ignored by git).
|
- [ ] **From 2026-11-24**, if nothing came up: `rm -rf /old-root` on both
|
||||||
|
hosts (Debian and its leftovers: Postgres 17/18 rollback volumes on
|
||||||
## Bootstrap (by hand)
|
ops), then delete the snapshots `pre-nixos-2026-11-17` and
|
||||||
|
`asxpio-ops-pre-nixos-2026-11-17` in the Hetzner console.
|
||||||
`ansible/playbooks/` holds what is done once per host or can lock you
|
- [ ] Remove the repository secret `ANSIBLE_VAULT_PASSWORD` (Forgejo →
|
||||||
out: WireGuard, SSH hardening, s3fs mounts, swap, user creation.
|
iac → Settings → Actions → Secrets).
|
||||||
See `ansible/README.md`.
|
- [ ] Empty and remove the old state buckets `asxpio-terraform-main/-repl`
|
||||||
|
(`legacy_state_*` in `tofu/s3.tofu`) once the new state has been in
|
||||||
|
use for a few weeks.
|
||||||
|
- [ ] Rotate the secrets that sat in the old repository history:
|
||||||
|
Forgejo's `INTERNAL_TOKEN` and JWT secrets, the runner token; give
|
||||||
|
Grafana its own `secret_key`.
|
||||||
|
- [ ] Move the app stacks to their own flakes on asxpio-services, one at
|
||||||
|
a time (blog → czsk → datacenterbingo → asxpio → vhpbot).
|
||||||
|
|
|
||||||
139
RESTORE.md
139
RESTORE.md
|
|
@ -8,120 +8,81 @@ UTC) into two independent repositories:
|
||||||
| `hel1` | `s3:https://hel1.your-objectstorage.com/asxpio-backups-main/restic/<host>` |
|
| `hel1` | `s3:https://hel1.your-objectstorage.com/asxpio-backups-main/restic/<host>` |
|
||||||
| `fsn1` | `s3:https://fsn1.your-objectstorage.com/asxpio-backups-repl/restic/<host>` |
|
| `fsn1` | `s3:https://fsn1.your-objectstorage.com/asxpio-backups-repl/restic/<host>` |
|
||||||
|
|
||||||
A snapshot holds `/etc`, `/opt`, the listed container volumes and
|
What a snapshot holds is declared next to each service (`asxpio.backup`
|
||||||
`/var/backups/restic-stage`, where hooks put consistent copies of the
|
in `nixos/`): paths, and hooks that put consistent copies of databases
|
||||||
databases just before the run:
|
into `/var/backups/restic-stage` just before the run.
|
||||||
|
|
||||||
| Host | In `/var/backups/restic-stage` | Volumes |
|
| Host | Paths | In `/var/backups/restic-stage` |
|
||||||
|------|--------------------------------|---------|
|
|------|-------|--------------------------------|
|
||||||
| asxpio-ops | `pg_dumpall.sql`, `asxpio.dump` (`pg_dump -Fc`), `forgejo-gitea.db` | `storage_garage_meta`, `storage_garage_data` (with a fresh Garage metadata snapshot) |
|
| asxpio-ops | `/etc/ssh`, `/opt` (app stacks), `/var/lib/forgejo`, `/var/lib/garage` (after a metadata snapshot), `/var/lib/traefik`, `/var/lib/grafana` | `pg_dumpall.sql`, `asxpio.dump` (`pg_dump -Fc`), `forgejo.db` |
|
||||||
| asxpio-services | `ejabberd.sqlite`; ejabberd's Mnesia as `nightly.backup` inside `xmpp_database` | `xmpp_database`, `xmpp_tackygram` |
|
| asxpio-services | `/etc/ssh`, `/opt` (XMPP state), `/var/lib/minecraft`, `/var/lib/SillyTavern`, the Podman volumes `xmpp_database` and `xmpp_tackygram` | `ejabberd.sqlite`; Mnesia as `nightly.backup` inside `xmpp_database` |
|
||||||
|
|
||||||
Not in the backup: Postgres' data directory (restore from the dump),
|
Not in the backup: Postgres' data directory (restore from the dump),
|
||||||
`/opt/containerd`, and what Minecraft downloads again (`cache`,
|
Prometheus and Loki's local data, and what Minecraft downloads again.
|
||||||
`libraries`, `versions`). The exact lists are `restic_paths`,
|
|
||||||
`restic_excludes` and `restic_pre_hooks` in
|
|
||||||
`ansible/inventory/host_vars/`.
|
|
||||||
|
|
||||||
Three secrets are needed, and none of them may exist only on the
|
Three secrets are needed: the Object Storage keys (`s3/access_key`,
|
||||||
servers: the Object Storage access key and secret key, and the restic
|
`s3/secret_key`) and the restic password (`restic/password`), all in
|
||||||
password (`vault_restic_password` in the Ansible vault). **Without the
|
`nixos/secrets/<host>.yaml`. **Without the password nothing can be read.**
|
||||||
password nothing can be read.**
|
|
||||||
|
|
||||||
## One file or one service, on a running host
|
## One file or one service, on a running host
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
restic-backup hel1 snapshots
|
restic-backup hel1 snapshots
|
||||||
restic-backup hel1 ls latest /opt/xmpp
|
restic-backup hel1 ls latest /var/lib/minecraft/world
|
||||||
restic-backup fsn1 restore latest --target /tmp/r --include /opt/xmpp
|
restic-backup fsn1 restore latest --target /tmp/r --include /opt/xmpp
|
||||||
```
|
```
|
||||||
|
|
||||||
Restore beside the live data, compare, then stop the service and move
|
Restore beside the live data, compare, then stop the service and move
|
||||||
the files into place.
|
the files into place.
|
||||||
|
|
||||||
## A whole host, onto a fresh system
|
## A whole host
|
||||||
|
|
||||||
On a host built by `nixos/README.md` (or any Linux with restic):
|
Build a fresh host first (`nixos/README.md`). Services that own data do
|
||||||
|
not start until `/var/lib/.data-in-place` exists, so nothing creates
|
||||||
|
empty state where the restore lands.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=...
|
export AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... RESTIC_PASSWORD=...
|
||||||
export RESTIC_PASSWORD=...
|
|
||||||
export RESTIC_REPOSITORY=s3:https://hel1.your-objectstorage.com/asxpio-backups-main/restic/asxpio-ops
|
export RESTIC_REPOSITORY=s3:https://hel1.your-objectstorage.com/asxpio-backups-main/restic/asxpio-ops
|
||||||
restic snapshots --host asxpio-ops # pick one; "latest" below
|
restic snapshots --host asxpio-ops
|
||||||
|
restic restore latest --host asxpio-ops --target /
|
||||||
```
|
```
|
||||||
|
|
||||||
Keep every service stopped until its data is back, so nothing starts on
|
Then, on ops:
|
||||||
an empty directory and creates fresh state where the restore will land.
|
|
||||||
|
|
||||||
1. **Files.** `/etc` is restored aside, for reference only: the system's
|
1. `touch /var/lib/.data-in-place; systemctl start postgresql`
|
||||||
configuration comes from the flake.
|
2. `runuser -u postgres -- psql -q postgres < /var/backups/restic-stage/pg_dumpall.sql`
|
||||||
|
(one error, `role "postgres" already exists`, is expected), then
|
||||||
|
`systemctl restart postgres-roles` to set the passwords from sops.
|
||||||
|
3. Replace Forgejo's database with the staged copy:
|
||||||
|
`cp /var/backups/restic-stage/forgejo.db /var/lib/forgejo/data/forgejo.db`,
|
||||||
|
`chown git:git` it, then `forgejo-admin regenerate keys`.
|
||||||
|
4. Reboot. Everything starts, the app containers through podman-restart.
|
||||||
|
|
||||||
|
On services: the XMPP volumes come back with the restore; replace
|
||||||
|
`ejabberd.sqlite` in `xmpp_database` with the staged copy, and if Mnesia
|
||||||
|
does not come up clean, `podman exec xmpp-ejabberd ejabberdctl restore
|
||||||
|
/opt/ejabberd/database/nightly.backup`. Then `touch
|
||||||
|
/var/lib/.data-in-place` and reboot.
|
||||||
|
|
||||||
|
Check: the sites answer (Grafana → Probes), a git clone over SSH, an XMPP
|
||||||
|
login, the Minecraft world, the next nightly backup.
|
||||||
|
|
||||||
|
## Backups from the Debian era
|
||||||
|
|
||||||
|
Snapshots taken before 2026-11-17 hold the Debian/Docker layout
|
||||||
|
(`/opt/forgejo`, Docker volumes). Restore one to a side directory and
|
||||||
|
let the migration scripts on branch `migration` move it into place:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
restic restore latest --target / --include /opt --include /var/backups/restic-stage
|
git show migration:nixos/migration/ops-data.sh > /tmp/ops-data.sh # or services-data.sh
|
||||||
restic restore latest --target /root/restored-etc --include /etc
|
restic restore <snapshot> --target /restore
|
||||||
```
|
bash /tmp/ops-data.sh /restore
|
||||||
|
|
||||||
2. **Volumes** (while services still run in containers): create each
|
|
||||||
volume, then restore into it.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker volume create storage_garage_meta # one per volume in the table
|
|
||||||
restic restore latest --target / --include /var/lib/docker/volumes/storage_garage_meta
|
|
||||||
```
|
|
||||||
|
|
||||||
Under Podman the volume lives in
|
|
||||||
`/var/lib/containers/storage/volumes/<name>`: restore to a temporary
|
|
||||||
target and move `_data` there.
|
|
||||||
|
|
||||||
3. **Databases**, from the staged copies rather than the live files:
|
|
||||||
|
|
||||||
- **Postgres** (ops): start Postgres alone on its empty data
|
|
||||||
directory, then load everything, roles included:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
psql -U postgres -f /var/backups/restic-stage/pg_dumpall.sql
|
|
||||||
```
|
|
||||||
|
|
||||||
`asxpio.dump` is the same database in `pg_restore` format, for
|
|
||||||
restoring only that one.
|
|
||||||
- **Forgejo** (ops): `cp /var/backups/restic-stage/forgejo-gitea.db
|
|
||||||
/opt/forgejo/data/gitea/gitea.db`, owner as the file it replaces.
|
|
||||||
- **Garage** (ops): if it does not start on the restored metadata, use
|
|
||||||
the snapshot inside the metadata volume (`snapshots/`), as described
|
|
||||||
in Garage's [recovery documentation](https://garagehq.deuxfleurs.fr/documentation/operations/recovering/).
|
|
||||||
- **ejabberd** (services): replace `ejabberd.sqlite` in `xmpp_database`
|
|
||||||
with the staged copy; if Mnesia does not come up clean,
|
|
||||||
`ejabberdctl restore /opt/ejabberd/database/nightly.backup`.
|
|
||||||
|
|
||||||
4. **Start the services**, then check: the sites answer, a `git clone`
|
|
||||||
from Forgejo works, an XMPP client logs in, the Minecraft world is the
|
|
||||||
expected one, and the next nightly backup succeeds.
|
|
||||||
|
|
||||||
The app stacks on ops (asxpio, datacenterbingo, blog, czsk, vhpbot,
|
|
||||||
storage) come back with `/opt/<app>` (compose file and `.env`); their
|
|
||||||
images are pulled from the registry in Forgejo, so Forgejo and storage
|
|
||||||
come first. If the registry copy is gone, re-run each app's CI.
|
|
||||||
|
|
||||||
## Onto a NixOS host
|
|
||||||
|
|
||||||
The backup made by a NixOS host holds the new layout (`/var/lib/forgejo`,
|
|
||||||
`/var/lib/garage`, `/var/lib/minecraft`, ...): restore to `/`, load the
|
|
||||||
Postgres dump, `touch /var/lib/.data-in-place`, start the services.
|
|
||||||
|
|
||||||
A backup made while the host was still Debian holds the layout described
|
|
||||||
above. Restore it to a side directory and let the migration script move
|
|
||||||
it into place; this is what was rehearsed on 2026-11-16:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
restic restore latest --host asxpio-ops --target /restore
|
|
||||||
bash nixos/migration/ops-data.sh /restore # or services-data.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Keeping this true
|
## Keeping this true
|
||||||
|
|
||||||
A restore that was never tried is a hope. After any change to what is
|
After a change to what is backed up, and at least twice a year, restore
|
||||||
backed up, and at least twice a year, restore the latest snapshot of
|
the latest snapshot of each host onto a rehearsal server (`nixos/README.md`)
|
||||||
each host onto a rehearsal server (`nixos/README.md`) and walk through
|
and walk through this page. Last walk-through: 2026-11-17, both hosts
|
||||||
this page. Last walk-through: 2026-11-16, both hosts, onto the NixOS
|
(the ops runbook on a fresh server with that night's backup).
|
||||||
rehearsal pair (Traefik, monitoring, the app stacks and XMPP not yet
|
|
||||||
part of it).
|
|
||||||
|
|
|
||||||
15
ansible/.gitignore
vendored
15
ansible/.gitignore
vendored
|
|
@ -1,15 +0,0 @@
|
||||||
# Ansible-specific
|
|
||||||
*.retry
|
|
||||||
*.log
|
|
||||||
.ansible/
|
|
||||||
|
|
||||||
# Vault
|
|
||||||
vault.yaml
|
|
||||||
.vault_pass
|
|
||||||
.vault_password
|
|
||||||
*vault_password*
|
|
||||||
vault-password.txt
|
|
||||||
*_vault.yaml.decrypted
|
|
||||||
vault.yaml.decrypted
|
|
||||||
*.vault.dec
|
|
||||||
*.decrypted
|
|
||||||
|
|
@ -1,132 +0,0 @@
|
||||||
# Ansible
|
|
||||||
|
|
||||||
`site.yaml` is the desired state of both servers and is applied by the
|
|
||||||
deploy pipeline on every push to `main`. The playbooks under
|
|
||||||
`playbooks/` are host bootstrap and are run by hand.
|
|
||||||
|
|
||||||
## Running
|
|
||||||
|
|
||||||
```sh
|
|
||||||
echo '<vault password>' > .vault_pass && chmod 600 .vault_pass
|
|
||||||
|
|
||||||
ansible-playbook site.yaml --check --diff # dry run, over WireGuard
|
|
||||||
ansible-playbook site.yaml # apply
|
|
||||||
ansible-playbook site.yaml --tags forgejo # one role
|
|
||||||
```
|
|
||||||
|
|
||||||
On NixOS: `nix shell nixpkgs#ansible -c ansible-playbook …`.
|
|
||||||
|
|
||||||
Templates that carry secrets are never shown in `--diff` output.
|
|
||||||
|
|
||||||
## Inventories
|
|
||||||
|
|
||||||
- `inventory/hosts.yaml`: default. Connects as root to the WireGuard
|
|
||||||
addresses.
|
|
||||||
- `inventory/ci.yaml`: used by the pipeline. Connects as `deploy` over
|
|
||||||
the private network, reaching asxpio-services through asxpio-ops.
|
|
||||||
|
|
||||||
`known_hosts` pins both servers' SSH host keys for the pipeline.
|
|
||||||
|
|
||||||
## Variables
|
|
||||||
|
|
||||||
```
|
|
||||||
inventory/
|
|
||||||
├── group_vars/all/
|
|
||||||
│ ├── network.yaml # VPC and WireGuard addresses
|
|
||||||
│ ├── paths.yaml # /opt
|
|
||||||
│ ├── s3.yaml # object storage buckets and s3fs mounts
|
|
||||||
│ ├── wireguard.yaml # WireGuard peers
|
|
||||||
│ └── vault.yaml # encrypted secrets
|
|
||||||
├── group_vars/ops_servers/
|
|
||||||
│ ├── traefik.yaml # traefik_version
|
|
||||||
│ └── forgejo.yaml # forgejo_version, domain and aliases
|
|
||||||
├── group_vars/services_servers/
|
|
||||||
│ ├── forgejo_runner.yaml # runner version, labels' nix image
|
|
||||||
│ └── minecraft.yaml
|
|
||||||
└── host_vars/ # per-host addresses, SSH and s3fs settings
|
|
||||||
```
|
|
||||||
|
|
||||||
Compose files without variables are plain files under
|
|
||||||
`roles/<role>/files/`; edit the image tag there.
|
|
||||||
|
|
||||||
## Roles in site.yaml
|
|
||||||
|
|
||||||
`base`, `traefik`, `crawler_alert`, `forgejo`, `forgejo_runner`,
|
|
||||||
`sillytavern`, `minecraft`, `xmpp`, `xray`, `restic_backup`. Service roles go
|
|
||||||
through `docker_service`, which writes the files, runs
|
|
||||||
`docker compose up -d`, restarts on a config change and waits for the
|
|
||||||
service to answer.
|
|
||||||
|
|
||||||
`crawler_alert` installs a copy of
|
|
||||||
[traefik-crawlers-statistics](https://git.asxp.io/asxpi/traefik-crawlers-statistics);
|
|
||||||
update `roles/crawler_alert/files/` from there.
|
|
||||||
|
|
||||||
## Security monitoring
|
|
||||||
|
|
||||||
`security-metrics` (role `monitoring_agent`, every minute on both hosts)
|
|
||||||
exports WireGuard peers, devices answering on the VPC, login accounts,
|
|
||||||
sudo/docker members, listening ports and containers with host access, each
|
|
||||||
with `known="true|false"` against a baseline, plus fingerprints of the
|
|
||||||
account, sudoers, sshd, WireGuard and `authorized_keys` files. Grafana
|
|
||||||
(dashboard Security, alert group `security`) mails on anything unknown, a
|
|
||||||
changed file, an SSH login from outside WireGuard, failed-login bursts
|
|
||||||
(SSH, Forgejo, Grafana, asxp.io admin), new Forgejo users, keys or
|
|
||||||
runners, and logs or the collector going quiet.
|
|
||||||
|
|
||||||
A deliberate change needs its baseline updated in the same commit, or it
|
|
||||||
alerts until it is:
|
|
||||||
|
|
||||||
| Change | Variable |
|
|
||||||
|---|---|
|
|
||||||
| WireGuard client | `wireguard_clients` (`group_vars/all/wireguard.yaml`) |
|
|
||||||
| Server on the VPC | `security_vpc_hosts` |
|
|
||||||
| Server in the Hetzner project | `monitoring_hcloud_servers` (`group_vars/all/monitoring.yaml`) |
|
|
||||||
| Account, sudo or docker member | `security_login_users`, `security_sudo_users`, `security_docker_users` |
|
|
||||||
| Published or listening port | `security_ports_extra` (host_vars) |
|
|
||||||
| Privileged container, host network, Docker socket | `security_containers_extra` (host_vars) |
|
|
||||||
|
|
||||||
Defaults are in `roles/monitoring_agent/defaults/main.yaml`. The VPC check
|
|
||||||
is a ping sweep: a device that drops ICMP is not seen.
|
|
||||||
Prometheus therefore also lists the project's servers from the Hetzner
|
|
||||||
API (`vault_hcloud_ro_token`, a read-only token) and alerts on an unknown
|
|
||||||
one, or when the list stops updating.
|
|
||||||
|
|
||||||
## Bootstrap playbooks
|
|
||||||
|
|
||||||
| Playbook | Purpose |
|
|
||||||
|----------|---------|
|
|
||||||
| `01-wireguard-setup.yaml` | WireGuard hub on asxpio-ops, peer on asxpio-services, client configs |
|
|
||||||
| `02-ssh-hardening.yaml` | restrict SSH to WireGuard and the private network |
|
|
||||||
| `03-setup-s3fs.yaml` | s3fs mounts on asxpio-services (off on asxpio-ops) |
|
|
||||||
| `04-add-user-zerrtika.yaml` | add a user to running servers |
|
|
||||||
| `05-swap.yaml` | 2 GB swapfile on asxpio-ops |
|
|
||||||
|
|
||||||
Always dry-run these first with `--check --diff`.
|
|
||||||
|
|
||||||
- `03-setup-s3fs.yaml` rewrites `/etc/s3fs/.passwd-s3fs`, which the
|
|
||||||
backup script on asxpio-ops also reads.
|
|
||||||
- On asxpio-services the WireGuard interface is named
|
|
||||||
`asxpio-services`, not `wg0`. Check `01-wireguard-setup.yaml` against
|
|
||||||
the host before re-running it there.
|
|
||||||
|
|
||||||
## Runner notes
|
|
||||||
|
|
||||||
The `nix-latest` label runs `nixos/nix:<forgejo_runner_nix_version>`
|
|
||||||
with a `nix-store-<version>` volume over `/nix`. To bump it: change the
|
|
||||||
variable, let the pipeline apply it, then remove the old volume.
|
|
||||||
|
|
||||||
## Runner and nix image upgrades
|
|
||||||
|
|
||||||
`forgejo_runner_version` and `forgejo_runner_nix_version` are bumped by
|
|
||||||
Renovate PRs. Applying either one recreates the runner while it runs
|
|
||||||
the very job that applies it:
|
|
||||||
|
|
||||||
- that run ends as *failed* (runner 13; *cancelled* on older runners)
|
|
||||||
after everything else has been applied, its log stopping in the
|
|
||||||
forgejo_runner role,
|
|
||||||
and its job container stays behind on asxpio-services
|
|
||||||
(`docker ps | grep FORGEJO-ACTIONS-TASK`); remove it;
|
|
||||||
- the next run confirms the result. The workflow only triggers on
|
|
||||||
changes under `ansible/` (or `workflow_dispatch` in the web UI), so an
|
|
||||||
empty commit starts nothing;
|
|
||||||
- after a nix bump, remove the old `nix-store-<old version>` volume.
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
[defaults]
|
|
||||||
interpreter_python = auto_silent
|
|
||||||
gathering = smart
|
|
||||||
pipelining = True
|
|
||||||
retry_files_enabled = False
|
|
||||||
inventory = inventory/hosts.yaml
|
|
||||||
roles_path = roles
|
|
||||||
host_key_checking = False
|
|
||||||
module_name = shell
|
|
||||||
display_skipped_hosts = no
|
|
||||||
timeout = 30
|
|
||||||
remote_user = root
|
|
||||||
vault_password_file = .vault_pass
|
|
||||||
|
|
||||||
[connection]
|
|
||||||
pipelining=True
|
|
||||||
|
|
||||||
[ssh_connection]
|
|
||||||
pipelining=True
|
|
||||||
control_path = /tmp/%%r@%%h:%%p
|
|
||||||
ssh_args = -o ControlPersist=10m -o PreferredAuthentications=publickey -o ControlMaster=no -o ForwardAgent=yes
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
---
|
|
||||||
# Inventory for the Forgejo Actions runner. Jobs run in containers on
|
|
||||||
# asxpio-services, so asxpio-ops is reached over the VPC. The services
|
|
||||||
# host itself is reached through asxpio-ops: a container talking to its
|
|
||||||
# own host arrives from a Docker bridge address, which sshd and the
|
|
||||||
# firewall both refuse.
|
|
||||||
|
|
||||||
all:
|
|
||||||
vars:
|
|
||||||
ansible_user: deploy
|
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
|
||||||
|
|
||||||
children:
|
|
||||||
asxpio:
|
|
||||||
children:
|
|
||||||
ops_servers:
|
|
||||||
hosts:
|
|
||||||
asxpio-ops:
|
|
||||||
ansible_host: "{{ vpc_ip }}"
|
|
||||||
# Empty: asxpio-services runs NixOS (nixos/ on branch nix) and is
|
|
||||||
# no longer managed here
|
|
||||||
services_servers: {}
|
|
||||||
# Outside every play; listed only so that ops's roles can still read
|
|
||||||
# its variables (addresses, public IP)
|
|
||||||
nixos:
|
|
||||||
hosts:
|
|
||||||
asxpio-services:
|
|
||||||
ansible_host: "{{ vpc_ip }}"
|
|
||||||
ansible_ssh_common_args: "-o ProxyJump=deploy@{{ asxpio_ops_vpc_ip }}"
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
---
|
|
||||||
# Monitoring: Prometheus, Loki and Grafana on asxpio-ops; node_exporter,
|
|
||||||
# cAdvisor and Alloy on both hosts. Scrapes and log shipping use the VPC.
|
|
||||||
|
|
||||||
# renovate: datasource=docker depName=prom/prometheus
|
|
||||||
monitoring_prometheus_version: "v3.16.0"
|
|
||||||
# renovate: datasource=docker depName=grafana/grafana
|
|
||||||
monitoring_grafana_version: "13.3.1"
|
|
||||||
# renovate: datasource=docker depName=grafana/loki
|
|
||||||
monitoring_loki_version: "3.7.10"
|
|
||||||
# renovate: datasource=docker depName=grafana/alloy
|
|
||||||
monitoring_alloy_version: "v1.22.0"
|
|
||||||
# renovate: datasource=docker depName=prom/node-exporter
|
|
||||||
monitoring_node_exporter_version: "v1.12.1"
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/google/cadvisor
|
|
||||||
monitoring_cadvisor_version: "v0.60.6"
|
|
||||||
# renovate: datasource=docker depName=prom/blackbox-exporter
|
|
||||||
monitoring_blackbox_version: "v0.29.1"
|
|
||||||
# renovate: datasource=docker depName=quay.io/prometheuscommunity/postgres-exporter
|
|
||||||
monitoring_postgres_exporter_version: "v0.20.1"
|
|
||||||
|
|
||||||
monitoring_metrics_retention: 90d
|
|
||||||
monitoring_logs_retention: 17520h # 2 years, chunks in S3 (asxpio-loki-main)
|
|
||||||
monitoring_alert_email: me@asxp.io
|
|
||||||
|
|
||||||
# Agents listen on the host's VPC address only
|
|
||||||
monitoring_node_exporter_port: 9100
|
|
||||||
monitoring_cadvisor_port: 9180
|
|
||||||
monitoring_loki_port: 3100
|
|
||||||
monitoring_textfile_dir: /var/lib/node_exporter/textfile
|
|
||||||
|
|
||||||
monitoring_grafana_host: gf.asxp.io
|
|
||||||
monitoring_grafana_admin_password: "{{ vault_grafana_admin_password }}"
|
|
||||||
monitoring_forgejo_metrics_token: "{{ vault_forgejo_metrics_token }}"
|
|
||||||
|
|
||||||
# Read-only Hetzner Cloud token: Prometheus lists the project's servers
|
|
||||||
# and alerts on one that is not named here.
|
|
||||||
monitoring_hcloud_token: "{{ vault_hcloud_ro_token }}"
|
|
||||||
monitoring_hcloud_servers: [asxpio-ops, asxpio-services]
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
---
|
|
||||||
# Network configuration for all hosts
|
|
||||||
# Centralized network definitions to avoid hardcoding IPs across the codebase
|
|
||||||
|
|
||||||
# VPC Network (Hetzner private network)
|
|
||||||
vpc_network: "10.10.0.0/20"
|
|
||||||
vpc_network_cidr: "10.10.0.0/20"
|
|
||||||
|
|
||||||
# WireGuard VPN Network
|
|
||||||
wireguard_network: "10.20.0.0/24"
|
|
||||||
wireguard_network_cidr: "10.20.0.0/24"
|
|
||||||
|
|
||||||
# Host IP Addresses
|
|
||||||
# These are used for service communication and should match inventory
|
|
||||||
asxpio_ops_vpc_ip: "10.10.0.10"
|
|
||||||
asxpio_ops_wireguard_ip: "10.20.0.10"
|
|
||||||
|
|
||||||
asxpio_services_vpc_ip: "10.10.0.20"
|
|
||||||
asxpio_services_wireguard_ip: "10.20.0.20"
|
|
||||||
|
|
||||||
# Trusted Networks for SSH Access
|
|
||||||
ssh_trusted_networks:
|
|
||||||
- "{{ wireguard_network }}"
|
|
||||||
- "{{ vpc_network }}"
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
# Base paths for all services
|
|
||||||
|
|
||||||
# Base directory for all service installations
|
|
||||||
services_base_path: "/opt"
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
---
|
|
||||||
# S3 Object Storage Configuration
|
|
||||||
# These should be overridden in vault or environment-specific vars
|
|
||||||
|
|
||||||
# S3 Endpoint Configuration
|
|
||||||
s3_region: hel1
|
|
||||||
s3_endpoint: "https://{{ s3_region }}.your-objectstorage.com"
|
|
||||||
|
|
||||||
# S3 Credentials
|
|
||||||
# WARNING: Store these in ansible-vault encrypted file!
|
|
||||||
# Override these in group_vars/all/vault.yaml (encrypted)
|
|
||||||
s3_access_key: "{{ vault_s3_access_key | default('') }}"
|
|
||||||
s3_secret_key: "{{ vault_s3_secret_key | default('') }}"
|
|
||||||
|
|
||||||
# S3 Bucket names
|
|
||||||
s3_bucket_terraform_main: asxpio-terraform-main
|
|
||||||
s3_bucket_terraform_repl: asxpio-terraform-repl
|
|
||||||
s3_bucket_backups_main: asxpio-backups-main
|
|
||||||
s3_bucket_backups_repl: asxpio-backups-repl
|
|
||||||
s3_bucket_loki: asxpio-loki-main
|
|
||||||
|
|
||||||
# S3 Buckets to mount on servers (non-replication only)
|
|
||||||
s3_buckets:
|
|
||||||
- name: "{{ s3_bucket_terraform_main }}"
|
|
||||||
mount_point: /mnt/s3/terraform
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0755"
|
|
||||||
- name: "{{ s3_bucket_backups_main }}"
|
|
||||||
mount_point: /mnt/s3/backups
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: "0755"
|
|
||||||
|
|
@ -1,175 +0,0 @@
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
|
||||||
31303531666133303130366364333335633834613435396332383835646361393965326264313761
|
|
||||||
3130333462393633626164343139326463333730663730660a356337376432306236386433663136
|
|
||||||
31303461383964663635306232663831333232646163336639393231316633613465616532623032
|
|
||||||
3462313231346132370a623139626336646164356436356366653737316635643733616332333265
|
|
||||||
30623737623135313333346531386431663139373863666661323330393263343361303565653861
|
|
||||||
61363338336666363765663432663233656136316436656636366265616362646130303437326466
|
|
||||||
33333336626531396232346663356636643265633238346638623766643639653035306633383237
|
|
||||||
61653135663039333736633861636434393866303432643530656139333338383661613464616663
|
|
||||||
32646135323661326431373731383339666533326464663636383732356239396430343634393233
|
|
||||||
61633231393039336665616239323466383838396538343264303038323437653239313039373666
|
|
||||||
38656166386366333836666565343864376361653033356439343365646239333462346336333034
|
|
||||||
37316637323839633032313363316431623232313830303764396666643963643663316433653638
|
|
||||||
30636365613637663064316138336563393238396364653431383233303064383037386334613230
|
|
||||||
32383064363033623661646131636438303664363732663963313438666162646365316365386333
|
|
||||||
66373435653065306634653962376366653566363034393832663161636163393032343164616163
|
|
||||||
61626162346466333431303134393038646431613335373862323831303461626332376664393633
|
|
||||||
65353932643064633132316465626639346365633137653661303031383031373738643965663965
|
|
||||||
63646337646638373565363030656134623361653161623830303166623739323736383438656434
|
|
||||||
32383936636336386361353734613538663831326666666233323231653238353233333937626266
|
|
||||||
36663130653336646165373438353039623061386364643666616365636434306330316664326134
|
|
||||||
39396364393531396233626235386331313862663765666564313565663230633536316430366264
|
|
||||||
34303439636338643334356134363835356639356365343566346131383065646533633133303135
|
|
||||||
38633265633037386566663264646161393165316261653330646631656631613330336639623862
|
|
||||||
66383164376232396135373165386663643165323039303066376234636565653534613965303734
|
|
||||||
61383964396338326162303633336465323538363365623864303034386238336363653263626664
|
|
||||||
38333839303763326466303565386366623337613963383363393638613930353665636135346165
|
|
||||||
34623539633239653563326165326636383734663635393030383063666138356564326132343661
|
|
||||||
30303161303336396461313962323962336162366336663066663630656438643834653963353264
|
|
||||||
61646666613834616439346233663338666137386134323130626336663565356561376464353635
|
|
||||||
36333430636461333130353762363835373631346362366637306135656564656639393337383863
|
|
||||||
65303763386263363661353337666166396334393034353364383336393261356562333733353861
|
|
||||||
64393531653961326335363663663137346239393436633137376163616537633864643364356362
|
|
||||||
39376662633039316632336630373432643235326336313433376639663966353233643335333061
|
|
||||||
66333335356232643566613963303930656135326230666562333365383338656334366135396135
|
|
||||||
31316634313663653939353134383735303438306361386433333862383261353037316439323135
|
|
||||||
30323963303064663665346632393532343739373530633536653133346437343763656665613131
|
|
||||||
37623162386434353433376533653036373332636265613737386465333036623263376361376134
|
|
||||||
34623230376666646538303936373837613766613563346238353663616435643930613130316439
|
|
||||||
38346331346630323234653762313763666364663433343938636562306261333566313863353261
|
|
||||||
64326338373636353231643665343039313962343039613635633137666230336231323631343339
|
|
||||||
66643362326266626565306439646632623231343137323838316330343432383538303237623232
|
|
||||||
64636334653161343363373938393864333437373430393533366263363761306562376561393137
|
|
||||||
39353166363230626139333566663161386138343835616436366664336537623661623930666463
|
|
||||||
34323235613334363964346431333563656631663239663563356161383430616262643730366136
|
|
||||||
64663031326639386634306361643536373635316266383263633264383237326664373865646230
|
|
||||||
30343739626463636135343639363230643037613166393130626539303037616264373134393763
|
|
||||||
37346466376438323234643162333739353831383137386238633132613434353730663430623035
|
|
||||||
65343639663365336631303236356361363533376564613335666534393535646637636361323435
|
|
||||||
62373039623338306166646465623963656334363563666134336630613531353365326662623064
|
|
||||||
39373330333164643561653133613731396466323335346362663338333937343034386533333965
|
|
||||||
61343532346232386263623533613432343231383838636130613137323061383465356131326461
|
|
||||||
31383534663663626433316331396139333365643630336135376536356564383131653836373238
|
|
||||||
36363334643239656331323533626266363130663237636463366364333634366134666135666363
|
|
||||||
31363965323335346263333532373966386336653730663334356437636438323132303263393463
|
|
||||||
33363562306433326331346235626234353064633334373861363962396162393134623235343535
|
|
||||||
39633137323632346533353366633263356534323132333035343035663631306235633433343030
|
|
||||||
35643565393263613562333637306362376430616236366361343466353163666461333839393561
|
|
||||||
39326538656662663836633933393739366633323164383838633961626638616337383531306131
|
|
||||||
33623734353836636235343663616665323039343637323132386464613763313862306531353736
|
|
||||||
35303261393331333665626234373036336132366364393837326561313039656430653137346361
|
|
||||||
63643364366565303566373931343063623338393432333039666531633537343033663661616534
|
|
||||||
34333766653431366639306433306136316461363562306535616132616339663563323061316536
|
|
||||||
35356338336363633435663538663832613238306139316163663262616339306633353363633763
|
|
||||||
62643731306535303763323439333133346362623234376634623666663734636232323032306139
|
|
||||||
39386464306338393339353831623037353034633134656465386332316334636162623639643634
|
|
||||||
64633165643238623466353262663863373562613363363131373934623833663865633862373939
|
|
||||||
37313131343562383530303933663033336463666133623739633266373339313634396634393665
|
|
||||||
32396165316339616436396633343161333537666235343834633861393139343433396437383130
|
|
||||||
37373961646166633631303238306463663536663663333661343239376565353030343437663730
|
|
||||||
31396239306236356632646464346465373635383466623631373265643734383834356437656361
|
|
||||||
34323838323964303563653133646333646133666164386464396362363566333139316566343835
|
|
||||||
63626661333538343430346231376362393063333736653933356539623434613462663461373563
|
|
||||||
64363062613037393930383562616230346631303966623466663130346230303537333964323238
|
|
||||||
63316264306439313564656464633037376639363839393262613236393564626134353034633235
|
|
||||||
64343837393464373631636561333636653735623832393236353135396231643632353233386536
|
|
||||||
31656637366337633530623831383737626431363763346139393136636361663135326439366135
|
|
||||||
33326337373661633861613466633165383437633830336364356666623738333135646536383438
|
|
||||||
66336630663937326534306336386137356464663764326634646438356530623035626430663335
|
|
||||||
35323338636232393330623066336162353566386432363737613239623731613038646438376339
|
|
||||||
33353565656638636233316632626436646261323963396534323430303433663466646163643330
|
|
||||||
63353666356263356539393833306231396335323837633262666434616165393038313164636339
|
|
||||||
35346134306538313133376133373535373335656364623734333131316334386633346338303464
|
|
||||||
38346337333631373663353732626163386638383437656539303264343563303561663363393463
|
|
||||||
37653838666530336433356561316337313166613333353731626632613937633262663331633332
|
|
||||||
63323761383533646238616662376138363132653030346162613164393231386663646130343265
|
|
||||||
34633134613638356139333764666362636461313030366637326661623834303436653430353365
|
|
||||||
65663766383438386538626233363430663230346633363563633130613736326631333239366334
|
|
||||||
31646630663338316162333232353761646238643166656134323361313432353433653837326134
|
|
||||||
63366265343936653864353433366530326633393366383061333836323332333133623866646534
|
|
||||||
37616663633932306136336238353864326364643331373234353666656561336631313662326563
|
|
||||||
32623334316335383161376334356331383936636137316137616465373838323964366565646561
|
|
||||||
63633133646464303232623530333666323664386537356164346436396635396464303034313761
|
|
||||||
66366234343436643930643039353262623866303830626530343664663462356339346233396239
|
|
||||||
33613236303737383237623735386137383432386465636635626464313331666162653263356361
|
|
||||||
31623639376437366530346534323939363739656563393563306532383064373566393333383730
|
|
||||||
33666561663566383835316438383762643932316232363536383866383863366666663437623264
|
|
||||||
39623262303938613637656266633632653462336138643130626366316336636331623464373338
|
|
||||||
31363336343335646435316532333064633765306430666230376465613462346435623734393030
|
|
||||||
34323836383061333736633933666532626636363034356232366335326263646335626635646433
|
|
||||||
65373934343731663036633238373838616437656134393665663136363634323061383032323936
|
|
||||||
66663133356561306535626131623730306266663565386663636364613064623963383838353533
|
|
||||||
31383962626236373964363561386331376230386332333233366136396166666230636230383737
|
|
||||||
32633530633264623864303430326561653563366164646436653061633839386165613765396433
|
|
||||||
65653435363766386466656332653764393966613832396462356331396464336239373533633438
|
|
||||||
62363431666533323639663434306165663966376538373535326562393331373137643530623435
|
|
||||||
33393064346439376333666663396262653439646363643035396634383533666432313638306431
|
|
||||||
34376531666334396634356139343534393231313032393232373866643365626461636165303934
|
|
||||||
62333338326431383262363466306264343466346366643231616238323537636139393663386538
|
|
||||||
31396465353633383134333432353332356330333138636533356335303165393834393832393636
|
|
||||||
39336262613763323332616638396530663835666234613634303931616532303433366262353332
|
|
||||||
36653735303165613263633738623839376566336437353137316264623439343031323637636538
|
|
||||||
37383763303930383138636663363535616230666535613362366533663931353033623532306633
|
|
||||||
38333961373335613030616333393139316235363662636137333635623063663765326165303363
|
|
||||||
62373064356563353236376337656438663266666639323861323065643537626366653634393638
|
|
||||||
63353265616165336237303934323033656561663131656362663463613762323032356431663739
|
|
||||||
66363861393864386138643166316133613635393833386364666137623437303062626130646139
|
|
||||||
37633135626363626436333365393762643866643863383765323962663534386564353264303834
|
|
||||||
66353661343037646535623763386666393562666335373661326435353330393736613933663639
|
|
||||||
64363065373563663337373163643730366538653766353431363630633163613035666163633837
|
|
||||||
63643835356265616663663833333039663436333966386436643733366336353431643937323763
|
|
||||||
31626363363733316663623433303733653930343662343364363631386138393063393033346338
|
|
||||||
37383039613739613439366339663366363038396466343666616163386461613731343639663334
|
|
||||||
63373864633662356261656265386232613438383733353632323030336535623765353965653330
|
|
||||||
65373938643935613662653036646337636461373530663430383963363136613736373839643362
|
|
||||||
31313665623537356262336432353966303634363039363965656435323139323330613735623965
|
|
||||||
35373965346132333735336366666137383862653239623363656131343831373061373064613230
|
|
||||||
35353564396233313337343063656366343162356633366630663261313238643266333061326265
|
|
||||||
65353637613361613933386530363132386165333063303330396231393866313864343564363636
|
|
||||||
35633832343636663861346230316262623361656337323065613663303765633237383565643131
|
|
||||||
63323632353131353338653533623266663232343561626234313439663532373239633366653936
|
|
||||||
32396233366639303839316265313738366337373061353737343733663165623538633361303961
|
|
||||||
38336366653132656562643231313933633362623061396665356130643339336466326363643162
|
|
||||||
30343836303364616266373464653135333261346234313863623336333666306666613739656362
|
|
||||||
31396633626535373838656161643565386139313230393365643534633264633131323563653931
|
|
||||||
34306632383466653435663837646538373762653837653539633039633766613435616134303234
|
|
||||||
30366137643039373739666235343662653962366231656336353939373837666131353330636231
|
|
||||||
33613436653835303431323437333362313363633834313337666634366463643933383934636565
|
|
||||||
32303635396162313366653234663562366235613531613362343631396236336237393235323766
|
|
||||||
34393066626634373163396232623131346231633562316431633331346264353963353430623134
|
|
||||||
37636438343338666365373166373563316665373338623630613335303831393435323036663965
|
|
||||||
31643036383738393863326631663632393366643763383539303336626330636435333833666633
|
|
||||||
34636533613566303864643636303539363264663031643032333361663934353062323034623664
|
|
||||||
33393664616432343733393861633431343732396238636530303135393830633265306337306337
|
|
||||||
62376635326532333736326366383639633163626163363066303530353238373662323338633432
|
|
||||||
63663337323535613838616236373561646262636563376632643962353466383763353337343037
|
|
||||||
35626464346561343565396463386266616562646130623266646635386461303365643136363566
|
|
||||||
39663737656165323730303164343431353932313638343033356262636435343061366166656638
|
|
||||||
32376165346330353334613565643265376266353664366235666462396164353265393934633635
|
|
||||||
63376633623066396464396464346666383765346530663638656436333730383737333433613465
|
|
||||||
66623934346135643266356136316662366239336139366631393663323835396462386335613536
|
|
||||||
34366638393164306561656663306263656534316130333064333963313836613163386263363538
|
|
||||||
61383262306139346136383834333365353934313865346336346530613732636463333935366538
|
|
||||||
32373461393039616561663933383835316539613061643863663762323130303662386363336336
|
|
||||||
61313131623437303864373739303330363438616137323739313962623163363531656638363436
|
|
||||||
36623564373831653037343933363166636661303736343933373239626530323862633561643365
|
|
||||||
37336463333036363266653138393263623365616336306331623361373831616138323630623933
|
|
||||||
61386662656163363165643439653864653765646262666332666636656464313834303634323736
|
|
||||||
38306537643733316139383664326532653531663036616634306332336462623130616364616434
|
|
||||||
35653239653466303031653533313338343162363665383361353766396335376237376334303435
|
|
||||||
61323434653066363361306566653036363731393935373236303061626163323432633237633364
|
|
||||||
37346532346162333762376439326466316233376265653632333431316339313230643834613431
|
|
||||||
32383534653762373063323536623436633839623937386465313937383665363931306132343461
|
|
||||||
34333933393936393537303633656662633263393635633035383261393563653432363634333861
|
|
||||||
37336364326431653430363063633063306332386161313632323361323231396638386336363965
|
|
||||||
64646437653266613065373662353130373134383236313064616630343934643038353161306133
|
|
||||||
35393232303661363431633937366639303965636434646361366634363130303034336463383834
|
|
||||||
30653865343766363563306331356664383431383932616362326234333032316439343665326439
|
|
||||||
65336561616134336133363366363466633639353539383633386537373761623434363338643163
|
|
||||||
30316465323436306636656135396563306538656634646330326666663237633737353233383562
|
|
||||||
33336533383537396631333465343737633336353638636462333534343330356639343763656534
|
|
||||||
62383163396135306630353839613631396235383061363639313135346333383265383561396132
|
|
||||||
30376535303033353661303838663664623364306564383834306462386661343331636130373533
|
|
||||||
65333933356264653361303434376433653866653562313630623733616630336531613637376232
|
|
||||||
3265376534643634616634653437663435303533343630346433
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
---
|
|
||||||
# Ansible Vault Template
|
|
||||||
# Copy this file to vault.yaml and encrypt it with:
|
|
||||||
# ansible-vault encrypt vault.yaml
|
|
||||||
#
|
|
||||||
# Or create encrypted vault directly:
|
|
||||||
# ansible-vault create vault.yaml
|
|
||||||
#
|
|
||||||
# This file contains all sensitive secrets used across the infrastructure
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# S3 Object Storage Credentials
|
|
||||||
# ============================================================================
|
|
||||||
vault_s3_access_key: "YOUR_S3_ACCESS_KEY_HERE"
|
|
||||||
vault_s3_secret_key: "YOUR_S3_SECRET_KEY_HERE"
|
|
||||||
|
|
||||||
# Optional: Alternative S3 endpoint if not using default
|
|
||||||
# vault_s3_endpoint: "https://hel1.your-objectstorage.com"
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# Forgejo Secrets
|
|
||||||
# ============================================================================
|
|
||||||
# Generate with: openssl rand -hex 32
|
|
||||||
vault_forgejo_secret_key: "GENERATE_64_CHAR_HEX_STRING_HERE"
|
|
||||||
|
|
||||||
# Generate with Forgejo or use existing JWT token
|
|
||||||
vault_forgejo_internal_token: "eyJhbGc..."
|
|
||||||
|
|
||||||
# Generate with: openssl rand -base64 32
|
|
||||||
vault_forgejo_jwt_secret: "GENERATE_BASE64_STRING_HERE"
|
|
||||||
vault_forgejo_lfs_jwt_secret: "GENERATE_BASE64_STRING_HERE"
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# Forgejo Runner
|
|
||||||
# ============================================================================
|
|
||||||
# Generate from Forgejo UI: Site Admin → Actions → Runners → Create Runner
|
|
||||||
vault_forgejo_runner_token: "GENERATE_FROM_FORGEJO_UI"
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# SSL/TLS Certificates
|
|
||||||
# ============================================================================
|
|
||||||
# Email for Let's Encrypt certificate notifications
|
|
||||||
vault_letsencrypt_email: "admin@example.com"
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# Database Credentials (if needed for future services)
|
|
||||||
# ============================================================================
|
|
||||||
# vault_postgres_password: "GENERATE_SECURE_PASSWORD"
|
|
||||||
# vault_mysql_root_password: "GENERATE_SECURE_PASSWORD"
|
|
||||||
# vault_redis_password: "GENERATE_SECURE_PASSWORD"
|
|
||||||
|
|
||||||
# ============================================================================
|
|
||||||
# API Keys and Tokens (if needed for future services)
|
|
||||||
# ============================================================================
|
|
||||||
# vault_grafana_admin_password: "GENERATE_SECURE_PASSWORD"
|
|
||||||
# vault_immich_db_password: "GENERATE_SECURE_PASSWORD"
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
---
|
|
||||||
# WireGuard VPN configuration
|
|
||||||
# Centralized configuration for all WireGuard settings
|
|
||||||
|
|
||||||
# WireGuard network interface and port
|
|
||||||
wireguard_port: 60101
|
|
||||||
wireguard_interface: "wg0"
|
|
||||||
|
|
||||||
# WireGuard server configuration (asxpio-ops)
|
|
||||||
wireguard_ipv4: 10.20.0.10
|
|
||||||
wireguard_ipv6: fd69:69:69::1
|
|
||||||
wireguard_ipv4_network: 10.20.0.0/24
|
|
||||||
wireguard_ipv6_network: fd69:69:69::/64
|
|
||||||
|
|
||||||
# Enable UFW firewall rules (set to false to use iptables PostUp/PostDown)
|
|
||||||
wireguard_enable_ufw: false
|
|
||||||
|
|
||||||
# WireGuard clients
|
|
||||||
wireguard_clients:
|
|
||||||
- name: asxpio-services
|
|
||||||
ipv4: 10.20.0.20
|
|
||||||
ipv6: fd69:69:69::20
|
|
||||||
preshared_key: true
|
|
||||||
persistent_keepalive: 25
|
|
||||||
- name: laptop
|
|
||||||
ipv4: 10.20.0.2
|
|
||||||
ipv6: fd69:69:69::2
|
|
||||||
preshared_key: true
|
|
||||||
persistent_keepalive: 25
|
|
||||||
- name: aleks
|
|
||||||
ipv4: 10.20.0.3
|
|
||||||
ipv6: fd69:69:69::3
|
|
||||||
preshared_key: true
|
|
||||||
persistent_keepalive: 25
|
|
||||||
- name: zerrtika
|
|
||||||
ipv4: 10.20.0.4
|
|
||||||
ipv6: fd69:69:69::4
|
|
||||||
preshared_key: true
|
|
||||||
persistent_keepalive: 25
|
|
||||||
- name: sanya
|
|
||||||
ipv4: 10.20.0.5
|
|
||||||
ipv6: fd69:69:69::5
|
|
||||||
preshared_key: true
|
|
||||||
persistent_keepalive: 25
|
|
||||||
|
|
||||||
# DNS servers for VPN clients
|
|
||||||
wireguard_dns_servers:
|
|
||||||
- 1.1.1.1
|
|
||||||
- 1.0.0.1
|
|
||||||
|
|
||||||
# Optional: Additional routes for split tunneling
|
|
||||||
# wireguard_additional_routes:
|
|
||||||
# - 192.168.1.0/24
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
---
|
|
||||||
# The XMPP certificate is issued by Traefik on asxpio-ops (HTTP challenge;
|
|
||||||
# services forwards its challenges there, role acme_forward) and pushed to
|
|
||||||
# ejabberd on asxpio-services on every renewal (role xmpp_cert_sync).
|
|
||||||
xmpp_cert_main: xmpp.asxp.io
|
|
||||||
xmpp_cert_sans: [conference.asxp.io]
|
|
||||||
# Certificates pushed to ejabberd, by their main domain in acme.json; it
|
|
||||||
# picks the matching file per domain. asxp.io is the site's own
|
|
||||||
# certificate: Traefik never requests a name it already holds a
|
|
||||||
# certificate for, so asxp.io can't be part of the one above.
|
|
||||||
xmpp_cert_push: [asxp.io, xmpp.asxp.io]
|
|
||||||
# renovate: datasource=docker depName=nginx
|
|
||||||
acme_forward_nginx_version: "1.31.8-alpine-slim"
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
---
|
|
||||||
# renovate: datasource=docker depName=codeberg.org/forgejo/forgejo
|
|
||||||
forgejo_version: "17.0.1"
|
|
||||||
|
|
||||||
# The instance answers on every name below. forgejo_domain is the
|
|
||||||
# canonical one (ROOT_URL, clone URLs, mail links); the rest are aliases.
|
|
||||||
forgejo_domain: git.asxp.io
|
|
||||||
forgejo_alias_domains:
|
|
||||||
- git.czsk.it
|
|
||||||
|
|
||||||
forgejo_base_path: "{{ services_base_path }}/forgejo"
|
|
||||||
forgejo_http_port: 3000
|
|
||||||
|
|
||||||
# app.ini is owned by the container's git user
|
|
||||||
forgejo_uid: 1000
|
|
||||||
forgejo_gid: 1000
|
|
||||||
|
|
||||||
traefik_network: traefik
|
|
||||||
|
|
||||||
forgejo_secret_key: "{{ vault_forgejo_secret_key }}"
|
|
||||||
forgejo_internal_token: "{{ vault_forgejo_internal_token }}"
|
|
||||||
forgejo_jwt_secret: "{{ vault_forgejo_jwt_secret }}"
|
|
||||||
forgejo_lfs_jwt_secret: "{{ vault_forgejo_lfs_jwt_secret }}"
|
|
||||||
forgejo_server_lfs_jwt_secret: "{{ vault_forgejo_server_lfs_jwt_secret }}"
|
|
||||||
forgejo_smtp_user: "{{ vault_forgejo_smtp_user }}"
|
|
||||||
forgejo_smtp_password: "{{ vault_forgejo_smtp_password }}"
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
# renovate: datasource=docker depName=traefik
|
|
||||||
traefik_version: "v3.7.19"
|
|
||||||
traefik_base_path: "{{ services_base_path }}/traefik"
|
|
||||||
traefik_dashboard_port: 8080
|
|
||||||
traefik_network: traefik
|
|
||||||
|
|
||||||
letsencrypt_email: "{{ vault_letsencrypt_email }}"
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
# Forgejo Runner (CI/CD) configuration
|
|
||||||
|
|
||||||
# Runner version and settings
|
|
||||||
# renovate: datasource=docker depName=code.forgejo.org/forgejo/runner
|
|
||||||
forgejo_runner_version: "13.2.1"
|
|
||||||
forgejo_runner_capacity: 4
|
|
||||||
forgejo_runner_timeout: 3h
|
|
||||||
|
|
||||||
# Image behind the nix-latest label. Jobs mount a nix-store volume over
|
|
||||||
# /nix, seeded from this image on first use; the image's /bin/sh and
|
|
||||||
# /etc/nix/nix.conf link into that store, so a volume from another
|
|
||||||
# version breaks them. Bumping this also switches to a fresh volume.
|
|
||||||
# renovate: datasource=docker depName=nixos/nix
|
|
||||||
forgejo_runner_nix_version: "2.35.6"
|
|
||||||
forgejo_runner_token: "{{ vault_forgejo_runner_token }}"
|
|
||||||
|
|
||||||
# Runner installation path
|
|
||||||
forgejo_runner_base_path: "{{ services_base_path }}/forgejo-runner"
|
|
||||||
|
|
||||||
# The runner talks to Forgejo over the VPC, not through Traefik
|
|
||||||
forgejo_http_port: 3000
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
# Runner for another-im/interop on dev.another.im, moved here from its own
|
|
||||||
# cx23 (claude-test-interop-runner). Registered in Forgejo as a UUID +
|
|
||||||
# token pair; the UUID is not secret (interop's infra/runner.json).
|
|
||||||
interop_runner_uuid: "dc326085-8420-4c33-8b88-a9ef46b3359b"
|
|
||||||
interop_runner_token: "{{ vault_interop_runner_token }}"
|
|
||||||
interop_runner_capacity: 3
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
# another.im XMPP server for asxp.io: ejabberd, apushd (push), tackygram
|
|
||||||
# (Telegram gateway). Upstream: https://dev.another.im/another-im/anotherim-server
|
|
||||||
xmpp_domain: asxp.io
|
|
||||||
|
|
||||||
# renovate: datasource=docker depName=dev.another.im/another-im/anotherim-server
|
|
||||||
xmpp_ejabberd_version: "2026.11.07"
|
|
||||||
# renovate: datasource=docker depName=dev.another.im/another-im/apushd
|
|
||||||
xmpp_apushd_version: "0.2"
|
|
||||||
# renovate: datasource=docker depName=dev.another.im/another-im/tackygram
|
|
||||||
xmpp_tackygram_version: "0.4.3"
|
|
||||||
|
|
||||||
xmpp_upload_url: https://hel1.your-objectstorage.com/asxpio-xmpp-public/
|
|
||||||
xmpp_tackygram_call_ports: "50000-50099"
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue