diff --git a/.github/workflows/lab-docs.yml b/.github/workflows/lab-docs.yml new file mode 100644 index 000000000..9382f5038 --- /dev/null +++ b/.github/workflows/lab-docs.yml @@ -0,0 +1,53 @@ +name: lab docs + +# CI tier policy: see .github/ci-policy.md + +# Build the Lab Book (#13905): pkgs/lab/book.toml + pkgs/lab/book, +# rendered by the flake output .#lab-docs (pkgs/lab/docs.nix) — the +# same `nix build` locally and in CI, mirroring the fleet book's +# build job in fleet-docs.yml. +# +# This workflow only builds; it never deploys. A repository has exactly +# one GitHub Pages site and every Pages deployment replaces the whole +# site, so the Lab Book is deployed by the mcpx-docs workflow's +# deploy job, staged under lab/ with siteUrl "/code/lab/" — a +# lab-only deploy from here would wipe the sibling books (and vice +# versa). See the book's "Deploying this book" chapter: +# pkgs/lab/book/operations/deploying-this-book.md. + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + name: "build: nix build .#lab-docs" + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v7 + + - uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23 + + - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 + continue-on-error: true + with: + # Same cache posture as mcpx-docs.yml: no FlakeHub, the + # GitHub Actions cache is the cache. + use-flakehub: false + use-gha-cache: true + + - name: Nix build + run: nix build .#lab-docs --print-build-logs + + # The nix result is a symlink into the store; copy it + # dereferenced so the staged tree is a plain static site. + - name: Stage site + run: | + rm -rf site + cp -rL result site + test -f site/index.html diff --git a/lib/default.nix b/lib/default.nix index 9c7845b8a..ce33d9082 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -818,6 +818,7 @@ let atlasDocs = pkgs.callPackage ../pkgs/atlas-search/docs.nix { }; idDocs = pkgs.callPackage ../pkgs/id/docs.nix { }; codeDocs = pkgs.callPackage ../pkgs/code-book/docs.nix { }; + labDocs = pkgs.callPackage ../pkgs/lab/docs.nix { }; mcpxRealServers = pkgs.callPackage ../pkgs/mcpx/real-servers.nix { }; idMailDeploy = pkgs.callPackage ../nixos/services/id-mail/worker/deploy.nix { }; pkarrDeploy = pkgs.callPackage ../pkgs/pkarr-worker/deploy.nix { @@ -874,6 +875,7 @@ let atlas-docs = atlasDocs; id-docs = idDocs; code-docs = codeDocs; + lab-docs = labDocs; mcpx-real-servers = mcpxRealServers; mcpx-container = mcpxContainer; identity-image = identityImage; diff --git a/pkgs/lab/book.toml b/pkgs/lab/book.toml new file mode 100644 index 000000000..b1f2d1ca9 --- /dev/null +++ b/pkgs/lab/book.toml @@ -0,0 +1,19 @@ +# mdBook configuration for the Lab Book (#13905). +# The book root is pkgs/lab itself so the sources stay next to the +# subject they document: plain markdown under book/, readable on +# GitHub exactly as written, and rendered as a book via the +# .#lab-docs flake output (pkgs/lab/docs.nix). + +[book] +title = "Lab Book" +authors = ["developing-today"] +language = "en" +src = "book" + +[build] +build-dir = "rendered" +# Every chapter in SUMMARY.md must exist on disk; never invent stubs. +create-missing = false + +[output.html] +git-repository-url = "https://github.com/developing-today/code" diff --git a/pkgs/lab/book/SUMMARY.md b/pkgs/lab/book/SUMMARY.md new file mode 100644 index 000000000..cdd65b647 --- /dev/null +++ b/pkgs/lab/book/SUMMARY.md @@ -0,0 +1,24 @@ +# Summary + +- [Lab Book](index.md) + +- [The Osseo site](site/the-osseo-site.md) +- [Hardware register](site/hardware-register.md) + +- [The cluster programme](cluster/the-cluster-programme.md) +- [Talos and Cozystack](cluster/talos-and-cozystack.md) +- [Storage: LINSTOR and DRBD](cluster/storage-linstor-and-drbd.md) +- [Boot and auto-join](cluster/boot-and-auto-join.md) + +- [Switches](network/switches.md) + +- [ESP32](microcontrollers/esp32.md) + +- [High-level roadmap](roadmap/high-level-roadmap.md) +- [Gaps and open questions](plans/gaps-and-open-questions.md) + +- [Keeping this book current](development/keeping-this-book-current.md) + +- [Deploying this book](operations/deploying-this-book.md) +- [FAQ](operations/faq.md) +- [Glossary](operations/glossary.md) diff --git a/pkgs/lab/book/cluster/boot-and-auto-join.md b/pkgs/lab/book/cluster/boot-and-auto-join.md new file mode 100644 index 000000000..98cd08ebf --- /dev/null +++ b/pkgs/lab/book/cluster/boot-and-auto-join.md @@ -0,0 +1,79 @@ +# Boot and auto-join + +Merged priority list item 5: **all servers online, +auto-connecting and presenting to the cluster on boot.** Every +server powers on, joins the network and presents itself to the +cluster declaratively — no hand-built machine that "just exists +forever". This chapter records the ambition, the mechanism that +would deliver it, and the current state, which is the deliberate +opposite of a running system. + +## The ambition + +Drew's seed, as filed on +[#13905](https://github.com/developing-today/code/issues/13905): +"servers auto-connecting and presenting to the cluster on boot". +In the merged priority list it sits directly after "switches +integrated and racked" (item 4) and before "Talos cluster live … +on Cozystack" (item 6) — the cluster is defined over machines +that present themselves, and hand-installing the first nodes +would create exactly the snowflake state the programme forbids. + +- **Type:** capability-set. +- **Area:** lab (primary). Cross-links: fleet (enrolment is the + same shape as fleet agent enrolment); ID (the hosted-worlds + deployment pack targets these machines — see the + [High-level roadmap](../roadmap/high-level-roadmap.md)). +- **Most related:** the TALM + Talos bootstrap epic + [#1086](https://github.com/developing-today/code/issues/1086), + named as parent of the cluster config in `infra/cluster/README.md`. + +## Current state: no OS, by design + +**Not started.** The record, stated without softening: + +- No OS is installed on any basement machine — deliberately, per + the 2026-10-27 status record. The absence is the design: "no + hand-built state that just existed forever". +- Every CPU boots and all RAM works; nothing is load-tested. +- Basement power capacity is a named blocker (see + [The Osseo site](../site/the-osseo-site.md)); the build target + is the 3–5 best, most identical machines first. +- Timing: no timing in the record. The hardware state (no OS, + power blocker, 3–5 first) is as recorded 2026-10-20/21 in the + hardware register; no reprioritisation is recorded since. + +## The mechanism that would deliver it + +The mechanism of record is the TALM flow proven in +[Talos and Cozystack](talos-and-cozystack.md): + +1. A node boots from the Talos image into maintenance mode. +2. `talm template -i` harvests its real hardware into its per-node + file in git. +3. `talm apply` lays the node's strategic merge patch — disks + matched by identity, never by description — over the shared + cluster template. +4. The node joins, or rejoins, the cluster from config alone. The + #1812 runbook's wipe-and-rebuild path is exactly this: "the + node rejoins the cluster from git alone". + +The historical test cluster additionally used PXE (an iPXE script +from factory.talos.dev) as a boot path — proven then, retired +now, recorded in `infra/talos/01b.us/README.md`. + +Power-return behaviour is separately ticketed as part of epic +[#1090](https://github.com/developing-today/code/issues/1090): a +dependency-sequenced power-return boot order, documented and +exercised once. Planned. + +## The gap this chapter states plainly + +**There is no dedicated implementation issue for auto-join.** +The census searched for one and found none: the ambition lives in +the #13905 seed, in merged-list item 5, and in the TALM mechanism +that would deliver it — not in a ticket of its own. This book +does not invent one, does not borrow #1086's number as if it were +the auto-join issue, and records the absence here so the +programme can file the issue deliberately. Until then, #1086 is +the closest parent and the TALM flow is the mechanism of record. diff --git a/pkgs/lab/book/cluster/storage-linstor-and-drbd.md b/pkgs/lab/book/cluster/storage-linstor-and-drbd.md new file mode 100644 index 000000000..18efc7a34 --- /dev/null +++ b/pkgs/lab/book/cluster/storage-linstor-and-drbd.md @@ -0,0 +1,107 @@ +# Storage: LINSTOR and DRBD + +Cluster storage is designed, not built. This chapter records the +design exactly as the record carries it — Drew's sketch, to be +validated — and then states plainly what exists today: no cluster +storage pools, and a local↔cloud sync story that today runs +entirely outside the cluster. + +## The replication design (planned) + +Cozystack's storage layer is LINSTOR on ZFS/DRBD, per the research +brief. Drew's sketch adds the shape: three machines replicating +via DRBD/LINSTOR, so data loss needs the same failure on two +machines at once. The storage work sits in +[#1813](https://github.com/developing-today/code/issues/1813) +(open) under epic +[#1085](https://github.com/developing-today/code/issues/1085). + +Status: **planned — design only.** The only DRBD artefact that +ever ran is the torn-down v1.9 test cluster's `siderolabs/drbd` +Talos extension — historical, see +[Talos and Cozystack](talos-and-cozystack.md). The NIC and +switch-gear sanity check that LINSTOR/DRBD replication traffic +depends on is still open +([#1097](https://github.com/developing-today/code/issues/1097)); +with the dictated "at least 200 Gb ports" figure unverified +against a 100GbE-max fabric of record, the design cannot be +sanity-checked until that lands (gap 2). + +## Storage tiers (planned) + +From the idea register (2026-10-20), carried into epic #1085 / +#1813. Drew's sketch, to be validated: + +- **HDD tier:** 3 hosts × 4 × 16 TB in RAID 10, feeding RustFS + cold-ish buckets. The drives are the 15–16 × 16 TB helium + Western Digital server pulls of the + [Hardware register](../site/hardware-register.md) — eight of + them still boxed. +- **Fast NVMe tier:** all Samsung 990 Pros. +- **Mid NVMe tier:** 980s, smaller 990s and good consumer SSDs — + stripe 3 (about 990-class performance) × mirror 2, "RAID 100" + (3 stripes, 2 mirrors, 6 drives), so two drives must die to + down a machine. +- Two named pools from earlier work: (1) 4 drives RAID 10; + (2) 6 drives RAID 100. +- Goal: 3–5 devices with near parity in disk size and capability. +- Still open: install the 8 still-boxed HDDs and capture their + baseline SMART/firmware data; per-drive records/passports so + TALM and LINSTOR decisions have real data + ([#1096](https://github.com/developing-today/code/issues/1096), + open). The NVMe baseline already exists on a backup drive — see + the [Hardware register](../site/hardware-register.md). + +## Local↔cloud sync: what exists today (proven, outside the cluster) + +- The general backup topology of record (2026-10-27): sandbox → + laptop + R2 + Drive; laptop → Drive + R2. "Sandbox is not + storage" is a standing rule. +- Five R2 buckets are named in the cold-store design's source + inventory: `agent-inbox-mail`, `labops-files`, + `nix-cache-nars`, `supabase-backups`, + `webhook-gateway-payloads`. No source read by the census + established byte totals for them, and this book invents none. +- The lab's first Cloudflare Tunnel is live from the laptop — the + first working local→cloud path carrying the lab name. See + [The Osseo site](../site/the-osseo-site.md). + +## Local↔cloud sync: what is designed (planned) + +- **Cold-store layout design (2026-10-25)** — explicitly + "design only; this pass moved nothing, created no bucket or + folder, changed no lifecycle rule". Google Drive is the cold, + immutable archive vault: data packed into sealed 4–16 GB + bundles with the searchable index/manifest held outside Drive. + Cloudflare R2 is the hot/operational tier: current backups, + served media, build/cache objects, with free egress. Existing + tenant/bucket boundaries are kept; nothing is consolidated for + neatness. +- **Cluster tiering direction:** RustFS cold tiering to R2 (epic + [#1091](https://github.com/developing-today/code/issues/1091)); + cluster backups into the cold store like every other store, + proven by a recorded restore (P9 draft phase 3 — draft, + unratified); an etcd + TALM config recovery vault as encrypted + snapshots offsite, for example R2 (epic + [#1090](https://github.com/developing-today/code/issues/1090)); + CNPG Postgres backups to an S3 endpoint — in-cluster RustFS, + Cozystack's bundled `cozy-backups` SeaweedFS bucket, or external + (decision open, see [Talos and Cozystack](talos-and-cozystack.md)). +- **Atlas sync shape (cross-link):** the Framework laptop stays + the canonical Atlas home and ingest factory; a cluster Atlas + serve mode would read the Turso hot copy (P9 draft phase 2 — + draft, unratified). +- **DNS/domain side:** a standing domain register with a regular + full DNS-config backup exists as a completed first pass + (2026-10-25, 40 domains), with recurring machinery on + [#902](https://github.com/developing-today/code/issues/902) — + in progress, recorded here because the register's own text ties + it to the cluster programme's files; it is not lab-cluster + storage proper. + +## The honest summary + +There is **no cluster sync running** — there is no cluster. +Local↔cloud sync today is the laptop/sandbox backup topology plus +one tunnel. Everything cluster-shaped in this chapter is design, +and the chapter's status words keep it that way. diff --git a/pkgs/lab/book/cluster/talos-and-cozystack.md b/pkgs/lab/book/cluster/talos-and-cozystack.md new file mode 100644 index 000000000..c237e22ab --- /dev/null +++ b/pkgs/lab/book/cluster/talos-and-cozystack.md @@ -0,0 +1,119 @@ +# Talos and Cozystack + +The cluster's operating system is Talos Linux, configured +declaratively with TALM; the platform on top is Cozystack. This +chapter states what is planned, what is history, and the one piece +that is proven. + +## The planned state + +- **Talos Linux** on the first 3–5 of the core machines, installed + only through the TALM bootstrap flow: "no node is installed + until the TALM bootstrap flow is proven" (status record + 2026-10-27). Bootstrap epic: + [#1086](https://github.com/developing-today/code/issues/1086). +- **Cozystack** on top of Talos: researched in depth (CNCF + Sandbox; LINSTOR on ZFS/DRBD for storage; Kube-OVN, Cilium and + MetalLB for networking; SeaweedFS buckets; KubeVirt; CNPG + Postgres). Install epic: + [#1087](https://github.com/developing-today/code/issues/1087), + "proposed/Later" in the roadmap. The CNCF census adds the caveat + that Cozystack "decides storage/tenancy/GitOps for you" + (`doc/2026-11-23T22-33-41Z_research_cncf-landscape/`). +- **Data services** as decided in the research brief: + CloudNativePG managed Postgres (do not deploy a second + operator), and RustFS as the designated S3 target — with the + RustFS-versus-SeaweedFS decision still open under epic + [#1088](https://github.com/developing-today/code/issues/1088). +- **Platform services** from the register's day-one list: NATS, + FluxCD, a Cloudflare tunnel, Tailscale on-cluster (epic #1088). +- **First workload:** the ID app on FluxCD, epic + [#1092](https://github.com/developing-today/code/issues/1092) — + with the register's open question #1 still open: which app + exactly is "the ID app" that FluxCD runs first (gap 12 in + [Gaps and open questions](../plans/gaps-and-open-questions.md)). + +Status of everything in this section: **planned**. No node is +installed, no Cozystack deployment exists. + +## History: the v1.9 test cluster, torn down + +A real Talos cluster ran once. The v1.9-era test cluster — VIP +10.10.0.42, controllers a1/a2/b1, workers a3/a4/b2–b6, recorded in +`infra/talos/01b.us/` and `doc/talos-addresses.md` — ran Talos +v1.9.0 from an image factory schematic with the `siderolabs/drbd`, +`siderolabs/tailscale` and `siderolabs/xen-guest-agent` +extensions, with PXE, ISO and raw assets recorded. It was a test, +and it was **torn down** — confirmed by Drew on 2026-10-26. + +Status: **proven, then retired**. Everything about it in this book +is past tense. Nothing from it is running, and the current +programme starts from bare machines. The only DRBD artefact that +ever ran is that cluster's `siderolabs/drbd` Talos extension — +historical; see +[Storage: LINSTOR and DRBD](storage-linstor-and-drbd.md). + +## The proven piece: the TALM per-node disk flow (#1812) + +Drew's open design question — how do you declaratively configure, +in Talos/TALM, a bunch of hard drives that are all different per +machine? — is **answered and closed**: +[#1812](https://github.com/developing-today/code/issues/1812), +landed as `infra/cluster/README.md` (with worked examples +`infra/cluster/examples/node-file.yaml` and +`infra/cluster/examples/user-volume.yaml`) via PR #5052. It is the +one proven cluster piece in this book, proven as design plus a +local container flow. + +The answer, in brief: + +- One TALM node file per node in git + (`infra/cluster//nodes/.yaml`). + Running `talm template -i` against a node booted in Talos + maintenance mode harvests its real hardware into that file as + comments; anything below the file's modeline is a strategic + merge patch over the shared cluster template at `talm apply` + time. A non-empty body pins the file to exactly one node — a + disk patch can never leak onto the wrong machine. +- Match disks by **identity, not description**: the boot disk via + `machine.install.diskSelector` on serial/wwid (never size or + model alone — a replacement drive must fail loudly, not + silently match a sibling); data volumes via Talos v1.10+ + `UserVolumeConfig` CEL selectors with the load-bearing + `!system_disk` guard. `machine.disks[]` is deprecated in v1.10 — + do not build on it. +- The runbook covers adding a node, replacing a disk (a boot-disk + swap is a rebuild of that node from config, by design), and + wiping and rebuilding a node from config only — "the node + rejoins the cluster from git alone". That runbook is the + mechanism behind [Boot and auto-join](boot-and-auto-join.md). + +The local container-flow proof recorded on #1812: `talm template +-i` harvest, hand-edit of disk fields only, `talm apply --dry-run` +showing the resolved install disk, then `talm apply` — observed in +Drew's local container runs and verified in triage on 2026-11-03. +What it does **not** prove: real drive-swap behaviour, or the +rebuild drill on physical nodes. Both are gated on the hardware +inventory, +[#1810](https://github.com/developing-today/code/issues/1810). + +## The P9 draft — unratified + +A fleet-drafted integration design, `doc/living/lab-integration.md` +(P9), lays out a phased landing plan for the lab: Atlas serve mode, +queue workers, PM surfaces and build overflow on the cluster, +backups proven by a recorded restore, and more. Its status is +exact: **a draft awaiting Drew's ratification** +([#8873](https://github.com/developing-today/code/issues/8873), +open). This book cites its contents only as draft contents. Where +a later chapter mentions a P9 phase, "planned (draft)" is the +whole claim. + +## Version pins of record + +From the research brief (2026-10-03): TALM is `cozystack/talm` +v0.35.0 — the canonical repository is cozystack/talm; Talos +v1.14.1; Cozystack v1.6.4; RustFS 1.0 GA 2026-09-16; managed +Postgres is CloudNativePG. These are the pins the programme was +researched against; they are research-baseline facts, not a claim +that anything runs them. diff --git a/pkgs/lab/book/cluster/the-cluster-programme.md b/pkgs/lab/book/cluster/the-cluster-programme.md new file mode 100644 index 000000000..aa83b312d --- /dev/null +++ b/pkgs/lab/book/cluster/the-cluster-programme.md @@ -0,0 +1,176 @@ +# The cluster programme + +The cluster programme is the plan to turn the basement fleet of +[The Osseo site](../site/the-osseo-site.md) into a Kubernetes +cluster: Talos Linux installed declaratively with TALM, running +Cozystack, with replicated storage and the project's own workloads. +This chapter gives the programme's structure and its current +state. The design areas have their own chapters: +[Talos and Cozystack](talos-and-cozystack.md), +[Storage: LINSTOR and DRBD](storage-linstor-and-drbd.md), and +[Boot and auto-join](boot-and-auto-join.md). + +## Structure of record + +- Parent epic: + [#1817 — Basement Talos/Cozystack cluster program](https://github.com/developing-today/code/issues/1817). +- Project home: `planning/roadmaps/basement-cluster.md` in the + code repository (PR #1082, merged). +- First status record: `doc/2026-10-27T03-14-08Z_status_basement-cluster/`. +- Twelve epics, + [#1080](https://github.com/developing-today/code/issues/1080) + through + [#1093](https://github.com/developing-today/code/issues/1093), + in org Project #4, with the Area option literally `lab-cluster` + and execution-mode labels for online, hybrid and physical work. +- Thirteen detailed tasks, + [#1094](https://github.com/developing-today/code/issues/1094) + through + [#1106](https://github.com/developing-today/code/issues/1106), + under epics 1–3. +- A dashboard visualisation + ([#1108](https://github.com/developing-today/code/issues/1108)) + is closed. +- Predecessors dezren39/nix#501–#508 (filed 2026-10-20) are all + closed with superseded-pointer comments; their content lives on + as code issues in the #1810–#1815 range and elsewhere. +- Physical bring-up parent: + [#6066](https://github.com/developing-today/code/issues/6066) — + racking, Dell switches ×3, edge routing and mesh Wi-Fi, + interconnect, cluster bring-up. +- A fleet-drafted integration design, `doc/living/lab-integration.md` + (P9), is a **draft awaiting Drew's ratification** + ([#8873](https://github.com/developing-today/code/issues/8873), + open). Nothing in it is decided until he ratifies it, and this + book cites it only as a draft. + +The twelve epics, by subject: #1080 hardware inventory and +first-node selection · #1081 firmware/BIOS/BMC audit · #1083 +basement power and space · #1084 network fabric · #1085 storage +assembly · #1086 TALM and Talos bootstrap · #1087 Cozystack +platform · #1088 platform services · #1090 observability, backup +and recovery · #1091 cloud extension · #1092 first workload · +#1093 the ESP32 wing (see [ESP32](../microcontrollers/esp32.md)). + +## Hard rules + +Two rules govern the whole programme, from the idea register, +stated explicitly there: + +- **No HashiCorp anything.** Nomad was abandoned; the programme is + all-in on Kubernetes. +- **Everything bootstrappable from config.** No hand-built state — + the same rule that leaves the basement machines with no OS today + (see [Boot and auto-join](boot-and-auto-join.md)). + +## Current state + +As of the latest status record (2026-10-27): **nothing in the +current cluster programme has been built yet.** What exists is +thorough research and planning, one proven local TALM container +flow, one live Cloudflare Tunnel on the laptop, and a large +ticketed programme. Component by component: + +| Component | State | +|---|---| +| Talos Linux (current programme) | Planned — no node installed; "no node is installed until the TALM bootstrap flow is proven" (status record 2026-10-27). Epic [#1086](https://github.com/developing-today/code/issues/1086) open. | +| Talos (historical v1.9 test cluster) | Proven, then retired — torn down 2026-10-26. History only. | +| TALM bootstrap flow | Proven locally (containers); planned on bare metal. See [Talos and Cozystack](talos-and-cozystack.md). | +| Cozystack | Planned / researched-only. Install epic [#1087](https://github.com/developing-today/code/issues/1087) is "proposed/Later" in the roadmap. | +| LINSTOR + DRBD | Planned — design only. See [Storage: LINSTOR and DRBD](storage-linstor-and-drbd.md). | +| Postgres (CloudNativePG via Cozystack) | Planned — decision recorded in the research brief: use Cozystack's CNPG-based managed Postgres; do not deploy a second operator. | +| RustFS (S3) | Planned, one decision open (RustFS versus Cozystack's bundled SeaweedFS); epic [#1088](https://github.com/developing-today/code/issues/1088) owns the decision. | +| Platform services (NATS, FluxCD, Cloudflare tunnel, Tailscale on-cluster) | Planned — the day-one list from the register; epic #1088. | +| First workload: the ID app on FluxCD | Planned — epic [#1092](https://github.com/developing-today/code/issues/1092). Which app exactly is "the ID app" is still an open question (gap 12). | +| Observability, backup and recovery | Planned — epic [#1090](https://github.com/developing-today/code/issues/1090), including the power-return boot order. | +| save-secrets tooling for Talos | Proven fix — [#6554](https://github.com/developing-today/code/issues/6554) closed via PR #8000 (atomic encrypt, fail loudly). | + +### The one live artefact + +The programme's first lab tunnel is its one live artefact: the +Cloudflare Tunnel of +[#6455](https://github.com/developing-today/code/issues/6455) +(closed), live since 2026-11-06, connector on the laptop (`amd`), +seed ingress `lab.security.cab`, NixOS service +`services.lab-tunnel`. It is proven — and it runs on the laptop, +not on any cluster machine. It is mentioned here, in the programme +chapter, because there is nowhere more built to mention it. + +## Research baseline + +The programme's research brief (2026-10-03, in the lab-cluster +goal workspace) pins the stack: TALM is `cozystack/talm` v0.35.0 +(the goal's original `talos-systems/talm` name is wrong — canonical +is cozystack/talm), Talos v1.14.1, Cozystack v1.6.4, RustFS 1.0 GA +2026-09-16, managed Postgres = CloudNativePG. Stack fit as +recorded: TALM produces Talos configs, Cozystack runs on top, and +CNPG Postgres plus RustFS provide data services. + +## Adjacent programme pieces + +- **Containerised builds.** Generic containers for ID and fleet + purposes are closed on the record + ([#6076](https://github.com/developing-today/code/issues/6076), + closed with label `status:done`): Nix-built generic containers, + no hand-maintained Dockerfiles. The census read the issue body + and its closed/done state but did not independently re-verify + the proof artefacts, and this book cites it as closed-per-record. + Containerised build/compile *in the cluster* is planned and + waits on the cluster — see the + [High-level roadmap](../roadmap/high-level-roadmap.md). +- **VMs near the lab.** + [#5772](https://github.com/developing-today/code/issues/5772) + (open) covers declarative guests (nixvirt / microvm.nix). Its + recorded current state (2026-11-04 inventory): libvirtd enabled + in the laptop profile and zero guest definitions anywhere; one + seed microVM (`prometheus`, 2 vCPU / 1 GB) exists as a flake + input with its profile commented out on `amd`. Planned. +- **Spare-PC roles and the quorum question.** The register + addendum (2026-10-21, marked unverified dictation) names + candidate roles for the spare PCs: basic compile/test runners; + headless graphics via the integrated GPU serving remote + sessions; Talos nodes in the 3–5-node cluster (open question + whether they are strong enough — verify against actual specs); + and quorum / tie-breaker witness nodes for LINSTOR/DRBD + split-brain decisions in layouts with only two (or four) + storage nodes — a Raspberry Pi is the named alternative for the + witness role. The SBC question was taken up as + [#6078](https://github.com/developing-today/code/issues/6078), + which is closed; its body acceptance checkboxes stand unchecked + and the census did not extract a verdict from its comments, so + the per-role verdict is a gap (gap 8), not a claim in this book. +- **Cloud extension.** Alongside the cluster, an OCI always-free + maximisation was planned in detail (epic + [#1091](https://github.com/developing-today/code/issues/1091); + child [#4904](https://github.com/developing-today/code/issues/4904) + still open). But the memory of record states plainly that + Oracle/OCI is not a backend — stood down 2026-10-31. The + epic and child issues remain open on GitHub. This book records + both facts and flags the pair as **unreconciled**, in + [Gaps and open questions](../plans/gaps-and-open-questions.md) — + it does not resolve the contradiction by picking a side. +- **Egress.** The egress strategy for the 2 Gbps home fiber is + [#5030](https://github.com/developing-today/code/issues/5030) + (open, design), with enforcement implementation + [#8408](https://github.com/developing-today/code/issues/8408) + (open). Direction of record: tunnel or shunt bulk traffic to + cheap-or-free-egress services, compress aggressively, and only + cross the home link with what must. (Budget figures from the + record are cost material and are not reproduced in this book.) +- **boats.dev**, a container-hosting service with a free tier — + not one of the project's domains, corrected 2026-10-25 — is a + research item + ([#1815](https://github.com/developing-today/code/issues/1815), + open). Researched-only. + +## What `pkgs/lab-ops-hub` is not + +A footnote, because the name invites the mistake: +`pkgs/lab-ops-hub` is **not** the physical lab. Its own README +describes it as a Cloudflare full-stack demo — one Worker +exercising the Workers platform surface at personal scale — built +and deployed 2026-10-20. Its database was seeded with three +fictional machines named `talos-1/2/3` "matching the +basement-cluster sketch", which is a demo dataset, not the lab's +inventory. The lab connection is nominal and thematic only, and +this book gives it no chapter. diff --git a/pkgs/lab/book/development/keeping-this-book-current.md b/pkgs/lab/book/development/keeping-this-book-current.md new file mode 100644 index 000000000..fa631a5c9 --- /dev/null +++ b/pkgs/lab/book/development/keeping-this-book-current.md @@ -0,0 +1,74 @@ +# Keeping this book current + +The Lab Book describes physical things and a programme that will +change state in jumps: a circuit gets installed, a switch gets +racked, a node gets its first OS. A book like this goes stale +silently unless the sync rule is explicit. This chapter is that +rule. + +## The rule + +**Every hardware or cluster claim in this book is dated, and the +book is updated when the underlying record changes.** Concretely, +a change to any of the following is not done until this book +matches it: + +- **A physical change at the site** — a machine inventoried, + racked, moved or retired; a circuit installed; a switch racked, + configured or removed; a drive installed or replaced; a board + bought, flashed or run. The change's own ticket (for example + #6073–#6075 for the Dell switches, #1095/#1096 for the + inventory) records the fact; the book chapter that carries the + claim is updated in the same pass. +- **A cluster state change** — a node installed, the TALM flow + proven on bare metal, Cozystack deployed, a storage pool + created, a workload landed. Status words move only when a + record shows the new state: planned becomes in progress becomes + proven on evidence, never on intention. +- **A census refresh** — when a new lab census supersedes the + 2026-11-23/24 census this book was built from, the chapters are + re-derived from the new census: figures, statuses, the gap + list and the roadmap timings are replaced, not patched over. +- **A programme change** — an epic opened or closed, the P9 draft + ratified or withdrawn, a contradiction reconciled (gap 9's OCI + pair is the standing example), a new owning issue filed (the + auto-join gap in + [Boot and auto-join](../cluster/boot-and-auto-join.md) is the + standing example). + +## How the update is made + +1. Edit the chapter whose claim changed. Keep the status + vocabulary of the [Lab Book](../index.md) introduction — + proven, in progress, planned, researched-only — and keep the + date of the record the new claim rests on in the text. +2. If a chapter is added, renamed or retitled, add it to + `book/SUMMARY.md` in the same change, keep its sole H1 equal + to its SUMMARY entry text, and update the link text in every + chapter that links to it. +3. Stage the new files in git before building — Nix flakes only + see tracked files, and an unstaged chapter fails the build as + an invisible path. +4. Build and require zero warnings: + + ```sh + nix build .#lab-docs + ``` + + A warning is a defect: an unclosed tag warning in particular + means a bare angle-bracket placeholder is being read as HTML + and text is silently vanishing from the rendered page. Escape + placeholders in prose (`<name>`) rather than accepting + the warning. + +## What this book never does + +- It never promotes a claim past its evidence. Research in + hardware-doc is not ownership; a closed research issue's + unextracted verdict is not a verdict (gap 8); a draft is not a + decision (gap 13). +- It never carries cost material. Costs belong to the Project + Management book. +- It never resolves a recorded contradiction by editorial + choice. Contradictions are flagged as unreconciled until the + programme reconciles them on their issues. diff --git a/pkgs/lab/book/index.md b/pkgs/lab/book/index.md new file mode 100644 index 000000000..1de279260 --- /dev/null +++ b/pkgs/lab/book/index.md @@ -0,0 +1,91 @@ +# Lab Book + +The lab is the physical side of the project: the machines in the +basement of a house in Osseo, Wisconsin, the switches that will join +them, the Kubernetes cluster they are meant to become, and the +ESP32-class microcontrollers at the small end of the same programme. +This book is the record of that lab — what is physically there, what +is planned for it, what has actually been proven, and what is still +only research. + +The book's primary source is the lab census gathered on +2026-11-23/24 under the programme tracker +[#13905](https://github.com/developing-today/code/issues/13905) and +landed as a dated research record in the code repository +(`doc/2026-11-24T00-58-48Z_research_code-book-census-lab/`, PR +[#13937](https://github.com/developing-today/code/pull/13937)). + +## The honesty note — read this first + +This book marks every claim with the status the record supports: + +- **Proven** — a record shows it working or verified. +- **In progress** — work or a live partial state exists. +- **Planned** — ticketed or designed, not built. +- **Researched-only** — documents or research exist; there has been + no build and no physical verification. + +Those markings are load-bearing, and this book keeps them exactly as +honest as the census kept them. The headline, stated plainly: as of +the latest status record (2026-10-27), nothing in the current +cluster programme has been built yet. The basement machines have no +operating system installed, by design — no hand-built state that +just exists forever. An earlier Talos test cluster from the v1.9 era +was torn down, confirmed by Drew on 2026-10-26, and is history in +this book, never present tense. The one proven cluster piece is the +TALM per-node disk flow +([#1812](https://github.com/developing-today/code/issues/1812)). The +one live network artefact of the lab programme is a Cloudflare +Tunnel running on the laptop, not on any cluster machine. A book +that is mostly to-do is the correct book for this lab today; the +gap list in [Gaps and open questions](plans/gaps-and-open-questions.md) +is a deliverable, not an embarrassment. + +## How to read this book + +- **The site** — [The Osseo site](site/the-osseo-site.md) describes + the physical location, power, racking state and home network as + recorded; [Hardware register](site/hardware-register.md) records + the hardware itself and the per-machine inventory that does not + exist yet. +- **The cluster** — [The cluster programme](cluster/the-cluster-programme.md) + gives the programme structure and current state; + [Talos and Cozystack](cluster/talos-and-cozystack.md), + [Storage: LINSTOR and DRBD](cluster/storage-linstor-and-drbd.md) + and [Boot and auto-join](cluster/boot-and-auto-join.md) cover the + three design areas in turn. +- **The network** — [Switches](network/switches.md) folds in the + dedicated switching research: 21 devices, enriched in April 2026. +- **Microcontrollers** — [ESP32](microcontrollers/esp32.md) covers + the ESP32-S3 reference part, the ESP32-P4 tier, and the Tanmatsu. +- **Roadmap and plans** — the + [High-level roadmap](roadmap/high-level-roadmap.md) carries this + book's share of the project's merged priority list, and + [Gaps and open questions](plans/gaps-and-open-questions.md) is the + census's honest to-do record. +- **Keeping the book honest** — + [Keeping this book current](development/keeping-this-book-current.md) + states the sync rule, and + [Deploying this book](operations/deploying-this-book.md) describes + how the book is built and published. + +A second part of this book — the platform and toolchain running on +the lab — is in preparation under +[#13905](https://github.com/developing-today/code/issues/13905). Its +census is still being gathered, so no platform chapters exist yet; +the structure above is complete without them and they will slot in +as their own part when the census lands. + +## Sibling books and records + +- The Code Book — the whole-project book: + [https://developing-today.github.io/code/code/](https://developing-today.github.io/code/code/) +- The fleet book: + [https://developing-today.github.io/code/fleet/](https://developing-today.github.io/code/fleet/) +- Programme tracker: + [#13905 — Code Book + Lab Book programme](https://github.com/developing-today/code/issues/13905) +- The priced hardware inventory this book lacks is the job of + [#13910 — aggregate AliExpress purchase history into a hardware inventory](https://github.com/developing-today/code/issues/13910). + +One boundary, stated once: this book contains no cost material. +Costs belong to the Project Management book. diff --git a/pkgs/lab/book/microcontrollers/esp32.md b/pkgs/lab/book/microcontrollers/esp32.md new file mode 100644 index 000000000..eb8bf5a8e --- /dev/null +++ b/pkgs/lab/book/microcontrollers/esp32.md @@ -0,0 +1,229 @@ +# ESP32 + +The microcontroller end of the lab: ESP32-family boards as an ID +hardware shell — sensors and LoRa connected to the ID project — +under epic +[#1093](https://github.com/developing-today/code/issues/1093) +("ESP32 wing", open, horizon: Ideas). Drew's own framing, repeated +in every source: **"a side project of a side project"** — noted +and lightly planned, not resourced ahead of the core build. The +first genuinely useful slice on record is basement sensor +coverage (power, temperature) feeding the cluster's observability +epic [#1090](https://github.com/developing-today/code/issues/1090). + +This chapter's status, stated at the top because everything else +hangs on it: **researched-only and designed, with two software +proofs, and zero physical-hardware verification anywhere in the +record. No board is yet recorded as bought, flashed, or run.** +No record states that any specific ESP32 board has been flashed, +run, or even confirmed owned. See gap 11 in +[Gaps and open questions](../plans/gaps-and-open-questions.md). + +## The verified part names + +Drew dictated "ESBs 3 and ESBP 4" for this chapter. Both readings +are **verified from the record, not guessed**: + +### ESP32-S3 — the reference part + +- Named as the reference chip/board class in a landed design, + `doc/2026-11-09_design_id5783.md`: "a single reference board — + ESP32-S3 devkit-class (16 MB flash / octal-PSRAM class, native + USB)". The decision record landed via PR #8001 for + [#5783](https://github.com/developing-today/code/issues/5783). +- Named as the tier's reference chip in landed research, + `doc/2026-11-23T18-55-21Z_research_id13630_embedded_display_tier/`: + "The tier's reference chip — every first-wave target below is + S3". First hardware target: the **Waveshare + ESP32-S3-Touch-LCD-1.28** (ESP32-S3R2). Research issue + [#13630](https://github.com/developing-today/code/issues/13630) + closed via PR #13635. +- Chip facts of record: Xtensa LX7 dual-core at 240 MHz, 512 KB + SRAM, WiFi 4 + BLE 5.0, native USB. +- Silicon records exist in hardware-doc: `esp32-s3r8`, + `esp32-s3fn8`, `esp32-s3-wroom-1`, `esp32-s3-wroom-1u` — research + records about parts, not ownership records (see the hardware-doc + caveat in the [Hardware register](../site/hardware-register.md)). + +### ESP32-P4 — the named future tier + +- Named in the display-tier research as the future larger-panel + tier: MIPI-DSI and a hardware JPEG codec suit panels above + 320×240 and RGB panels, at the price of a two-chip design — the + P4 has no on-chip radio; Wi-Fi comes via an ESP32-C6 companion + over ESP-Hosted. +- Chip facts of record: RISC-V dual-core at 400 MHz, 768 KB SRAM, + no on-chip radio. +- Five official Espressif P4 board records exist in hardware-doc + (`esp32-p4-eye`, `esp32-p4-function-ev-board`, + `esp32-p4x-c5-function-ev-board`, `esp32-p4x-eye`, + `esp32-p4x-function-ev-board`), and the research pass of record + established the real P4 board lineup — no Korvo board exists on + P4. +- The P4 is also targeted in one slice today: as the application + processor of the Tanmatsu, below. + +## The Tanmatsu — "Tenmazu", resolved + +The dictated "tenmazu" is the **Tanmatsu**, resolved from the +record: a whole-repository search for "tenmazu" returns nothing; +the device is spelled Tanmatsu. It is a physical device: a +handheld terminal from the Nicolai Electronics / badge.team +lineage (it began as the WHY2025 badge design and is sold +commercially), which Drew named as **the reference design for +making worlds work "as an app" on this tier**. Its review is §9 +of the #13630 research record. + +| Part | What it is | +|---|---| +| Application processor | ESP32-P4 (dual RISC-V at 400 MHz, 768 KB SRAM, 32 MB PSRAM, 16 MB flash) — runs the launcher and apps | +| Radio coprocessor | ESP32-C6 module (WiFi 6, BLE 5.3, IEEE 802.15.4) over ESP-Hosted (SDIO) | +| Management coprocessor | WCH CH32V203 (keyboard matrix and power management, I2C peripheral to the P4) | +| Display | 3.97-inch 800×480 MIPI-DSI (ST7701S) | +| Input | 69-key QWERTY keyboard (no touchscreen) | +| Extras | LoRa module (Ai-Thinker Ra-01S/SH, 433 or 868/915 MHz) on the C6 side; microSD slot | +| Licensing | Software MIT; hardware CERN-OHL-P-2.0 | + +The app system the tier adopts from it: the tanmatsu-launcher +plus **AppFS** (badge.team) — an app is a standard, unmodified +ESP-IDF binary with slug/title/version metadata in an 8 MB AppFS +partition; apps arrive via the on-device Hatchery store, BadgeLink +over USB (also the provisioning route), host-side image tools +(apps embedded in the firmware image at build time), or as the +main firmware itself (kiosk boot). Adopted shapes: +presenter-as-an-app, slug-keyed data, BSP-shaped hardware access, +a host management protocol. + +One honest gap recorded in the research: stock AppFS bootloader +support covers ESP32, ESP32-C6 and ESP32-P4 — **not yet the +ESP32-S3**, this tier's first target. Adopting AppFS literally on +the S3 presenter waits on an upstream bootloader port; on +P4-class hardware it works today. A hardware-doc device family +for Nicolai Electronics exists +(`doc/hardware/devices/nicolai-electronics/`). + +## The ESP32 platform design (#5783) — designed, decision-ready + +`doc/2026-11-09_design_id5783.md` — "Design: ESP32 hardware +platform line — boards, provisioning, firmware lifecycle, OTA, +power". Status in the record: **decision-ready proposal — design +only; no firmware is implemented here.** Issue #5783 is open, +under ID epic +[#2056](https://github.com/developing-today/code/issues/2056). +Its decisions: + +- **Board:** one reference board (ESP32-S3 devkit-class) plus a + written compatibility envelope (Wi-Fi, at least 16 MB flash, + PSRAM, hardware RNG, USB flashing without an external UART + bridge) — no supported family in v1. Rejected as reference: + ESP32 classic (no native USB, thinnest RAM margin; eligible + later in a WROVER/PSRAM variant), ESP32-C3/C6 (RAM too tight + for the TLS plus frame budget; named revisit), ESP32-S2 + (single core, no BLE). +- **Identity (the ID tie-in):** a device-owned keypair generated + on-device at first boot; enrolment binds it through the + [#5884](https://github.com/developing-today/code/issues/5884) + setup ceremony; factory reset **destroys** the key and + re-enrols as a *new* device; a stolen device yields only its + own key, expiry-bounded cached grants and its journal — never + user keys. +- **Lifecycle:** Nix-flake reproducible builds in CI, + offline-signed images, A/B partitions with automatic rollback + to last-good, OTA fetched over HTTPS (never inside MQTT + frames), a checksummed journal ring across reconnects. +- **Firmware language:** Rust on esp-idf, sharing the workspace's + wire-bounds constants and manifest schema types with the bridge + so the 64 KiB / 8 KiB limits are one definition. C/Arduino and + bare-metal esp-hal + embassy-net both rejected for v1 + (embassy-net with a named revisit). +- **Power:** the v1 reference build is mains-powered ("Drew's + bench"); battery is a budgeted envelope, **not a tested + claim** — invariant I-10 forbids shipping a battery-life number + without a measured profile on the reference board. Wake-storm + avoidance is a fleet property (jittered, per-device-seeded + backoff on the bridge's 1 Hz `time.tick` floor). +- **Field posture:** fail-closed; distrust power, network, broker + and time in that order; the device is never a time authority + (the bridge assigns ingest time); bounded store-and-forward + with explicit gap signalling; never clicks through captive + portals. + +## The embedded display tier research (#13630) — researched, slices filed + +`doc/2026-11-23T18-55-21Z_research_id13630_embedded_display_tier/` +— "Embedded display tier: ESP32 screens as world presenters" +(issue #13630 closed; PR #13635). Chip table of record: ESP32-S3 +(reference); original ESP32 (supported envelope); ESP32-C3 (cost +floor, bridge-only class); ESP32-P4 (named, not targeted — except +via the Tanmatsu, above). The research also records the iroh +project's ESP32 walkthrough — ESP32 microcontrollers as QUIC +endpoints — as a transport data point for the tier. Filed +follow-on slices, all **open**: + +- [#13632](https://github.com/developing-today/code/issues/13632) + — presenter slice 1: round-panel hello-world presenter (GC9A01 + + CST816S, bridge-fed glance card, touch back-channel) — the + Waveshare S3-Touch-LCD-1.28 target. +- [#13643](https://github.com/developing-today/code/issues/13643) + — presenter slice (Tanmatsu class A): world presenter as an + AppFS app on ESP32-P4. +- [#13646](https://github.com/developing-today/code/issues/13646) + — e-paper presenter (M5Paper class): refresh discipline, + ambient-first cards. +- [#13647](https://github.com/developing-today/code/issues/13647) + — rotary-knob input slice (S3-Knob-Touch-LCD-1.8 / + P4-Knob-Touch-AMOLED-1.75 named in the title). + +## Projects and proofs — software only + +- **MQTT device bridge — spec plus labelled proof of concept, + proven in code (no hardware):** the design record for + [#2343](https://github.com/developing-today/code/issues/2343) + defines the `id.device.v1` topic schema (retained manifest + only; `wants` never retained; TLS plus per-device credentials, + fail-closed, no-oracle refusals; 64 KiB documents / 8 KiB args; + a 1 Hz minimum `time.tick` chosen to avoid wake storms on + ESP32-class radios). The proof of concept is + `pkgs/id/src/device_bridge.rs` with `FakeBroker`/`FakeDevice` + and integration tests. Home Assistant interop is + out-of-scope-but-supported: HA may bridge to the same topics; + the ID capability model stays authoritative. Production + hardware rollout stays deferred + ([#2028](https://github.com/developing-today/code/issues/2028)); + boards, firmware, OTA, ESPHome and power are #5783's. +- **ESP32-class hardware shell spike — done as a spike:** + [#10929](https://github.com/developing-today/code/issues/10929) + closed via PR #12942. The shell is specified as a capability + statement (presence, journal-head, and the interaction subset). +- **A separate ESP32 screen repository exists:** + `dezren39/muse-esp32-screen` — + [#10417](https://github.com/developing-today/code/issues/10417) + (open) replicates a format auto-fix workflow to it. The census + cites its existence from the issue title; its contents were not + read, and this book claims nothing about them. +- **Capability-taxonomy groundwork:** a design investigation + defines one wire contract across web, ESP32/MQTT and text/audio + (an ESP32 with GNSS serves `loc.position` at about 5 m; + `speech.capture` exists for devices that cannot run speech to + text — "most ESP32s"). A provider-security record flags the + open hardware-attestation question for the ESP32 class: a + provider key in extractable flash is cloneable, so until the + secure-element decision is taken, ESP32-class instances are + ceilinged as if cloneable. + +## Maker-bench context + +Drew's broader bench includes ESP32-class hardware, Raspberry Pi, +sensors, displays, logic analysers, buses and radios; networking +technology including LoRa, Reticulum, Thread, Matter, Zigbee and +Meshtastic (memory of record). No per-device inventory of any of +it exists — a gap (gap 11), and the AliExpress aggregation +([#13910](https://github.com/developing-today/code/issues/13910)) +is the intended remedy. + +The hardware-doc microcontroller corpus is wide — Seeed XIAO +ESP32S3 Sense, Waveshare S3/P4/C6 boards, the M5Stack Cardputer +family and its LoRa expansions, LilyGO T-Display-S3, Xteink +e-readers, and more — and every verification report in it carries +the same caveat this chapter opened with: **0 hardware-tested +claims**. It is research about parts. It is not a shelf inventory. diff --git a/pkgs/lab/book/network/switches.md b/pkgs/lab/book/network/switches.md new file mode 100644 index 000000000..e135f6b66 --- /dev/null +++ b/pkgs/lab/book/network/switches.md @@ -0,0 +1,200 @@ +# Switches + +The switches research is the most complete research in the lab +programme — and nothing in it is installed. This chapter folds in +the dedicated research records, states the conclusions they +support, and names the gaps the physical checks still have to +close. Status of the whole chapter: **researched-only, +thoroughly; integration planned, not started.** No switch is +recorded as racked, configured for the cluster, or carrying +cluster traffic. + +## The research records + +The research lives in `doc/inventory/` in the code repository — +four companion files: + +1. `doc/inventory/routing-and-switching.md` — 2,745 lines, last + updated 2026-04-02. The master inventory: **21 devices**, each + enriched with a full attribute set (ports/ASIC/capacity, power, + latency, L2, LAG, MC-LAG, first-hop redundancy, L3 routing, + security, monitoring, stacking). +2. `doc/inventory/standard-attributes.md` — the standard attribute + template (sections A–K) every device is enriched against. +3. `doc/inventory/enrichment-checklist.md` — all 21 devices marked + enriched, one device at a time, with a one-line capability + digest per device. +4. `doc/inventory/gap-analysis.md` — "Enrichment Gap Analysis — + 2026-04-03": what is still missing after enrichment (below). + +An older gap closed by the census: `doc/platform/hardware.md` +explicitly flagged that its own pass had not folded the switching +file in ("switch make/model/count is MISSING here until that file +is folded in"). The fold-in follows. + +## The inventory — every switch and router of record + +Quantities and classes are as recorded in the summary table of +`routing-and-switching.md`. **Location and state — racked, in +use, boxed — are not stated in that document for any device.** +That absence is exactly what +[#13920](https://github.com/developing-today/code/issues/13920) +now owns. + +### Core fabric switches + +| Device | Qty | Top speed | Ports | Managed | L3 | Multi-chassis | Stacking | Class / era | +|---|---|---|---|---|---|---|---|---| +| Celestica DX010 | 4 | 100GbE | 32× QSFP28 | Yes (SONiC) | Yes | MC-LAG (pairs of 2) | No | DC, 2016 | +| Arista DCS-7050QX-32-F | 1 | 40GbE | 32× QSFP+ | Yes (EOS) | Yes | MLAG | No | DC, 2013 | +| IBM Mellanox SX6036 | 1 | 56G IB / 40GbE | 36× QSFP | Yes | Limited | No | No | HPC/DC, 2013 | +| IBM RackSwitch G8316 | 4 | 40GbE | 16× QSFP+ | Yes | Yes | vLAG | Unclear | DC spine, 2012 | +| IBM RackSwitch G8264 | 3 | 10/40GbE | 48× SFP+ + 4× QSFP+ | Yes | Yes | vLAG | Yes (up to 8) | DC ToR, 2012 | +| IBM RackSwitch G8264e (G8264T) | 1 | 10/40GbE | 48× 10GBASE-T + 4× QSFP+ | Yes | Yes | vLAG | Likely | DC ToR, 2012 | + +One of the four DX010 units is missing fans/PSU, noted in the +inventory heading itself — at most three are deployable as-is. + +### Routers + +| Device | Qty | Notes from the record | +|---|---|---| +| Mono Gateway Router | 3 | NXP LS1046A, OpenWrt; summary table: 2× SFP+ 10GbE + 1G ports; enrichment digest: 5× 2.5GbE + 1× SFP+, WiFi 6 tri-radio M.2, DPAA hardware offload, about 15–25 W typical | +| Cisco 2811 | 2 | ISR G1, 2× GbE, HSRP pair candidate | +| Cisco 1841 | 1 | ISR G1 compact, 2× FastEthernet — "lab/learning device" per the enrichment digest | +| Cisco 881 | 1 | ISR G1 SOHO, fanless desktop | + +### Managed switches, 10GbE and above + +| Device | Qty | Notes | +|---|---|---| +| Netgear ProSafe XS712T-100NES | 1 | 12× 10GBASE-T, smart-managed, no L3 | +| TRENDnet TEG-30284 | 1 | 24× GbE + 4× SFP+, L2+, fanless | + +### Managed switches, 1GbE / 2.5GbE + +| Device | Qty | Notes | +|---|---|---| +| TP-Link Omada SG3210XHP-M2 | 2 | 8× 2.5G PoE+ + 2× SFP+, 240 W PoE budget, Omada SDN | +| Dell PowerConnect 5448 | 4 | 48× GbE + 4× SFP combo, stackable up to 12 units (proprietary stacking, single management IP) | +| Cisco SG300-52 | 1 | 50× GbE, L3-lite | +| Netgear ProSAFE GS116E | 1 | 16× GbE, "Plus" web-GUI only | + +### Cisco Catalyst, specialty and CPE + +| Device | Qty | Notes | +|---|---|---| +| Cisco Catalyst 3560 | 1 | L3 enterprise; not stackable (the 3750 is the stackable variant) | +| Cisco Catalyst 2960 | 1 | L2; stacking only on S/X variants (FlexStack) | +| Cisco ASA 5505 | 1 | Firewall, 8× FE | +| Cisco 4402 Wireless LAN Controller | 1 | 802.11a/b/g era, up to 50 APs | +| Calix GP1101X GigaPoint ONT | 1 | ISP CPE — see [The Osseo site](../site/the-osseo-site.md) | + +## Conclusions the research supports + +- **The cluster fabric candidates are the DC-class switches, and + among them the Celestica DX010 is the only 100GbE fabric:** + 32× QSFP28 (Broadcom Tomahawk, 3.2 Tbps), breakout to 4×25G / + 2×50G / 4×10G per port (up to 128× 25G), SONiC on ONIE, MC-LAG + pairs, VRRP plus static anycast gateway, BGP/OSPF/IS-IS via + FRR, VXLAN EVPN, about 150–200 W typical, about 400 ns + cut-through. One of the four recorded units is missing + fans/PSU. +- **Dictation resolved:** the "DXO10" of the 2026-11-04 build-out + dictation is the **DX010**. Drew confirmed on 2026-11-05 that + the model is the DX010 (recorded in `~/memory/2026-11-05.md` as + "Celestia DX010" — the inventory's spelling is **Celestica**; + the GitHub issue title + [#6071](https://github.com/developing-today/code/issues/6071) + also reads "Celestia DX010", a spelling variant of the same + device). #6071 = install **3 more** DX010 units. The tension + the book must state honestly: the April 2026 inventory already + lists 4× DX010 owned, so "3 more" reads as installing three of + the inventoried units, or expanding beyond four — the record + does not say which. Physical check required (gap 4). +- **No stacking on the top fabric tier:** DX010, Arista 7050QX + and SX6036 have no stacking — redundancy is MC-LAG/MLAG pairs + of 2, or ECMP beyond 2. Stacking exists only lower down: IBM + G8264 (up to 8, QSFP+ 40G links), Dell PowerConnect 5448 (up to + 12), Cisco 2960-S/X only. The inventory's own reference section + states the trade plainly: stacking = one logical switch / + single management plane; MC-LAG = independent control planes + coordinating LAG membership. +- **The IBM fleet is the 10/40G workhorse tier:** G8264 (48× SFP+ + + 4× QSFP+, vLAG, stacking) ×3, its copper sibling G8264e ×1 + (48× 10GBASE-T, about 450–550 W typical — the power-hungriest + switch in the inventory), G8316 40G spines ×4. The Mellanox + SX6036 is the InfiniBand/RDMA outlier (36× QSFP, FDR 56G IB or + 40GbE, no MC-LAG, no stacking). +- **The Dell switches of the build-out tickets are not + model-identified in any record read.** + [#6073](https://github.com/developing-today/code/issues/6073), + [#6074](https://github.com/developing-today/code/issues/6074) + and [#6075](https://github.com/developing-today/code/issues/6075) + (all open) each require, per switch: rails built and racked → + firmware updated (version recorded on the ticket) → hardware + verified → initial config built and deployed → **config stored + in the code repository** (the ticket establishes a + `lab/switches//` home if none exists) → + physical labels (hostname, role, management address). Each + ticket's record section is where model, hostname and management + address will land. The only Dell switches in the research + inventory are the PowerConnect 5448 ×4 — **the record nowhere + states that the three build-out Dells are 5448s**, and this book + does not assert it. This is the single biggest switches gap + (gap 3) and the first slice of #13920. +- **NIC/switch sanity check is still open:** the cluster design + needs the exact high-speed NIC specification on the core + machines and the switch gear between them confirmed, to + sanity-check LINSTOR/DRBD replication traffic — + [#1097](https://github.com/developing-today/code/issues/1097) + (open), under network-fabric epic + [#1084](https://github.com/developing-today/code/issues/1084). + The register's dictated "at least 200 Gb ports" remains + unverified — with a 100GbE-max fabric of record, that figure + cannot be taken at face value. +- **Documentation-survival caveat (from the inventory's + References note):** many of these devices are end-of-life or + discontinued; Cisco removes documentation for retired products + and IBM/Lenovo/Mellanox legacy documentation is partially gone. + The inventory links archived copies and community sources where + the manufacturer's are dead, and lists dead or unresolvable + links per device rather than hiding them. + +## What the gap analysis says is still missing (2026-04-03) + +All 21 devices are enriched; the remaining gaps are +attribute-level, per `doc/inventory/gap-analysis.md`: + +- **Systemic (nearly every applicable device):** protocol-based + VLAN (C4), trunk negotiation (C7), quantified STP convergence + time (C9), LAG failover time (D7), min-links (D8), CoPP/CPU + rate-limiting (J7), port security (J8), DNS client (K7). High + priority because they are one-liners for most devices: C7, C9, + D7, D8, K7. +- **Heaviest per-device gaps:** the Mellanox SX6036 (whole + attribute families missing — C, D, F, G, J, K sections), the + Cisco 1841 and 881 routers, and the IBM G8264/G8264e/G8316 + routing, security and monitoring rows (G5, G7–G9, J3–J5). +- Router C-section gaps and GS116E/GP1101X gaps are assessed as + expected or negligible for their device classes. + +## The owning issue and the physical-check list + +The owning issue for completing the inventory and then +integrating and racking is +[#13920](https://github.com/developing-today/code/issues/13920) +(open, filed under +[#13905](https://github.com/developing-today/code/issues/13905) +because the census found the seed had no owning issue). The +per-switch physical tickets are #6073–#6075, the fabric epic is +#1084, and the interconnect that depends on them is +[#6077](https://github.com/developing-today/code/issues/6077) +(open, labelled blocked). + +One dating fact the book keeps visible: the switches research is +dated 2026-04-02/03 — the newest fact in it is seven months older +than the rest of the programme. Firmware versions, device +survival, and the DX010's missing fans/PSU may have changed. A +physical check list is #13920's stated output, and until it +exists, this chapter is a research record, not a site survey. diff --git a/pkgs/lab/book/operations/deploying-this-book.md b/pkgs/lab/book/operations/deploying-this-book.md new file mode 100644 index 000000000..4dc48659c --- /dev/null +++ b/pkgs/lab/book/operations/deploying-this-book.md @@ -0,0 +1,115 @@ +# Deploying this book + +This book is an mdBook that lives with the subject it documents: +sources in `pkgs/lab/book/`, configuration in +`pkgs/lab/book.toml`, build definition in `pkgs/lab/docs.nix`, +published to the `developing-today/code` GitHub Pages site under +`/lab/`. This chapter describes exactly how that works. + +For the rule that keeps the book's content current, see +[Keeping this book current](../development/keeping-this-book-current.md). + +## The pieces + +- `pkgs/lab/book.toml` — mirrors the fleet book's configuration: + title "Lab Book", `src = "book"` (a dedicated folder), build + directory `rendered`, and `create-missing = false` — every + chapter in `SUMMARY.md` must exist on disk; the build never + invents stubs. +- `pkgs/lab/book/` — `SUMMARY.md` plus the chapters. `index.md` is + the introduction. +- `pkgs/lab/docs.nix` — mirrors `pkgs/fleet/docs.nix`. It takes a + `siteUrl` argument (default `"/"`) that is baked into the + rendered book as mdBook's `output.html.site-url`, injected at + build time via the `MDBOOK_OUTPUT__HTML__SITE_URL` environment + variable rather than stored in `book.toml`. It also rewrites + links that escape the book source tree to the file's repository + URL (`https://github.com/developing-today/code/blob/main/pkgs/lab/`) + in the copied pages only — the sources keep their relative + links for GitHub. +- `lib/default.nix` — exposes the package next to its sibling + books: `labDocs = pkgs.callPackage ../pkgs/lab/docs.nix { };` + and `lab-docs = labDocs;` in the packages set, so the build is: + + ```sh + nix build .#lab-docs + ``` + +## The two workflows + +Repository CI runs on `main` only, and the book follows the same +policy. + +### `lab-docs.yml` — build only + +`.github/workflows/lab-docs.yml` mirrors the fleet book's build +job: on push to `main` and on `workflow_dispatch`, it builds +`.#lab-docs`, stages the result, and verifies the rendered site +(the index page exists). It **never deploys**. Its job is to fail +by name on `main` when a chapter breaks the build — a missing +`SUMMARY.md` target under `create-missing = false`, a bad link, a +broken derivation — before the deploy path is involved. + +### `mcpx-docs.yml` — the combined Pages deploy + +The deploy lives inside the existing +`.github/workflows/mcpx-docs.yml`, whose deploy staging gains the +Lab Book. The reason is a hard constraint of GitHub Pages: + +**One repository has one Pages site, and a Pages deploy replaces +the whole site.** + +The mcpx book already occupies +`https://developing-today.github.io/code/`, and the sibling books +sit under it (the fleet book under `/code/fleet/`, the Code Book +under `/code/code/`). A lab-only deploy would publish an artifact +containing only the Lab Book — and wipe every sibling book off +the site. So the deploy job builds all the books and stages one +combined site: + +```text +site/ ← the mcpx book, built with siteUrl "/code/" +site/lab/ ← the Lab Book, built with siteUrl "/code/lab/" +``` + +The Lab Book is therefore reached at +`https://developing-today.github.io/code/lab/`, and its `siteUrl` +is `/code/lab/` — the `/code/` project-site prefix plus the +`lab/` staging directory. The combined artifact then goes +through the same publish shape as the sibling books: a staging +job (`configure-pages` + `upload-pages-artifact`) and a separate +publish job with the `pages` concurrency group. + +The combined-deploy staging for this book is landed by the +programme coordinator; this book's own change deliberately does +not edit `mcpx-docs.yml`. + +GitHub Pages for `developing-today/code` is **already enabled** +with `build_type = "workflow"` (source: GitHub Actions). There +is no manual enable step, no `gh-pages` branch, and no generated +HTML is ever committed. + +## Preview the book locally + +1. Build the packaged form from the repository root: + + ```sh + nix build .#lab-docs + ``` + +2. Open or serve `result/index.html` and check the chapter order, + internal links, and search. +3. Or, for a faster edit loop, build in place from `pkgs/lab/`: + + ```sh + mdbook build + ``` + + and preview the output directory named by `book.toml`. The Nix + build is the authoritative check — it is the same derivation, + mdBook version, and `siteUrl` handling the deploy uses. + +Note the local default `siteUrl` is `"/"`. Links inside the book +are relative `.md` links, so local preview navigation works +regardless; only absolute site URLs differ between the local +build and the deployed one. diff --git a/pkgs/lab/book/operations/faq.md b/pkgs/lab/book/operations/faq.md new file mode 100644 index 000000000..644ee1bab --- /dev/null +++ b/pkgs/lab/book/operations/faq.md @@ -0,0 +1,72 @@ +# FAQ + +## Is there a running Kubernetes cluster in the basement? + +No. As of the latest status record (2026-10-27), nothing in the +current cluster programme has been built. The basement machines +have no OS installed, by design. See +[The cluster programme](../cluster/the-cluster-programme.md). + +## Didn't a Talos cluster run there before? + +Yes — a v1.9-era test cluster (VIP 10.10.0.42, controllers +a1/a2/b1, workers a3/a4/b2–b6). It was torn down, confirmed by +Drew on 2026-10-26, and is history only. See +[Talos and Cozystack](../cluster/talos-and-cozystack.md). + +## What is actually proven, then? + +Three things carry the proven marking in this book: the TALM +per-node disk flow (#1812 — design plus a local container flow, +not bare metal); the first lab Cloudflare Tunnel (#6455 — live +since 2026-11-06, running on the laptop); and the record-level +facts about the machines themselves (every CPU boots, all RAM +works, the firmware pass on the named board). Everything else is +in progress, planned, or researched-only, and the chapters say +which. + +## Why do the machines have no OS? Isn't that backwards? + +It is the programme's central rule: everything bootstrappable +from config, no hand-built state that just existed forever. The +machines get an OS when the TALM bootstrap flow installs it +declaratively — see [Boot and auto-join](../cluster/boot-and-auto-join.md). + +## Which switches will the cluster use? + +The only 100GbE fabric in the research inventory is the Celestica +DX010 (four recorded, one missing fans/PSU). The full inventory — +21 devices — and the conclusions the research supports are in +[Switches](../network/switches.md). No switch is recorded as +racked or configured for the cluster yet. + +## Is `pkgs/lab-ops-hub` the lab's operations hub? + +No. It is a Cloudflare full-stack demo that borrowed the lab's +vocabulary — its database was seeded with three fictional +machines matching the basement-cluster sketch. It is not the +physical lab, and this book gives it a footnote, not a chapter. +See [The cluster programme](../cluster/the-cluster-programme.md). + +## Has any ESP32 board been bought or run? + +No board is recorded as bought, flashed, or run. The ESP32-S3 is +the verified reference part and the ESP32-P4 the named future +tier; the platform design is decision-ready and the display-tier +research is landed — all of it research and design, with two +software proofs and zero physical verification. See +[ESP32](../microcontrollers/esp32.md). + +## Where are the prices for all this hardware? + +Not in this book. No per-item prices exist in any source the +census read; the priced inventory is the job of the AliExpress +aggregation (#13910), and cost material belongs to the Project +Management book in any case. + +## When will the cluster be live? + +No record carries a projected date for any lab milestone — the +census's gap 16. The [High-level roadmap](../roadmap/high-level-roadmap.md) +records every lab timing entry as "no timing in record" rather +than inventing one. diff --git a/pkgs/lab/book/operations/glossary.md b/pkgs/lab/book/operations/glossary.md new file mode 100644 index 000000000..603de6aab --- /dev/null +++ b/pkgs/lab/book/operations/glossary.md @@ -0,0 +1,60 @@ +# Glossary + +**AppFS** — The badge.team application filesystem adopted from +the Tanmatsu: an app is a standard, unmodified ESP-IDF binary +with slug/title/version metadata in a dedicated partition. See +[ESP32](../microcontrollers/esp32.md). + +**BMC / IPMI** — Baseboard management controller / Intelligent +Platform Management Interface: the enterprise remote management +(KVM, power, sensors) built into the core machines. Versions and +settings are still to be audited (epic #1081). + +**Cozystack** — The Kubernetes platform planned for the cluster: +it decides storage, tenancy and GitOps, and provides LINSTOR +storage, CNPG Postgres and SeaweedFS buckets. Planned, not +installed. + +**CNPG** — CloudNativePG, the managed Postgres operator the +programme uses via Cozystack. The research brief's decision: use +Cozystack's CNPG-based Postgres; do not deploy a second operator. + +**DRBD** — Distributed Replicated Block Device: block-level +replication between machines, managed by LINSTOR in the cluster +design. Drew's sketch replicates across three machines so data +loss needs the same failure on two at once. + +**DX010** — Celestica DX010: the 100GbE fabric switch of the +research inventory (32× QSFP28, SONiC). The dictated "DXO10" and +the issue-title spelling "Celestia DX010" are the same device. + +**LINSTOR** — The storage management layer in Cozystack that +provisions DRBD-replicated volumes on ZFS. Design only in this +programme. + +**P9** — The fleet-drafted lab-integration design +(`doc/living/lab-integration.md`). A draft awaiting Drew's +ratification (#8873); nothing in it is decided. + +**RAID 100** — The register's name for the mid NVMe tier's layout: +stripe 3 × mirror 2 (6 drives), so two drives must die to down a +machine. + +**RustFS** — The S3-compatible object store designated for CNPG +backups and buckets on the HDD pools. Whether it also replaces +Cozystack's bundled SeaweedFS as the general store is an open +decision (epic #1088). + +**TALM** — `cozystack/talm`: the tool that templates and applies +Talos machine configuration per node from files in git. Its +per-node disk flow (#1812) is the book's one proven cluster +piece. + +**Talos** — Talos Linux, the cluster's operating system: +installed declaratively via TALM, never hand-built. No node is +installed yet. + +**Tanmatsu** — The handheld terminal (Nicolai Electronics / +badge.team lineage) built on an ESP32-P4 plus ESP32-C6, named as +the reference design for worlds-as-apps on the embedded tier. +The dictated "tenmazu" is this device. diff --git a/pkgs/lab/book/plans/gaps-and-open-questions.md b/pkgs/lab/book/plans/gaps-and-open-questions.md new file mode 100644 index 000000000..e21b89e3f --- /dev/null +++ b/pkgs/lab/book/plans/gaps-and-open-questions.md @@ -0,0 +1,110 @@ +# Gaps and open questions + +This chapter is the lab census's gap list (§8 of census C, +2026-11-23/24), carried into the book verbatim in substance. It +is the honest to-do record: where the record is thin, what is +unverified, and which contradictions stand unreconciled. A gap +listed here is not softened anywhere else in the book — chapters +cite these numbers. + +1. **No per-machine inventory exists for any basement machine.** + Only the laptop `amd` has a collected record. CPU model, + board-per-machine, RAM-per-machine, drive-per-machine: all + ungathered + ([#1095](https://github.com/developing-today/code/issues/1095) / + [#1096](https://github.com/developing-today/code/issues/1096) / + [#1810](https://github.com/developing-today/code/issues/1810) + open). Every "identical core boxes" claim rests on Drew's + 2026-10-20 dictation. +2. **NIC specification unverified.** "At least 200 Gb ports" + (dictated) versus a 100GbE-max switch fabric of record; + [#1097](https://github.com/developing-today/code/issues/1097) + open. The LINSTOR/DRBD design cannot be sanity-checked until + this lands. +3. **The three build-out Dell switches have no model, hostname, + or state anywhere in the record** + ([#6073](https://github.com/developing-today/code/issues/6073)–[#6075](https://github.com/developing-today/code/issues/6075) + will create it). Whether they are the inventoried + PowerConnect 5448s is unstated. **Location/state (racked, in + use, boxed) is unstated for every one of the 21 inventoried + network devices** — + [#13920](https://github.com/developing-today/code/issues/13920)'s + first slice owns exactly this. +4. **DX010 count tension:** the inventory says 4× owned (1 + missing fans/PSU); + [#6071](https://github.com/developing-today/code/issues/6071) + says install 3 *more*. Install-of-owned versus buy-more is not + distinguished in the record. +5. **Racking state unknown.** No record of racks present, rails + installed, or layout executed; + [#6070](https://github.com/developing-today/code/issues/6070)'s + very subject ("another 4 each of racking") is unresolved + dictation. +6. **Power unverified beyond the brief:** no installed-circuit + record, no UPS record, no measured draw (600 W per machine is + a planning assumption in the brief itself). +7. **Nothing cluster-shaped has run since the v1.9 test cluster + was torn down.** Cozystack, LINSTOR/DRBD, CNPG, RustFS, NATS, + FluxCD on-cluster: zero deployments. TALM is proven only + against local containers. +8. **#6078's verdict not extracted.** The SBC/Pi research issue + ([#6078](https://github.com/developing-today/code/issues/6078)) + is closed, but its body checkboxes are unchecked and the + census did not read its closing comments; the per-role + verdicts (quorum witness / web serving / ID free tier) must be + pulled from the issue before the book asserts them. This book + asserts none. +9. **OCI contradiction — unreconciled, not resolved.** Epic + [#1091](https://github.com/developing-today/code/issues/1091) + and child + [#4904](https://github.com/developing-today/code/issues/4904) + remain **open** on GitHub, while the memory of record + (2026-10-31) says OCI is stood down and is not a backend. Both + facts stand in this book, flagged as unreconciled. Neither + this chapter nor any other picks a winner; reconciliation is + programme work on #1091, not an editorial act. +10. **GPU framing tension:** the register lists 3× Intel B50 + + an RTX 2060 as owned-but-not-a-resource; + [#6072](https://github.com/developing-today/code/issues/6072)'s + title records "local (none owned)" for the GPU-capacity + question. The book uses the register's list and notes the + #6072 framing difference. +11. **ESP32 ownership is nowhere established.** Hardware-doc is + research, not ownership; no board is recorded as bought, + flashed, or run. The AliExpress aggregation + ([#13910](https://github.com/developing-today/code/issues/13910)) + is the planned fix and is blocked on Drew granting access. +12. **"Which ID app first" is still open** (register open + question #1, 2026-10-20; repeated in the P9 draft, + 2026-11-12) — it gates epic + [#1092](https://github.com/developing-today/code/issues/1092)'s + acceptance. +13. **P9 lab-integration design is unratified** + ([#8873](https://github.com/developing-today/code/issues/8873)) + — its phased landing plan (Atlas serve, queue workers, PM + surfaces, build overflow on the cluster) must not be cited as + decided. This book cites it only as a draft. +14. **Switches research is dated 2026-04-02/03** — the newest + fact in it is seven months older than the rest of the + programme; firmware versions, device survival, and the + DX010's missing fans/PSU may have changed. A physical check + list is #13920's stated output. +15. **Mini PCs, Dell machines, spare PCs: counts without specs.** + "2–3 mini PCs", "some Dell machines", "several spare PCs" — + no models or specifications in any source read. +16. **No timing exists for any lab item.** No record read in the + census carries a projected or planned date for any physical + or cluster milestone; the roadmap's Now/Next/Later/Ideas + horizons are the only sequencing of record. The + [High-level roadmap](../roadmap/high-level-roadmap.md) keeps + every lab timing entry as "no timing in record" for exactly + this reason. + +## Closing this list + +Each gap names its owning issue. A gap closes when the record +changes — an inventory lands, a physical check is recorded, an +issue is reconciled — and the chapter that carried the gap is +updated in the same pass, per +[Keeping this book current](../development/keeping-this-book-current.md). +Gaps do not close by being reworded. diff --git a/pkgs/lab/book/roadmap/high-level-roadmap.md b/pkgs/lab/book/roadmap/high-level-roadmap.md new file mode 100644 index 000000000..08875f6ff --- /dev/null +++ b/pkgs/lab/book/roadmap/high-level-roadmap.md @@ -0,0 +1,179 @@ +# High-level roadmap + +This chapter is the Lab Book's section of the project's merged +priority list (census B, gathered 2026-11-23/24 under +[#13905](https://github.com/developing-today/code/issues/13905)). +The ordering logic of the whole list, stated once there: +execution substrate first, then the physical substrate, then the +data substrate, then search intelligence, then the ID platform +build-out, then the gateway/PM/fork surfaces, then the record +itself. Within a tier, dependency order wins; ties break on +leverage. + +The lab's assignment (§2 of the census): **four primary items — +4, 5, 6 and 24 — in full below, and four cross-links — ◦2, ◦7, +◦17 and ◦30 — as one-liners.** Timing is from §3 of the census. +Where the record has no timing, this chapter says so; no dates +are invented anywhere in it. + +## Primary items + +### 4. Switches integrated and racked (SEED) + +- **Type:** milestone. +- **Description:** The dedicated switches from the repo's + switching research are installed, racked and integrated, so the + basement machines share a real fabric instead of ad-hoc links. +- **Area:** lab (primary, sole). Cross-link: fleet (cluster + networking assumptions). +- **Most related:** the code repo's dedicated switches research — + `doc/inventory/routing-and-switching.md` and `doc/hardware/` + (see [Switches](../network/switches.md)). At census B's + gathering, no single GitHub issue owned this item; the owning + issue now is + [#13920](https://github.com/developing-today/code/issues/13920), + filed under #13905 — complete the inventory, then integrate and + rack. Per-switch physical tickets: + [#6073](https://github.com/developing-today/code/issues/6073), + [#6074](https://github.com/developing-today/code/issues/6074), + [#6075](https://github.com/developing-today/code/issues/6075); + fabric epic + [#1084](https://github.com/developing-today/code/issues/1084); + NIC/switch verification + [#1097](https://github.com/developing-today/code/issues/1097). +- **Status today:** **not started (planned).** At census B, + switch make/model/count was explicitly missing from the + hardware record until the switching research was folded in; the + lab census (census C) performed that fold-in — it is the + [Switches](../network/switches.md) chapter. No OS is installed + on any basement machine yet, and no switch is recorded as + racked or carrying cluster traffic. +- **Timing (§3):** no timing in record. The switch inventory + itself was incomplete (make/model/count missing) — the lab + census under #13905 is the first dated step. +- **Ordering rationale:** First physical dependency: racking and + networking precede servers presenting (item 5) and the cluster + boot (item 6). Cheap, unblocking, and entirely Drew-side / + logistics-paced. + +### 5. All servers online, auto-connecting and presenting to the cluster on boot (SEED) + +- **Type:** capability-set. +- **Description:** Every server powers on, joins the network and + presents itself to the cluster declaratively — no hand-built + machine that "just exists forever." +- **Area:** lab (primary). Cross-links: fleet (enrolment is the + same shape as fleet agent enrolment); ID (the hosted-worlds + deployment pack targets these machines). +- **Most related:** the TALM + Talos bootstrap epic + [#1086](https://github.com/developing-today/code/issues/1086) + (named as parent of the cluster config in + `infra/cluster/README.md`); the ID hosted-worlds P5 + basement-cluster deployment pack + [#10697](https://github.com/developing-today/code/issues/10697); + the fleet agent enrolment family around + [#12236](https://github.com/developing-today/code/issues/12236). + There is **no dedicated implementation issue** for auto-join + itself — see [Boot and auto-join](../cluster/boot-and-auto-join.md). +- **Status today:** **not started.** Record: no OS installed on + the basement fleet (deliberate); every CPU boots, all RAM + works, nothing load-tested; basement power capacity is a named + blocker; build target is 3–5 best/most-identical machines + first. +- **Timing (§3):** no timing in record. The hardware state is as + recorded 2026-10-20/21 in the hardware register; no + reprioritisation recorded since. +- **Ordering rationale:** The cluster (item 6) is defined over + machines that present themselves; hand-installing the first + nodes would create exactly the snowflake state the programme + forbids. + +### 6. Talos cluster booted live, accepting data on Cozystack (SEED) + +- **Type:** milestone. +- **Description:** A Talos Linux cluster bootstrapped + declaratively with TALM, running Cozystack with Postgres + (CNPG), RustFS, NATS, FluxCD and DRBD+LINSTOR replication — + live and accepting data. Hard rule of record: no HashiCorp + tooling. +- **Area:** lab (primary). Cross-links: fleet (in-cluster builds, + item 2); ID (hosted worlds deployment target); Atlas (storage + tiers). +- **Most related:** the TALM + Talos bootstrap epic + [#1086](https://github.com/developing-today/code/issues/1086); + `planning/roadmaps/basement-cluster.md` (the current programme + doc; the v1.9-era test cluster in `doc/talos-addresses.md` is + torn down, confirmed by Drew 2026-10-26); the ID deployment + pack [#10697](https://github.com/developing-today/code/issues/10697). + Programme parent: + [#1817](https://github.com/developing-today/code/issues/1817). +- **Status today:** **designed / not started.** Design and + per-node disk config exist (`infra/cluster/`; the TALM flow is + the one proven piece — see + [Talos and Cozystack](../cluster/talos-and-cozystack.md)); + nothing is running. The storage design sketch is Drew's, to be + validated: 15–16× 16 TB HDDs (8 still boxed), at least 3 TB ECC + RAM, RAID-10/RAID-100 NVMe tiers, 3-machine DRBD replication. +- **Timing (§3):** the v1.9-era Talos test cluster was torn down + (confirmed by Drew 2026-10-26) — a recorded miss/reset: the + current programme (`basement-cluster.md`) restarts from + declarative bootstrap. No live date in record. +- **Ordering rationale:** The physical keystone: in-cluster + builds (item 2), self-hosted ID servers (item 17) and the local + leg of the backup mesh (item 7) all presume it. Ranked below + its own prerequisites (items 4–5) by dependency, above + everything that consumes it by leverage. + +### 24. ESP32 hardware platform line — ID on microcontrollers + +- **Type:** capability-set. +- **Description:** ESP32-family boards as an ID hardware shell — + sensors and LoRa connected to the ID project — a lab chapter + today, its own line long-term. +- **Area:** lab (primary). Cross-link: ID (the hardware shell + crate `id-hw-shell` and the shells programme, item 22 of the + merged list). +- **Most related:** + [#5783 — ESP32 hardware platform line](https://github.com/developing-today/code/issues/5783) + (open, design; already tasked by a completed first pass); + per-device verification docs in `developing-today/hardware-doc` + (mostly ESP32 boards today — exact part names are verified + there, not guessed). Wing epic: + [#1093](https://github.com/developing-today/code/issues/1093). + Full chapter: [ESP32](../microcontrollers/esp32.md). +- **Status today:** **designed / side-line.** Recorded in the + hardware census as "a side project of a side project for now — + noted, not scheduled." +- **Timing (§3):** no timing in record; explicitly "noted, not + scheduled" in the hardware record. +- **Ordering rationale:** Genuinely long-term: it inherits the + shell contract (item 22) and the lab's physical readiness + (items 4–6), and blocks nothing. + +## Cross-links + +One line each, by the census's completeness rule — the full text +of each item lives in its primary book. + +- **◦2 — Containerised build/compile systems (fleet primary):** + the in-cluster half runs on item 6 and is not started — it + waits on the cluster; the Actions/compile-coordinator half is + designed and in flight in the fleet book's chapter: + [Containerised builds — fleet book](https://developing-today.github.io/code/fleet/). +- **◦7 — Backups + storage automated, one coherent complete + backup set (Atlas primary):** the local leg runs on cluster + storage — the DRBD/LINSTOR tiers of + [Storage: LINSTOR and DRBD](../cluster/storage-linstor-and-drbd.md); + the mesh itself is the Atlas book's chapter. +- **◦17 — Tunnels to spin up ID servers dynamically (ID + primary):** the basement-cluster deployment pack for hosted ID + worlds is + [#10697](https://github.com/developing-today/code/issues/10697) + (P5 of the hosted-worlds chain) and runs on item 6; the chain + itself is the ID book's chapter. +- **◦30 — The books and Spaces themselves (PM primary):** this + book is that programme line's lab deliverable — the Lab Book + plus the Lab Space plus the AliExpress inventory issue + [#13910](https://github.com/developing-today/code/issues/13910), + coordinated on + [#13905](https://github.com/developing-today/code/issues/13905). diff --git a/pkgs/lab/book/site/hardware-register.md b/pkgs/lab/book/site/hardware-register.md new file mode 100644 index 000000000..a36e41c1e --- /dev/null +++ b/pkgs/lab/book/site/hardware-register.md @@ -0,0 +1,125 @@ +# Hardware register + +This chapter records the lab's hardware exactly as far as the +record supports it — and names, just as exactly, where the record +stops. The register's figures come from Drew's idea register of +2026-10-20 and the records built on it. Where two figures exist, +both are given. + +## The core fleet + +| Item | Record | +|---|---| +| Threadripper machines | About 12 ("a dozen"). Identical motherboard, CPU and specifications except SSDs; one named board is the ASUS Pro WS WRX80E-SAGE. Enterprise BMC/IPMI on the core machines. High-speed NICs whose exact specification is still to be verified — "at least 200 Gb ports" was dictated and remains unverified (see the gap list). Every machine has a consumer NVMe boot drive; the best are Samsung 990 Pro. | +| RAM | At least 3 TB of DDR4 server ECC RAM across the fleet. All of it works; none of it is load-tested. | +| Hard drives | 15–16 × 16 TB helium Western Digital server pulls (Drew also said "at least 12" once; the register records both figures). Bought before storage prices spiked. Eight are still in the box, uninstalled, with no SMART or baseline data captured for any of the HDDs. | +| NVMe and SSDs | Every machine has some consumer NVMe boot drive. Best tier: prosumer Samsung 990 Pro. Mid tier: 980s, smaller 990s, other good consumer SSDs. Per-machine SSDs are the one specification that differs between core boxes. | +| NVMe firmware/SMART archive | A backup hard drive holds SMART data and manufacturer firmware data for every NVMe (not the HDDs). Firmware updates were run wherever findable. Proven as recorded, 2026-10-20. | +| Firmware state | WRX80E-SAGE updated. Dell machines: no updates found, BIOS best effort. Every CPU boots, all RAM works. The full audit is epic [#1081](https://github.com/developing-today/code/issues/1081), with [#1099](https://github.com/developing-today/code/issues/1099)–[#1102](https://github.com/developing-today/code/issues/1102) (golden baseline, bring-to-baseline, routine KVM screenshot verification) all open. | + +## The rest of the site hardware + +| Machine or group | Record | +|---|---| +| Dell machines | Part of the basement fleet. Count not recorded; no further specification in the sources read; no firmware updates found for them. A gap. | +| Mini PCs | 2–3, planned as cluster interconnect members ([#6077](https://github.com/developing-today/code/issues/6077)). No specification in the record. A gap. | +| Spare PCs and laptops | Several, plus a desktop tower, an older Framework laptop and a gaming PC. Candidate roles: compile/test runners, iGPU remote-desktop hosts, Talos nodes, quorum witnesses — see [The cluster programme](../cluster/the-cluster-programme.md). Source marked unverified dictation in the register addendum of 2026-10-21. | +| Second NixOS host, `nixos` | A Framework 13-inch 12th-gen Intel machine with a 2 TB NVMe layout and desktop profile, defined in `nixos/hosts/default.nix`. No lab role recorded. A gap. | +| PC Engines APU | A hardware configuration exists (`nixos/hardware-configuration/pcengines/apu/`). No lab role recorded. A gap. | + +Out of scope for the lab, recorded so the boundary is plain: the +work Mac (a Vertex job machine — explicitly not lab hardware) and +Drew's phone. + +## GPUs — explicitly not a compute resource + +The register lists 3× Intel B50 and 1× RTX 2060 (noted: low hash +rate), plus very old display cards useful only for basic GUI/BIOS +access on a misbehaving box. There are no local model-farm plans. + +One framing tension is recorded, not reconciled: a separate closed +research issue, +[#6072](https://github.com/developing-today/code/issues/6072), +covered GPU options after Modal credits and its title records +"local (none owned)" for that capacity question. This book uses the +register's list as the lab's hardware of record and notes the +difference; see gap 10 in +[Gaps and open questions](../plans/gaps-and-open-questions.md). + +## The one collected machine record: the laptop `amd` + +Exactly one machine in the whole estate has a collected inventory +record: Drew's Framework laptop, `amd` +(`doc/hardware/machines/amd.md`, collected 2026-10-29 by +`machines/collect-inventory.py`): + +- Framework Laptop 13, AMD Ryzen 7 7840U (8 cores / 16 threads). +- About 128 GB RAM (132,752,572,416 bytes as collected). +- Samsung SSD 990 PRO 4TB NVMe. +- MediaTek MT7922 Wi-Fi. +- BIOS INSYDE 03.18. +- NixOS host config `amd` in `nixos/hosts/default.nix` (Framework + 13-inch 7040-AMD hardware, 4 TB NVMe disk layout). The laptop is + Drew's primary workstation, the canonical Atlas home and ingest + factory, and the machine that runs the lab's Cloudflare Tunnel + connector — see [The Osseo site](the-osseo-site.md). + +The laptop is proven and in daily use. It is also the exception +that proves the rule of the next section. + +## The per-machine inventory gap + +There are no NixOS definitions for any Threadripper or cluster +machine in `nixos/hosts/` — the two Framework laptops are the only +hosts defined. That is consistent with the design (the cluster +machines will run Talos, not NixOS, and currently run nothing), +but the deeper gap is inventory itself: + +- The inventory-record schema and template are built, and the + design task is closed + ([#1094](https://github.com/developing-today/code/issues/1094)). + The schema is in use in `doc/hardware/machines/` — for the + laptop alone. +- Gathering statistics is still open for the core Threadrippers + ([#1095](https://github.com/developing-today/code/issues/1095)), + for the remaining machines plus the boxed-HDD baseline + ([#1096](https://github.com/developing-today/code/issues/1096)), + and for ranking and naming the first 3–5 nodes + ([#1098](https://github.com/developing-today/code/issues/1098)). +- The umbrella is + [#1810](https://github.com/developing-today/code/issues/1810) — + hardware inventory and first-node selection, under epic + [#1080](https://github.com/developing-today/code/issues/1080). + +Until those land, every "identical core boxes" claim in this book +rests on Drew's 2026-10-20 dictation. The book says so rather than +letting the claim harden into a specification. + +## The completion path: the AliExpress inventory + +No per-item prices exist in any source the census read — no +purchase prices for machines, boards, RAM, NVMe, GPUs, NICs or +switches. The only timing note is that the HDDs were bought before +storage prices spiked. + +The priced inventory is precisely what +[#13910](https://github.com/developing-today/code/issues/13910) is +meant to create: aggregate the AliExpress purchase history into a +hardware inventory. That issue is open; its access step is pending +Drew and no login was attempted by the programme. When it lands, +this chapter gains the per-item record it currently lacks — and +[Keeping this book current](../development/keeping-this-book-current.md) +makes updating it part of the sync rule. + +## A note on the hardware-doc repository + +The sibling repository `developing-today/hardware-doc` (symlinked +into the code repository as `doc/hardware`) holds device and +component research decomposed to primary evidence, with every +claim carrying its source and evidence status. Its own +verification reports are explicit that its passes carry zero +hardware-tested claims. This book therefore treats hardware-doc +device records as researched-only evidence about parts, never as +proof that Drew owns a given board. Ownership is established only +by the machine inventory above and the AliExpress aggregation — +both still to come. diff --git a/pkgs/lab/book/site/the-osseo-site.md b/pkgs/lab/book/site/the-osseo-site.md new file mode 100644 index 000000000..68d2493f1 --- /dev/null +++ b/pkgs/lab/book/site/the-osseo-site.md @@ -0,0 +1,131 @@ +# The Osseo site + +The lab is one physical place: the basement of Drew's house in +Osseo, Wisconsin (America/Chicago), plus the home network the house +already runs. Drew plans to stay in the house long-term — 10+ +years, possibly 40 — and home Ethernet hardwiring is a standing +project (`doc/platform/hardware.md` in the code repository, sourced +from the idea register of 2026-10-20). + +## The basement fleet, as recorded + +About a dozen Threadripper machines form the core fleet. The record +(idea register 2026-10-20; roadmap `planning/roadmaps/basement-cluster.md`; +status record 2026-10-27) states: + +- The core boxes are identical in motherboard, CPU and + specifications, except for their SSDs. +- One board is named: the ASUS Pro WS WRX80E-SAGE ("WRX80 Sage"), + which received a firmware update in the 2026-10-20 pass. The + sources do not say whether every core box is this board or only + one is. +- A separate group of Dell machines was picked up alongside; no + firmware updates could be found for them, and their BIOS received + a best effort. +- Every CPU at least boots and all RAM works. Nothing has been + load-tested. +- No operating system is installed on any of them — deliberately. + The programme's rule is that there will be no hand-built state + that just existed forever; machines will be installed from + configuration when the cluster programme reaches them. See + [Boot and auto-join](../cluster/boot-and-auto-join.md). +- The core machines have enterprise BMC/IPMI remote management + (built-in enterprise KVM). Versions and every setting are still + to be audited — that audit is epic + [#1081](https://github.com/developing-today/code/issues/1081). +- Two to three mini PCs are planned to join the cluster + interconnect alongside the dozen machines + ([#6077](https://github.com/developing-today/code/issues/6077)). +- Several older PCs and laptops can be hooked up quickly — decent + when bought, shelved for about two years, at least one with an + integrated GPU — alongside a desktop tower, an older Framework + laptop and a gaming PC. Their candidate roles are in + [The cluster programme](../cluster/the-cluster-programme.md). + The source for this group is an addendum of 2026-10-21 marked + unverified dictation, and this book keeps that marking. + +Status of the fleet as a whole: **planned**. The machines exist; +nothing is installed on them. + +## Power + +Power is the blocker of record for the full fleet: basement power +capacity and general mess stand in the way, and the target is 3–5 +machines first. + +The electrician brief exists and is complete as a document +(`planning/roadmaps/basement-cluster-electrician-brief.md`): four +dedicated 20A circuits, each on its own breaker, 12 AWG copper, +duplex receptacles at the rack location, labelled "CLUSTER 1" +through "CLUSTER 4". Its load maths uses 600 W sustained per +machine — a planning assumption in the brief itself, to be replaced +by measured values. An earlier UPS-breaker drop-off idea is +explicitly not wanted. + +Ticket state: + +- [#1103](https://github.com/developing-today/code/issues/1103) — + circuit spec and electrician brief: **closed**. +- [#1104](https://github.com/developing-today/code/issues/1104) — + engage an electrician (quotes and schedule): open. +- [#1105](https://github.com/developing-today/code/issues/1105) — + install and verify the dedicated 20A circuits: open. +- Epic: [#1083](https://github.com/developing-today/code/issues/1083) + — basement power and space. + +The census found no record of circuits actually installed, a UPS +in place, or measured per-machine draw. That is gap 6 in +[Gaps and open questions](../plans/gaps-and-open-questions.md). + +## Racking and physical layout + +- [#1106](https://github.com/developing-today/code/issues/1106) — + basement cleanup and rack layout for the first nodes: open. +- [#6070](https://github.com/developing-today/code/issues/6070) — + "another 4 each of racking (as dictated)": open. The recorded + interpretation is "four more rack units / items to rack"; the + ticket itself asks that what the four turned out to be be + recorded on the ticket. The dictation is not resolved in the + record, and this book does not resolve it. +- [#6071](https://github.com/developing-today/code/issues/6071) — + install 3 more DX010 units: open. See [Switches](../network/switches.md). + +No record was found of a rack actually populated, rails installed, +or a completed layout. The physical bring-up sequence is ticketed +under parent +[#6066](https://github.com/developing-today/code/issues/6066) +(filed 2026-11-04): racking, then Dell switches ×3, then edge +routing and mesh Wi-Fi, then interconnect, then cluster bring-up. +All of it is planned; none of its checkboxes were checked in the +bodies the census read. + +## The home network as it stands today + +| Fact | Status | +|---|---| +| WAN: 2 Gbps symmetric fiber from Brightspeed — the only fiber provider in this part of Osseo. A second line would make 4 Gbps. Cable is 100 Mbps and pricier (a possible redundancy pickup). TriCounty Communications fiber may reach the address later; then both fibers would be bought. | Proven, as the standing service of record | +| ISP customer-premises equipment in the switching inventory: Calix GP1101X GigaPoint ONT, XGS-PON 10G/10G, one 10GBASE-T port | Researched-only (inventory record; no install state stated) | +| Current LAN: Brightspeed fiber into a TP-Link Deco BE11000 in router mode | Proven (memory of record) | +| Home IPv6 is broken in practice: IPv6 payload transfers to Cloudflare/npmjs stall at 0 bytes; PMTUD black hole is the lead suspect. IPv6 is ULA-only; the standing directive is to prefer IPv4 everywhere until fixed ([#1280](https://github.com/developing-today/code/issues/1280)) | In progress — a workaround landed for the laptop (PR #1286); the root fix is open on #1280 | +| Drew's networking priority, ruled 2026-11-05: router and Wi-Fi first | Standing direction | +| Edge routing reconfigure and rewire ([#6067](https://github.com/developing-today/code/issues/6067)) — sequenced after the Dell switches are racked; the edge router's config is to be stored in the code repository | Planned | +| Mesh Wi-Fi rewire ([#6068](https://github.com/developing-today/code/issues/6068)) | Planned | + +### The one live artefact + +The lab programme's first Cloudflare Tunnel went live on +2026-11-06: a connector on the laptop (`amd`), seed ingress +`lab.security.cab`, NixOS service `services.lab-tunnel` +([#6455](https://github.com/developing-today/code/issues/6455), +closed). It is **proven** — and it is also the one live network +artefact of the whole lab programme. Note where it runs: on the +laptop, not on any cluster machine. + +## What is not at the site yet + +No running Kubernetes cluster. No installed switch fabric for the +cluster. No racked cluster nodes. No cluster storage pools. The +v1.9-era Talos test cluster (VIP 10.10.0.42, controllers a1/a2/b1, +workers a3/a4/b2–b6, recorded in `infra/talos/01b.us/`) is +historical reference only — torn down, confirmed by Drew +2026-10-26. See [Talos and Cozystack](../cluster/talos-and-cozystack.md). diff --git a/pkgs/lab/docs.nix b/pkgs/lab/docs.nix new file mode 100644 index 000000000..5da8459bd --- /dev/null +++ b/pkgs/lab/docs.nix @@ -0,0 +1,64 @@ +# The Lab Book (#13905): render pkgs/lab/book with mdBook into +# static HTML, sandboxed, with the flake-pinned mdbook from nixpkgs +# and no network access. Exposed as the .#lab-docs flake output. +# Mirrors pkgs/fleet/docs.nix (#13165). +# +# The base URL is a derivation argument (the #1941 pattern): `siteUrl` +# is baked into the rendered book as mdBook's output.html.site-url, so +# a local build, the CI build, and a deployed build differ only in +# that one value. The flake output uses the default "/"; the GitHub +# Pages deploy overrides it with "/code/lab/" (the Lab Book's path +# inside the repository's project site), e.g. +# `labDocs.override { siteUrl = "/code/lab/"; }`. +{ + lib, + runCommand, + mdbook, + siteUrl ? "/", +}: +let + # Only the book inputs enter the store: book.toml plus the book + # tree. Nothing else under pkgs/lab is book content. + src = lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions [ + ./book.toml + ./book + ]; + }; +in +runCommand "lab-docs" + { + nativeBuildInputs = [ + mdbook + ]; + meta = { + description = "Lab Book (mdBook rendering of pkgs/lab/book)"; + homepage = "https://github.com/developing-today/code"; + license = with lib.licenses; [ + mit + asl20 + ]; + }; + } + '' + cp -r ${src} work + chmod -R u+w work + cd work + # Links that escape the book source tree would 404 in the rendered + # book: from book/, ../README.md means pkgs/lab/README.md, which + # is not part of the artifact. Rewrite those links — in the copied + # pages only, the sources keep their relative links for GitHub — + # to the file's repository URL, at the depth where the link + # escapes: ../ from a top-level page, ../../ from a page one + # directory down. Links that stay inside book/ are left for + # mdBook to resolve. (Same treatment as pkgs/fleet/docs.nix.) + repoURL="https://github.com/developing-today/code/blob/main/pkgs/lab/" + find book -maxdepth 1 -name '*.md' -exec sed -i \ + "s|](\.\./|](''${repoURL}|g" {} + + find book -mindepth 2 -maxdepth 2 -name '*.md' -exec sed -i \ + "s|](\.\./\.\./|](''${repoURL}|g" {} + + # Bake the base URL into the book (see the siteUrl argument above). + export MDBOOK_OUTPUT__HTML__SITE_URL="${siteUrl}" + mdbook build --dest-dir $out + ''