[docs] Previews (the API for Fabrica, names, the token from the team vault), Ianitor anywhere (Linux, Docker, Windows Server in Caddy mode, NixOS), team sign-in in api.md, the Custos ticket's T4 part; release 0.2.0: the pipeline builds and tests the Linux tarball, the Windows zip and the image; the NixOS previews option; Docker and Linux smoke scripts
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
# Ianitor anywhere (T4)
|
||||
|
||||
Four ways to run Ianitor, one config model. Fabrica's coherence roadmap (`docs/32_coherence.md`, §2.5 and T4).
|
||||
|
||||
| | Engine | Package | Install | Secrets |
|
||||
| :-- | :-- | :-- | :-- | :-- |
|
||||
| Linux with systemd | Pingora (edge) | `ianitor-X.Y.Z-linux-x86_64.tar.gz` + `install.sh` | one line, below | `/var/lib/ianitor/credentials` (0700, random, made by setup) |
|
||||
| Docker | Pingora (edge) | the image from `deploy/docker/Dockerfile`, `deploy/docker/compose.yaml` | `docker compose up -d` | the `state` volume's `credentials/` |
|
||||
| Windows Server | **Caddy** (Caddy mode) | `ianitor-X.Y.Z-windows-x86_64.zip` | `install.ps1` | `%ProgramData%\Ianitor\credentials` (ACL: Administrators, SYSTEM, LocalService) |
|
||||
| NixOS | Pingora, Caddy fallback | the flake (`nixosModules.ianitor`) | `nixos-rebuild` | systemd credentials (`LoadCredential`) |
|
||||
|
||||
Everywhere: control listens on 127.0.0.1:7878 only; only the engine binds 80 and 443; the web UI is the admin host
|
||||
(`IANITOR_ADMIN_HOST`) through the engine. Without Authelia, people sign in with team links (Settings → Team,
|
||||
docs/api.md); the installer prints the first admin's link (`ianitor-control team setup-link`).
|
||||
|
||||
## Linux (systemd)
|
||||
|
||||
```bash
|
||||
curl -fsSL https://gitea.marek-novak.cz/mnovak/Ianitor/releases/download/v0.2.0/install.sh | sudo IANITOR_ADMIN_HOST=ianitor.example.org IANITOR_PREVIEW_DOMAIN=preview.example.org IANITOR_PREVIEW_UPSTREAMS=10.0.0.0/8 sh
|
||||
```
|
||||
|
||||
It checks the tarball against the release's `SHA256SUMS`, installs `/usr/local/bin/ianitor-{control,edge}`, the web
|
||||
UI, `ianitor-control.service` and `ianitor-edge.service` (users `ianitor` and `ianitor-edge`, the NixOS module's
|
||||
hardening), writes `/etc/ianitor/control.toml` once (`deploy/linux/setup.sh`: every `IANITOR_*` variable is
|
||||
listed there), starts both and prints the sign-in link. Running it again upgrades and keeps config and state. No
|
||||
Caddy fallback here (the engine switch is NixOS-only); header-rule secrets need a `LoadCredential=` line each.
|
||||
|
||||
## Docker
|
||||
|
||||
```bash
|
||||
cd deploy/docker && printf 'IANITOR_ADMIN_HOST=ianitor.example.org\nIANITOR_PREVIEW_DOMAIN=preview.example.org\nIANITOR_PREVIEW_UPSTREAMS=app\n' > .env && docker compose up -d && docker compose exec control ianitor-entrypoint setup-link
|
||||
```
|
||||
|
||||
Two services from one image: `edge` (ports 80/443) and `control` in edge's network namespace, so the API stays on
|
||||
loopback. Read-only root, no capabilities, `no-new-privileges`, user 10001. Previews of other containers: attach them
|
||||
to the compose network and list their names in `IANITOR_PREVIEW_UPSTREAMS`.
|
||||
|
||||
## Windows Server (Caddy mode)
|
||||
|
||||
Pingora's Windows support is preliminary upstream, so Windows runs control with Caddy as the data plane: same UI,
|
||||
same TOML, compiled to Caddy JSON; the differential suite runs on Windows with Windows paths to keep that honest.
|
||||
From the unpacked zip, in an elevated PowerShell (Git for Windows installed):
|
||||
|
||||
```bash
|
||||
powershell -ExecutionPolicy Bypass -File install.ps1 -AdminHost ianitor.example.org -PreviewDomain preview.example.org -PreviewUpstreams "10.0.0.0/8,127.0.0.1:20000-29999"
|
||||
```
|
||||
|
||||
Three services as LocalService, restarted on failure: `IanitorCaddy` (`caddy run` on the last good `caddy.json`),
|
||||
`IanitorControl` (`ianitor-control service control`) and `IanitorGuard` (the Caddy trial deadline, its own process
|
||||
so a hung control cannot leave Caddy on an unconfirmed change). Caddy 2.11.7 is fetched by the installer and its
|
||||
SHA-512 checked against the pinned value. Caddy's admin API listens on 127.0.0.1:2019 (Windows has no Unix socket
|
||||
for it); any local process could reach it, so the machine should run nothing untrusted. Logs:
|
||||
`%ProgramData%\Ianitor\logs`. Domi certificates have no revocation list, so Windows' own TLS (Schannel, curl.exe)
|
||||
needs `--ssl-no-revoke`; browsers accept them once the Domi root is trusted.
|
||||
|
||||
## NixOS
|
||||
|
||||
Unchanged (`nixosModules.ianitor`, docs/deploy/beside-caddy.md), plus `services.ianitor.previews.{domain, tls, auth,
|
||||
upstreams, defaultTtlSeconds}`.
|
||||
|
||||
## The Domi CA anywhere
|
||||
|
||||
With `tls = domi` the root stays offline (`ianitor-control ca init` on another machine). Start the intermediate in
|
||||
the UI (Certificates → banner Renew) or `POST /api/v1/certs/intermediate/renewal`, sign the CSR offline
|
||||
(`ianitor-control ca sign`), install it (`ianitor-control pki install <crt> --config <c>`), then restart control so
|
||||
it adds the admin host with a certificate it can now issue. `scripts/smoke-windows.ps1` does all of it with a
|
||||
throw-away root.
|
||||
|
||||
## Routes on any git host
|
||||
|
||||
`IANITOR_ROUTES_REMOTE` (an `https://` URL on Gitea, GitHub or GitLab) and `IANITOR_ROUTES_HOST`
|
||||
(`gitea`, `github` → user `x-access-token`, `gitlab` → `oauth2`); the token goes in the credentials folder as
|
||||
`routes-token`. Kept changes are pushed there, as on NixOS.
|
||||
|
||||
## Smoke tests (what was run for T4, 2026-11-17)
|
||||
|
||||
- Windows: `scripts/smoke-windows.ps1` (installer with `-NoService`, Caddy and control in the console, PKI, the
|
||||
preview client, the preview through Caddy, close). The services themselves (SCM start, LocalService ACLs, ports 80
|
||||
and 443) were not exercised on this PC.
|
||||
- Docker and Linux: see the T4 handover in docs/ROADMAP.md.
|
||||
Reference in New Issue
Block a user