Commit graph iac/.forgejo/workflows
Author SHA1 Message Date
2635b887c7
nixos: drop the rehearsal pair and other migration leftovers
All checks were successful
nixos / nixos (push) Successful in 1m3s
The test pair served the move to NixOS, which is done. Its overlays,
dummy secrets and sops recipients go; the rules for testing on a copy
of production stay in nixos/README.md, and git log finds the overlay
if it is needed again. Options that existed only for it (alert address,
Loki bucket, extra cert-push keys) are inlined, and comments still
pointing at Ansible or MIGRATION.md are corrected.

The tofu README now spells out the state bucket bootstrap: the bucket
is a resource in the state it holds, so a new project needs one local
apply first. The bucket gets prevent_destroy for the same reason.

Assisted-by: Claude:opus-5-5
2026-11-17 11:11:33 +04:00
c6431760bd
ci: wait for a running activation before switching a host
All checks were successful
nixos / nixos (push) Successful in 1m8s
nixos-rebuild activates through a transient unit with a fixed name. An
activation that started a long one-shot job waits for it; a deploy in
the meantime failed with "did you forget --ask-sudo-password?", twice
today. Wait up to 20 minutes for the earlier activation to finish.

Assisted-by: Claude:opus-5-5
2026-11-17 10:35:44 +04:00
81381d8438
ci: remove the Ansible deploy; asxpio-ops moves to NixOS
ops is the last host Ansible manages, and it is being converted now
(MIGRATION.md, Phase 2). A later push under ansible/ would otherwise
apply the Debian roles to the converted host. The Ansible code stays
until the clean-up.

Assisted-by: Claude:opus-5-5
2026-11-17 08:49:47 +04:00
ebbf458983
docs: the full migration plan; ci: deploy NixOS hosts
All checks were successful
nixos / nixos (push) Successful in 55s
MIGRATION.md is now the complete plan for moving production from
Ansible and Terraform to NixOS and OpenTofu: what was rehearsed and
how, the preparation that needs no downtime, one runbook per host with
its checks and rollback, the clean-up including the branch renames,
and the rules for running restored production data on test servers.

The NixOS workflow now deploys on main, ops first, building on each
host. It checks /etc/NIXOS before touching a host, so it skips both
servers until their conversion and cannot reach a Debian one.
known_hosts moves to the repository root for it.

Renovate learns the Nix files: version comments, the runner's job
images and flake.lock (weekly). The Ansible patterns stay until
Ansible is gone.

Assisted-by: Claude:opus-5-5
2026-11-17 05:15:16 +04:00
933b086bb1
docs: how to build, restore and migrate; ci: evaluate NixOS hosts
Anyone with the repo and the secrets should be able to rebuild the
servers. nixos/README.md covers building from nothing, reinstalling in
place and the rehearsal pair; RESTORE.md covers restoring from the
restic backups; MIGRATION.md is the plan and runbook for moving
production over, with what was learned on the test servers.

CI evaluates every host on a push under nixos/. It does not deploy yet:
no production host runs NixOS.

Assisted-by: Claude:fable-5-2
2026-11-16 22:59:59 +04:00
428df5896d
Pin exact versions of images and actions
Some checks failed
deploy / ansible (push) Failing after 17m57s
Floating tags (17-alpine, 3.4-slim, nginx:alpine, :latest, :debug, @v7)
change under a deploy without anyone deciding it: the storage deploy
moved Postgres to 17.12 on its own because of postgres:17-alpine. Pin
every image and action to its exact current version, so each change
arrives as a reviewed Renovate PR and a rollback is a revert.

Assisted-by: Claude:opus-5-5
2026-11-13 02:46:54 +04:00
35c6ab5e30
ci: run Renovate from asxpi/renovate
Renovate now runs from its own repository for every repo, with the
shared rules in its preset. Extend that preset here and keep only what
is specific to this repo (the Ansible var manager, the Paper JRE, the
runner and nix notes); drop the workflow that ran it for iac alone.

Assisted-by: Claude:opus-5-5
2026-11-13 01:43:18 +04:00
d22d924b45
Merge PR #5: deps: Update actions/checkout action to v7 2026-11-12 23:32:56 +04:00
38a96497ca
ci: quote the deploy run-name
All checks were successful
deploy / ansible (push) Successful in 4m25s
The unquoted value contains ": ", which YAML reads as a nested mapping,
so Forgejo rejected the whole workflow and the last two pushes ran
nothing. Quote it.

Assisted-by: Claude:opus-5-5
2026-11-12 23:24:54 +04:00
ba2e3cbde8
ci: name deploy runs "dry run" or "apply"
Some checks failed
deploy.yaml / ci: name deploy runs "dry run" or "apply" (push) Failing after 0s
Every run was listed as "deploy", so dry runs on Renovate branches
looked like deployments. Name each run after what it does and the
branch it ran on.

Assisted-by: Claude:opus-5-5
2026-11-12 23:23:57 +04:00
c4462b3e33 ci: point Renovate at asxpi/iac
The repository was renamed from infrastructure to iac. Renovate looks
repositories up by name, and with push-to-create on, the old name now
belongs to a different, empty repository.

Assisted-by: Claude:opus-5-5
2026-11-12 22:54:11 +04:00
9dfb874c9f deps: Update actions/checkout action to v7 2026-11-12 18:35:04 +00:00
2aca0d7669 ci: Renovate opens version bump PRs with release notes
Versions are pinned across the Ansible vars, compose files, Terraform
providers and workflows, and nothing says when one is behind. Run
Renovate daily from Forgejo Actions: one PR per available bump, with
the upstream changelog in the body, which the deploy pipeline then
dry-runs like any other branch.

Variables are tracked through a "# renovate: datasource=... depName=..."
comment above them; Forgejo, Traefik, the runner and its nix image get
one here. The Paper JRE tag is left alone, the runner and nix bumps
carry their manual follow-up steps in the PR, and Renovate's own image
is bumped monthly.

Needs the repository secrets RENOVATE_TOKEN (bot user with write
access) and GH_COM_TOKEN (read-only github.com token for release
notes).

Assisted-by: Claude:opus-5-5
2026-11-12 21:20:47 +04:00
63bd67a86d ci: deploy site.yaml from Forgejo Actions
Service changes were made by hand on the servers, which is how the
repository drifted. Apply site.yaml from a workflow instead: every
push dry-runs it against production, and a push to main applies it.

Jobs run in containers on asxpio-services. asxpio-ops is reached over
the private network; the services host is reached through asxpio-ops,
because a container connecting to its own host arrives from a Docker
bridge address that sshd and the firewall refuse. Host keys are pinned
in known_hosts.

Ansible comes from a pinned nixpkgs revision so every run uses the
same version.

Assisted-by: Claude:fable-5-2
2026-11-12 06:47:09 +04:00