diff --git a/README.md b/README.md index 17b9727..2e0029e 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,12 @@ D-075 selects GNOME first and approves the native/Flatpak application split in `GNOME.md`. D-076 requires Arch Toolbx/rootless Podman on every Desktop Purpose. The proposal is still build-disabled until integration and acceptance are complete. +A new Purpose proposal, [`proposals/container-runner.md`](proposals/container-runner.md), +describes a server edition for Podman, Cockpit and Tailscale. It is **Proposed, +build-disabled and not accepted**; its package list was checked against the +2026-11-10 mirror snapshot and several Cockpit plugins are not packaged there. Do not +build it or treat it as a release variant before an explicit decision. + Reviewed Layer v1 source definitions live here. The initial KDE/GNOME documents in `proposals/` are **disabled candidates**; accepted application choices do not make their exact package closures, adapters or pinned inputs implementation-ready. diff --git a/proposals/container-runner.md b/proposals/container-runner.md new file mode 100644 index 0000000..99c22b4 --- /dev/null +++ b/proposals/container-runner.md @@ -0,0 +1,143 @@ +# Container Runner — Purpose proposal + +**Status: Proposed, build-disabled. Not accepted, not implemented.** +Nothing in this document is a stable package list, adapter or release decision. +It exists so the work can be reviewed and scheduled; enabling it requires an +explicit RFC Committee decision, and every claim below still needs a real build and +acceptance run. D-055 allows exactly one Purpose per image, so this is a new optional +Purpose (`server/container-runner`), not a change to Core, GNOME or KDE. + +## Goal + +Turn an ordinary x86_64 server or spare PC into a managed container host: + +- a stock container runtime with rootless use; +- a browser management surface (Cockpit) for containers, storage and logs; +- a Mesh-network entry point (Tailscale) without shipping credentials; +- the normal Archipelago guarantees: immutable `/usr`, persistent `/var`, + OSTree update/rollback, the same Core checks and the same image identities. + +The edition is a *Purpose*, so it inherits Core (D-052) and adds only its own package +set, service activation and checks. It must not become a second distribution, a +second updater or a mutable build. + +## Verified package inputs + +Checked against the mirror snapshot used on 2026-11-10 (`extra`/`core` DB). Versions +are evidence for that snapshot only; the real list is pinned through the normal +snapshot/lock mechanism (D-042, D-043). + +| Area | Packages | Note | +| --- | --- | --- | +| Runtime | `podman 6.1.4`, `conmon 2.2.1`, `crun 1.30.1`, `containers-common 0.69.2` | Stock Arch stack; no Docker daemon | +| Networking | `netavark 2.1.0`, `aardvark-dns 2.1.0`, `slirp4netns 1.3.7`, `passt`, `catatonit` | Rootless and bridge networking | +| Storage | `fuse-overlayfs 1.18` | Rootless overlay on the persistent `/var` | +| Tooling | `podman-compose 1.6.0`, `podman-docker 6.1.4`, `buildah`, `skopeo` | `podman-docker` conflicts with a real Docker install by design | +| Multi-arch | `qemu-user-static`, `qemu-user-static-binfmt` | Optional at build; enables foreign-arch images | +| Rootless IDs | `shadow 4.20` (`newuidmap`, `newgidmap`) | Requires subuid/subgid allocation at account creation (D-028) | +| Management | `cockpit 371`, `cockpit-podman 133`, `cockpit-machines 360`, `cockpit-storaged 371`, `cockpit-files 47` | All present in the snapshot | +| Network UI | `networkmanager 1.58` | Needed by Cockpit's network page; Core currently uses networkd | +| Firewall | `nftables`, `firewalld` (or `ufw`) | Policy decision below | +| Mesh | `tailscale 1.104.5` | Stock package; needs `tun`, state directory and onboarding | +| Operations | `openssh`, `chrony`, `polkit`, `sudo`; optionally `pcp` | `pcp` exists but the Cockpit PCP plugin is not packaged | + +Not shippable as-is: + +- **`cockpit-packagekit` is excluded by D-095.** Cockpit's Software Updates page has + no compliant backend yet. Either implement a Cockpit plugin on top of + `archipelagod`'s typed D-Bus API (the same engine as GNOME Software) or hide the + page. This is a real contract gap, not a cosmetic one. +- **`cockpit-networkmanager` and `cockpit-pcp` are not in the current snapshot repo.** + Upstream Cockpit ships them as separate subpackages; on Arch they must be verified + or built as Archipelago packaging. Do not promise a "full plugin set" until that + is resolved. `cockpit-sosreport` and `cockpit-session-recording` are likewise + absent and are not required for the goal. +- **Docker Engine is not included.** `podman-docker` provides the CLI shim; a real + Docker daemon would be a second, unmanaged runtime. + +## Services and defaults + +- `cockpit.socket` enabled, reached over HTTPS on 9090. Listen/exposure policy is an + open decision: LAN plus tailnet by default is convenient but broad; tailnet-only is + safer. No unauthenticated access, no `AllowUnencrypted`. +- `tailscaled.service` enabled with state in `/var/lib/tailscale` and its socket + under `/run/tailscale`. **No auth key, node key or account identity is baked into + the image.** First boot needs an explicit `tailscale up` (interactive URL or a + user-supplied `TS_AUTHKEY` passed at runtime, never stored in the image). The `tun` + module must be present and autoloaded; `--accept-dns` is an explicit choice because + MagicDNS interacts with `systemd-resolved`. +- Subnet-router and exit-node roles are supported but **off by default**; enabling + them requires `net.ipv4.ip_forward`/IPv6 forwarding and firewall rules, which are a + deliberate operator action. +- Rootful `podman.socket`/Docker API is **off by default**; it is root-equivalent. + Rootless Podman plus Quadlet user units are the normal path. +- Container data lives in `/var/lib/containers` (root) and the user's home (rootless). + It is workload state, not OS payload: updates and rollback must not delete it. +- No automatic `podman system prune`, image GC, or restart of user containers without + explicit configuration. + +## Acceptance criteria (candidate, for D-051/D-052) + +Core checks run first on the full Core + Container Runner image; then: + +1. Boot to a working console/SSH session on real hardware; no desktop session. +2. Rootless `podman run --rm hello-world` as the primary user, with subuid/subgid + allocated; rootful path via sudo/polkit also works. +3. `podman-compose up` on a two-service example; containers appear in + `cockpit-podman` and survive a reboot when configured with a restart policy. +4. `podman-docker` shim answers `docker ps` without a Docker daemon installed. +5. Cockpit loads over HTTPS, authenticates through PAM/polkit, and the available pages + render (containers, storage, logs). The updates page is either functional through + the Archipelago D-Bus plugin or explicitly absent. +6. `tailscale up` completes, `tailscale status` reports the node, and a ping/SSH over + the tailnet succeeds; a reboot keeps the node identity. +7. An OSTree update to a new deployment preserves images, volumes and containers; + a rollback does the same. +8. Optional: a foreign-architecture image runs through binfmt. + +Each of these is a manual or automated check with recorded identities; none of them +is claimed by this proposal. + +## Open questions that need decisions first + +1. **Storage profile.** Server layout is still open (D-065 covers the VM Core + profile). Container storage grows; a separate `/var` or dataset and a size policy + are needed before install media are meaningful. +2. **Cockpit exposure and TLS.** LAN + tailnet, or tailnet only? Self-signed + certificate, Tailscale Serve, or user-provided certificate? Who is allowed to log + in to Cockpit? +3. **Updates surface.** D-095 removed PackageKit. Do we implement a Cockpit plugin + for `archipelagod` or ship the image without an update page? This mirrors the + GNOME/KDE work already planned. +4. **Tailscale onboarding.** Interactive `tailscale up` at first boot, an + operator-supplied ephemeral key, or a documented manual step? Mesh identity is + sensitive and must not live in the image or in a world-readable file. +5. **Firewall defaults.** Which ports are open on which zone by default (9090, SSH), + and is `firewalld` or plain `nftables` the Purpose default? +6. **Network manager conflict.** Core uses `systemd-networkd`; Cockpit's network page + needs NetworkManager. Switching the Purpose to NetworkManager must be explicit and + preserve existing connections on update. +7. **Multi-arch by default.** binfmt/qemu-user-static enlarges the image and widens + the attack surface; ship it by default or as an opt-in Host Extension? +8. **Channel name.** `stable/container` (or another ref) is not yet agreed; it is a + publication contract, not an implementation detail. + +## Suggested implementation order + +1. Accept (or reject) the Purpose and settle questions 1–3; the rest can follow. +2. Add `proposals/container-runner.yaml` to the explicit build inputs, with pinned + snapshot and package closure (D-023, D-042). +3. Purpose adapters: Cockpit units/firewall, tailscale service + onboarding, Podman + storage and subuid/subgid handling, NetworkManager handoff, os-release variant. +4. Build Core + Container Runner, export layers/images, assemble an ISO and verify + install/boot. +5. Run the acceptance list above manually and record evidence; only then consider a + publication channel. +6. Write the reproducibility evidence separately (D-050); tests do not prove it. + +## Non-goals + +- No desktop environment, no Flatpak, no Toolbx requirement (D-076 is scoped to + Desktop Purposes), no PackageKit. +- No second package manager, no mutable `/usr`, no Docker daemon by default. +- No cloud-init or remote provisioning contract in this proposal. diff --git a/proposals/container-runner.yaml b/proposals/container-runner.yaml new file mode 100644 index 0000000..72eab48 --- /dev/null +++ b/proposals/container-runner.yaml @@ -0,0 +1,45 @@ +# Build-disabled candidate (D-099 is Toolbx; this Purpose has no decision yet). +# See proposals/container-runner.md for scope, open questions and acceptance. +apiVersion: archipelago/v1 +kind: Layer +metadata: + name: purpose/server/container-runner + version: 0.1.0 +spec: + type: purpose + architecture: x86_64 + purpose: {role: server, variant: container-runner} + compatibility: + core: [core/arch] + packages: + runtime: + - name: aardvark-dns + - name: buildah + - name: catatonit + - name: chrony + - name: cockpit + - name: cockpit-files + - name: cockpit-machines + - name: cockpit-podman + - name: cockpit-storaged + - name: conmon + - name: containers-common + - name: crun + - name: firewalld + - name: fuse-overlayfs + - name: netavark + - name: networkmanager + - name: nftables + - name: openssh + - name: passt + - name: podman + - name: podman-compose + - name: podman-docker + - name: polkit + - name: qemu-user-static + - name: qemu-user-static-binfmt + - name: shadow + - name: skopeo + - name: slirp4netns + - name: sudo + - name: tailscale