From e3f31f219db8d5fb827942fed615aeb5bc8d0d48 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 23 Nov 2026 19:45:27 -0600 Subject: [PATCH] lab book: tiered storage as design centre, Falco chapter, storage verdict landed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drew's storage + security directions (2026-11-23 ~19:34 CST), applied to the Lab Book: - Storage chapter reworked around tiered storage as the design centre: LINSTOR tiers from the recorded hardware (Samsung 990 fast tier, mixed NVMe RAID 100, helium HDD bulk), S3 fallback and pull-from-multiple-locations-and-join mechanics, open questions named; Ceph avoided where possible as a settled preference; Postgres on CloudNativePG + streaming replicas. - New chapter: Security: Falco runtime detection (platform group) — eBPF/syscall tripwire for agent workloads, detection not prevention, tuning cost stated; cross-linked from the cluster programme and automation chapters. - Object-storage chapter updated to the landed verdict (doc/2026-11-24T01-33-33Z_research_rustfs-vs-seaweedfs/, PR #13990): SeaweedFS stays as Cozystack's S3 layer; RustFS pilot-only outside Cozystack; the record's SeaweedFS guardrails carried. - Cluster programme, Talos, index and glossary updated to match. Drafted by the CODE-BOOK storage lane; its first worktree hit an execution-risk flag hold, so application was completed by the coordinator in a fresh worktree (detach-at-main mechanic) with the drafts transferred hash-verified. Build: nix build .#lab-docs, zero mdBook warnings; rendered output spot-verified. Refs #13905. --- pkgs/lab/book/SUMMARY.md | 1 + .../book/cluster/storage-linstor-and-drbd.md | 222 +++++++++++++++--- pkgs/lab/book/cluster/talos-and-cozystack.md | 11 +- .../lab/book/cluster/the-cluster-programme.md | 16 +- pkgs/lab/book/index.md | 9 +- pkgs/lab/book/operations/glossary.md | 18 +- .../book/platform/automation-and-scaling.md | 7 + pkgs/lab/book/platform/object-storage.md | 140 +++++++---- pkgs/lab/book/platform/security-and-falco.md | 82 +++++++ 9 files changed, 419 insertions(+), 87 deletions(-) create mode 100644 pkgs/lab/book/platform/security-and-falco.md diff --git a/pkgs/lab/book/SUMMARY.md b/pkgs/lab/book/SUMMARY.md index ddefe12a8..d0af4db79 100644 --- a/pkgs/lab/book/SUMMARY.md +++ b/pkgs/lab/book/SUMMARY.md @@ -32,6 +32,7 @@ - [Artifact and binary repositories](platform/artifact-repositories.md) - [Automation and automated scaling](platform/automation-and-scaling.md) - [Object storage: RustFS and SeaweedFS](platform/object-storage.md) +- [Security: Falco runtime detection](platform/security-and-falco.md) - [ESP32](microcontrollers/esp32.md) diff --git a/pkgs/lab/book/cluster/storage-linstor-and-drbd.md b/pkgs/lab/book/cluster/storage-linstor-and-drbd.md index 52151bbe0..c5b76e209 100644 --- a/pkgs/lab/book/cluster/storage-linstor-and-drbd.md +++ b/pkgs/lab/book/cluster/storage-linstor-and-drbd.md @@ -1,10 +1,29 @@ # 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. +design exactly as the record carries it — and then states plainly +what exists today: no cluster storage pools, and a local↔cloud +sync story that today runs entirely outside the cluster. + +Tiered storage is the design centre of this chapter, per Drew's +direction of 2026-11-23: LINSTOR device tiers built from the +lab's actual hardware, with a defined fallback where LINSTOR +cannot serve. Everything tier-shaped below is **planned — design +only**, written against a planned system that does not exist yet. + +## The settled storage preference: LINSTOR first, Ceph avoided + +**Ceph is avoided where possible (Drew, settled 2026-11-23).** +Where the wider research weighed distributed storage options — +the CNCF landscape census carried the LINSTOR-over-Rook/Ceph +line for the Cozystack stack — this book now states the settled +preference plainly: **LINSTOR-first is the direction; Ceph is +not the fallback plan and is not carried as a co-equal +candidate.** Factual note, kept brief: Ceph is a widely deployed +distributed storage system and Rook is its Kubernetes operator; +neither is in this estate's design, and this book gives Ceph no +further treatment. Status: **settled direction (2026-11-23); +nothing built.** ## The replication design (planned) @@ -27,30 +46,172 @@ 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. +## Tiered storage: the design centre (planned) + +The tiers are LINSTOR storage pools over device classes taken +from the [Hardware register](../site/hardware-register.md). +Anything about the tiers that the register does not support is +marked **design intent**, not inventory. + +### Tier 1 — fast: Samsung 990 SSDs (PCIe 4) + +- **Hardware of record:** Samsung 990 Pro NVMe — the register's + best tier ("prosumer Samsung 990 Pro"), present as boot drives + across the core fleet and as the laptop `amd`'s collected + Samsung SSD 990 PRO 4TB. The PCIe 4 designation is Drew's + 2026-11-23 tier naming (**design intent** as a tier label; the + register records the drives, not a per-drive bus audit). +- **What lands here:** the data that pays for latency — + Postgres primary and streaming-replica data and WAL (see + "Postgres: CloudNativePG and streaming replicas" below), + etcd-class and control-plane volumes, hot workload volumes, + and the read cache / landing zone for the join pattern below. +- **Shape:** LINSTOR pool over the 990-class devices, DRBD + replication across three machines per the replication design + above; the register's earlier named pools — (1) 4 drives + RAID 10 and (2) 6 drives RAID 100 — are carried as the pool + layouts of record, to be validated. + +### Tier 2 — mid: mixed NVMe and consumer SSDs + +- **Hardware of record:** 980s, smaller 990s and good consumer + SSDs — the register's mid tier, and the one specification that + differs between the otherwise identical core boxes. +- **What lands here:** general workload volumes, build and CI + scratch that must survive a node, and the second copy class + for data whose hot copy lives on Tier 1. +- **Shape:** 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 (idea register, 2026-10-20). + +### Tier 3 — bulk: helium HDDs + +- **Hardware of record:** 15–16 × 16 TB helium **Western + Digital** server pulls (Drew also said "at least 12" once; + the register records both figures); eight are still in the + box, uninstalled, with no SMART or baseline data captured. + **Flagged, not reconciled:** Drew's 2026-11-23 direction for + this pass named a *Seagate* helium HDD bulk tier. The register + — this book's hardware source — records Western Digital. + This chapter follows the register and flags the difference; + the per-drive inventory + ([#1096](https://github.com/developing-today/code/issues/1096), + open) is what settles it, not an editorial choice. +- **What lands here:** capacity data — S3 buckets on the HDD + pools (the SeaweedFS layer of + [Object storage: RustFS and SeaweedFS](../platform/object-storage.md)), + cold-ish buckets, backups, media and sealed archive bundles + awaiting the cold store. +- **Shape:** 3 hosts × 4 × 16 TB in RAID 10 (idea register, + carried into epic #1085 / #1813), feeding the object layer. + +### Goal and open inventory work + +- 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). + open). The NVMe baseline already exists on a backup drive — + see the [Hardware register](../site/hardware-register.md). + +## Where LINSTOR cannot serve: the fallback design (planned) + +LINSTOR/DRBD is block storage for cluster workloads. Two classes +of need sit outside it, and the design names a fallback for +each. Status: **design intent — nothing below is built.** + +- **Object-shaped and off-cluster data → S3.** Anything that is + an object rather than a volume — backups, sealed bundles, + media, data that must be reachable from outside the cluster + or survive it — goes to the S3 layer: SeaweedFS as shipped by + Cozystack inside the cluster (the verdict of + [Object storage: RustFS and SeaweedFS](../platform/object-storage.md), + record dated 2026-11-24), and the existing R2/Drive cold + store outside it (see the sync sections below). LINSTOR + volumes are never the only copy of anything in this class. +- **Data spread across locations → pull-from-multiple-locations- + and-join.** Where a dataset legitimately lives in more than + one place (for example a sealed bundle in the cold store, a + working copy on the laptop, a bucket copy in-cluster), the + reader does not pick one home and copy the whole dataset + first. The design shape: + 1. A manifest/index — held outside the bulk data, as the + cold-store design already specifies for Drive bundles — + names every location holding each part, with checksums. + 2. The reader pulls each part from the nearest or cheapest + available location, in parallel where the parts are + independent. + 3. The join verifies each part against the manifest checksum + before assembly; a part that fails verification is pulled + from another location, never trusted. + 4. The assembled result lands on Tier 1 or Tier 2 as a cache + or working copy; the locations of record are unchanged — + the join is a read pattern, not a migration. + +### Open questions (explicit, by design) + +This tier/fallback/join design is a design centre, not a solved +system. The open questions are part of the design record: + +- **Placement policy.** What decides which tier a new volume or + object lands on, and who moves data between tiers as it cools + — LINSTOR pool rules, application choice, or a mover job? No + policy is written yet. +- **Join consistency.** The manifest is the join's only truth: + what updates it, what happens when two locations disagree + about a part, and what a reader sees mid-update are all + undecided. The design assumes checksums catch corruption; it + does not yet define conflict resolution. +- **Rebuild behaviour.** When a Tier 1 or Tier 3 device dies, + what rebuilds first, at what priority, and what does DRBD + resync traffic do to the unverified fabric (gap 2) while it + runs? RAID 100's "two drives must die" property is a sketch + figure, not a measured rebuild story. +- **Quorum.** Split-brain decisions in two- or four-storage-node + layouts still want a witness (see + [The cluster programme](the-cluster-programme.md)); the + witness's own storage class is unnamed. + +## Postgres: CloudNativePG and streaming replicas (planned) + +**The basis is settled: Postgres in the cluster is +CloudNativePG (CNPG), as shipped by Cozystack — Drew's lean and +Cozystack's shipped operator agree, and the research brief's +decision stands: use Cozystack's CNPG-based managed Postgres; +do not deploy a second operator.** Status: **planned — no +Postgres runs in any cluster, because there is no cluster.** + +The shape, against the tiered design above: + +- **What runs where.** Each CNPG cluster is a primary plus + streaming replicas, spread across machines so a machine loss + loses at most one member. Data and WAL sit on Tier 1 + (Samsung 990) LINSTOR volumes — Postgres is the workload the + fast tier exists for. Nothing Postgres-shaped lands on the + HDD bulk tier except its backups. +- **Streaming-replica shape.** The primary streams WAL to its + replicas continuously (Postgres streaming replication, as + CNPG manages it); replicas serve failover first and read + traffic second. Replica count, synchronous-versus-asynchronous + commit, and read scaling are **open tuning questions**, not + settled figures — this book records the shape, not numbers + the record does not carry. +- **Backups.** CNPG backups and WAL archiving go to an S3 + endpoint — under the 2026-11-24 object-storage verdict that + is the in-cluster SeaweedFS layer (Cozystack's bundled + `cozy-backups` SeaweedFS bucket) first, with the external + cold store as the off-cluster copy. See + [Object storage: RustFS and SeaweedFS](../platform/object-storage.md). +- **Relation to the estate's existing Postgres uses.** The + estate's Postgres today lives outside any cluster: the + `supabase-backups` R2 bucket in the backup topology below is + the record's named trace of a Supabase Postgres in the + backup set. CNPG in the cluster does not replace that estate + by declaration; whether any existing Postgres workload + migrates onto CNPG is a per-workload decision with no record + yet, and this book claims none. ## Local↔cloud sync: what exists today (proven, outside the cluster) @@ -77,19 +238,18 @@ From the idea register (2026-10-20), carried into epic #1085 / 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 +- **Cluster tiering direction:** object 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)). - The wider RustFS-versus-SeaweedFS object-storage question — - object storage, not this chapter's block storage — is - [Object storage: RustFS and SeaweedFS](../platform/object-storage.md). + CNPG Postgres backups to the in-cluster SeaweedFS S3 endpoint + (verdict of 2026-11-24, see the Postgres section above). The + wider object-storage verdict — + [Object storage: RustFS and SeaweedFS](../platform/object-storage.md) — + is object storage, not this chapter's block storage. - **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 — diff --git a/pkgs/lab/book/cluster/talos-and-cozystack.md b/pkgs/lab/book/cluster/talos-and-cozystack.md index cbb96d119..5a17e6482 100644 --- a/pkgs/lab/book/cluster/talos-and-cozystack.md +++ b/pkgs/lab/book/cluster/talos-and-cozystack.md @@ -17,7 +17,11 @@ that is proven. no longer an open evaluation.** It was researched in depth before the decision (CNCF Sandbox; LINSTOR on ZFS/DRBD for storage; Kube-OVN, Cilium and MetalLB for networking; SeaweedFS - buckets; KubeVirt; CNPG Postgres). Install epic: + buckets; KubeVirt; CNPG Postgres). Storage preference, settled + by Drew 2026-11-23: LINSTOR-first, and Ceph avoided where + possible — see + [Storage: LINSTOR and DRBD](storage-linstor-and-drbd.md). + 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" @@ -27,8 +31,9 @@ that is proven. - **Data services** as decided in the research brief: CloudNativePG managed Postgres (do not deploy a second operator), and S3 object storage — the RustFS-versus-SeaweedFS - question is now with a dedicated comparison lane, with Drew's - current lean to SeaweedFS because Cozystack ships it; see + verdict landed 2026-11-24 (record + `doc/2026-11-24T01-33-33Z_research_rustfs-vs-seaweedfs/`, PR + #13990): SeaweedFS stays as Cozystack's S3 layer; see [Object storage: RustFS and SeaweedFS](../platform/object-storage.md). Epic [#1088](https://github.com/developing-today/code/issues/1088) remains the programme home. diff --git a/pkgs/lab/book/cluster/the-cluster-programme.md b/pkgs/lab/book/cluster/the-cluster-programme.md index b22394ec2..2495f2cf6 100644 --- a/pkgs/lab/book/cluster/the-cluster-programme.md +++ b/pkgs/lab/book/cluster/the-cluster-programme.md @@ -8,7 +8,9 @@ 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). +[Boot and auto-join](boot-and-auto-join.md). The programme's +runtime-detection layer is +[Security: Falco runtime detection](../platform/security-and-falco.md). ## Structure of record @@ -78,8 +80,9 @@ ticketed programme. Component by component: | TALM bootstrap flow | Proven locally (containers); planned on bare metal. See [Talos and Cozystack](talos-and-cozystack.md). | | Cozystack | Planned — the platform is **chosen, settled by Drew 2026-11-23**; not yet installed. 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; the RustFS-versus-SeaweedFS decision is with the comparison lane (Drew's current lean: SeaweedFS, 2026-11-23); epic [#1088](https://github.com/developing-today/code/issues/1088). See [Object storage: RustFS and SeaweedFS](../platform/object-storage.md). | +| Postgres (CloudNativePG via Cozystack) | Planned — CloudNativePG + streaming replicas (Drew's lean; Cozystack's shipped operator); decision recorded in the research brief: use Cozystack's CNPG-based managed Postgres, do not deploy a second operator. Treatment in [Storage: LINSTOR and DRBD](storage-linstor-and-drbd.md). | +| RustFS (S3) | Planned; the RustFS-versus-SeaweedFS decision landed 2026-11-24: SeaweedFS stays as Cozystack's S3 layer, and RustFS is pilot-only for standalone large-object workloads outside Cozystack; epic [#1088](https://github.com/developing-today/code/issues/1088). See [Object storage: RustFS and SeaweedFS](../platform/object-storage.md). | +| Runtime detection (Falco) | Planned — adopted as the design's tripwire layer (Drew, 2026-11-23); not deployed. See [Security: Falco runtime detection](../platform/security-and-falco.md). | | 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. | @@ -155,8 +158,11 @@ CNPG Postgres plus RustFS provide data services. [#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.) + cross the home link with what must. Falco's unexpected-egress + watching is the planned detection side of this strategy — see + [Security: Falco runtime detection](../platform/security-and-falco.md). + (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 diff --git a/pkgs/lab/book/index.md b/pkgs/lab/book/index.md index 0de53b0fb..c2be3774e 100644 --- a/pkgs/lab/book/index.md +++ b/pkgs/lab/book/index.md @@ -53,7 +53,9 @@ is a deliverable, not an embarrassment. [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. + three design areas in turn. The storage chapter's design centre + is the tiered-storage design, and it carries the Postgres + treatment (CloudNativePG with streaming replicas). - **The network** — [Switches](network/switches.md) folds in the dedicated switching research: 21 devices, enriched in April 2026. - **Platform and toolchain** — the part added from the platform @@ -73,8 +75,9 @@ is a deliverable, not an embarrassment. [The pipes into Cloudflare and externally](platform/pipes-to-cloudflare.md), with shorter chapters on dev shells, clan, VMs and KubeVirt, Terraform, Crossplane, next-gen Nix tooling, build servers, - artifact repositories, automation and scaling, and the - RustFS-versus-SeaweedFS object-storage question. + artifact repositories, automation and scaling, the + RustFS-versus-SeaweedFS object-storage question, and + [Security: Falco runtime detection](platform/security-and-falco.md). - **Microcontrollers** — [ESP32](microcontrollers/esp32.md) covers the ESP32-S3 reference part, the ESP32-P4 tier, and the Tanmatsu. - **Roadmap and plans** — the diff --git a/pkgs/lab/book/operations/glossary.md b/pkgs/lab/book/operations/glossary.md index fb6734f67..fd41b940c 100644 --- a/pkgs/lab/book/operations/glossary.md +++ b/pkgs/lab/book/operations/glossary.md @@ -10,6 +10,10 @@ 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). +**Ceph** — A distributed storage system avoided where possible +in this estate (Drew, settled 2026-11-23); LINSTOR-first is the +direction. + **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 @@ -18,6 +22,8 @@ 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. +Runs as a primary with streaming replicas; see +[Storage: LINSTOR and DRBD](../cluster/storage-linstor-and-drbd.md). **DRBD** — Distributed Replicated Block Device: block-level replication between machines, managed by LINSTOR in the cluster @@ -28,6 +34,11 @@ loss needs the same failure on two at once. research inventory (32× QSFP28, SONiC). The dictated "DXO10" and the issue-title spelling "Celestia DX010" are the same device. +**Falco** — A runtime-detection tool (eBPF/syscall behaviour +watching); the design's tripwire layer — detection, not +prevention. Not deployed. See +[Security: Falco runtime detection](../platform/security-and-falco.md). + **LINSTOR** — The storage management layer in Cozystack that provisions DRBD-replicated volumes on ZFS. Design only in this programme. @@ -42,9 +53,10 @@ machine. **RustFS** — An S3-compatible object store, one of the two candidates for CNPG backups and buckets on the HDD pools. The -RustFS-versus-SeaweedFS verdict is deferred to the comparison -lane's dated record; Drew's current lean (2026-11-23) is -SeaweedFS, because Cozystack ships it. See +RustFS-versus-SeaweedFS verdict landed 2026-11-24: SeaweedFS +stays as Cozystack's S3 layer, and RustFS is pilot-only for +standalone large-object workloads outside Cozystack, +re-evaluated after a year of GA exposure. See [Object storage: RustFS and SeaweedFS](../platform/object-storage.md). **TALM** — `cozystack/talm`: the tool that templates and applies diff --git a/pkgs/lab/book/platform/automation-and-scaling.md b/pkgs/lab/book/platform/automation-and-scaling.md index edbdf2cb3..a8829b947 100644 --- a/pkgs/lab/book/platform/automation-and-scaling.md +++ b/pkgs/lab/book/platform/automation-and-scaling.md @@ -64,6 +64,13 @@ this: the ID currency-autoscaling design (#5825) is *application-level* scaling design — a stateless front end and its scaling triggers — not infrastructure autoscaling. +## Detection feeds — planned + +Falco's runtime detections are planned to feed this automation +layer as their consumer: the tripwire's alerts become automation +inputs (see [Security: Falco runtime detection](security-and-falco.md)). +No wiring exists; this is planned only. + ## Gaps - No written automation and scaling strategy ties these layers diff --git a/pkgs/lab/book/platform/object-storage.md b/pkgs/lab/book/platform/object-storage.md index b92003d2e..98ba0cfe5 100644 --- a/pkgs/lab/book/platform/object-storage.md +++ b/pkgs/lab/book/platform/object-storage.md @@ -2,10 +2,18 @@ The cluster needs an S3-compatible object store — for CloudNativePG backups, for buckets on the HDD pools, for the -cold tier. Two candidates are on the table, a comparison is -running, and **this chapter records the question and the state, -not a verdict**. Status: **researched; decision deferred** to -the comparison lane's dated record. +cold tier. Two candidates were compared, and **the verdict has +landed: SeaweedFS stays as Cozystack's S3 layer.** Status: +**decided (2026-11-24); not deployed** — there is no cluster. + +The verdict rests on the dated comparison record +`doc/2026-11-24T01-33-33Z_research_rustfs-vs-seaweedfs/` in the +code repository (PR +[#13990](https://github.com/developing-today/code/pull/13990), +record dated 2026-11-24), read in full for this update. Drew's +earlier lean to SeaweedFS (2026-11-23, because Cozystack ships +it) is **confirmed by that record's evidence**, and this chapter +now states the decision rather than deferring it. First, a distinction this book keeps plain: part 1's [Storage: LINSTOR and DRBD](../cluster/storage-linstor-and-drbd.md) @@ -13,55 +21,103 @@ is **block storage** — replicated volumes for workloads. This chapter is **object storage** — S3 objects in buckets. Different layers, different tools, no overlap in the choice. -## The two candidates +## The verdict (2026-11-24) + +- **SeaweedFS stays as Cozystack's S3 layer.** It is the object + store Cozystack ships — its buckets are SeaweedFS underneath, + and its bundled `cozy-backups` uses a SeaweedFS bucket — and + the comparison record's overall call for a Cozystack-shaped + estate is to stay on it: it won the record's independent + head-to-head on small-object write throughput and latency and + on object-count scaling, and it carries a decade of + production exposure. Adopting anything else inside Cozystack + would mean a second, self-managed S3 control surface with no + COSI `Bucket` or tenant integration. +- **RustFS is a credible pilot candidate only for standalone + large-object workloads outside Cozystack** — the shape where + the record's evidence favours it (large-object throughput, + small footprint, one binary, erasure coding at write time) — + **to be re-evaluated after a year of GA exposure.** It is not + the platform S3 layer, and per the record it is not yet to be + trusted with the platform's only copy of anything: its + 2025–2026 security record (a hardcoded gRPC token CVE in + pre-GA builds; an Object Lock bypass CVE) argues for the + waiting period. +- Programme home: epic + [#1088](https://github.com/developing-today/code/issues/1088). + +## SeaweedFS operating rules (guardrails of record) + +The record's data-loss investigation is part of the verdict: +SeaweedFS's real losses concentrate in maintenance tooling, +single-copy configurations and metadata-store failures — not in +acknowledged writes on replicated volumes — and each carries a +guardrail. Carried here in substance, as operating rules for +when the cluster exists: + +- **Use a SQL filer store — not LevelDB, not etcd.** The + record's fsck case ran on an etcd-backed filer whose store + still walks non-snapshot paths, and its metadata-corruption + case was a LevelDB filer store zeroed by a power loss; the + SQL filer stores carry the snapshot fix. +- **Back up the filer metadata** — scheduled filer-metadata + backups (`weed filer.meta.backup` in the record's wording). + The object data surviving while its metadata is lost is the + record's documented failure shape; the metadata is therefore + a backup item in its own right. +- **Never run fsck-delete during file moves** — never + `volume.fsck -reallyDeleteFromVolume` while clients are + moving files: the record's reproduction lost moved files + silently, with the loss masked until vacuum. +- **No scripted `-force` maintenance purges** — no automated + maintenance suite running `-force` delete/balance/rebuild + commands unattended; the record's disputed total-loss report + had exactly that ingredient. +- **Replication is never left at 000** for data that matters — + a single-copy (`defaultReplication=000`) configuration is + the other ingredient in that same report. +- **Pin versions rather than tracking latest** (the record's + recommended posture, carried with the guardrails above). + +## The two candidates, as compared - **RustFS** — an S3-compatible object store written in Rust. The research brief (2026-10-03) records RustFS 1.0 GA on 2026-09-16, and the cluster programme's brief designated RustFS as its S3 target for CNPG backups and buckets on the - HDD pools (part 1's - [The cluster programme](../cluster/the-cluster-programme.md)). + HDD pools. That designation is **superseded by the + 2026-11-24 verdict** above for everything inside Cozystack; + it survives only as the pilot candidacy outside it. - **SeaweedFS** — a distributed object and file store with an - S3 interface, and the object store **Cozystack ships**: its - buckets are SeaweedFS underneath, and its bundled - `cozy-backups` uses a SeaweedFS bucket. Cozystack is the - cluster's chosen platform (settled by Drew, 2026-11-23 — see + S3 interface, and the object store **Cozystack ships**. + Cozystack is the cluster's chosen platform (settled by Drew, + 2026-11-23 — see [Talos and Cozystack](../cluster/talos-and-cozystack.md)), so - SeaweedFS arrives with the platform whether or not it is also - chosen as the general store. - -## The state of the decision - -- **Drew's current lean, recorded as a lean** (2026-11-23): a - slight lean to **SeaweedFS, because Cozystack ships it**. A - lean is not a verdict, and this book does not promote it to + SeaweedFS arrives with the platform — and, per the verdict, + it is also the chosen general store, not merely the bundled one. -- **A comparison lane is running now** under the lab programme — - a separate lane weighing benchmarks, features, data-loss - stories, and Cozystack fit. Its dated record is forthcoming - and will land in `doc/` in the code repository. -- **The verdict is explicitly deferred to that record.** When it - lands, this book's sync rule (see - [Keeping this book current](../development/keeping-this-book-current.md)) - folds the verdict into this chapter and into the part 1 - chapters that name RustFS as the designated target. -- Programme home: epic - [#1088](https://github.com/developing-today/code/issues/1088). ## Gaps -- No benchmarks, feature comparisons, or data-loss records for - either candidate are in the record this book was written from; - producing them is the comparison lane's job, and this chapter - asserts none of them. -- Until the verdict lands, part 1's "designated S3 target" - wording for RustFS and this chapter's lean coexist as what - they are: a brief's designation and a recorded lean, with the - decision still open. +- No deployment exists: the verdict decides the layer, it does + not build it. Benchmarks and data-loss records are the + comparison record's, cited there; this chapter asserts none + beyond its summary. +- The RustFS re-evaluation has a condition (a year of GA + exposure) but no calendar owner yet; when it comes due, this + chapter's sync rule (see + [Keeping this book current](../development/keeping-this-book-current.md)) + is what folds the outcome back in. ## Sources -The cluster research brief and status records behind part 1 -(2026-10-03 / 2026-10-27), the platform census of 2026-11-23 -(PR [#13959](https://github.com/developing-today/code/pull/13959)), -and Drew's recorded lean of 2026-11-23. +The comparison record +`doc/2026-11-24T01-33-33Z_research_rustfs-vs-seaweedfs/` +(record dated 2026-11-24, PR #13990) — verdict, benchmark, +feature, project-health and data-loss sections and its +Cozystack-fit supplement; the cluster research brief and status +records behind part 1 (2026-10-03 / 2026-10-27); the platform +census of 2026-11-23 (PR +[#13959](https://github.com/developing-today/code/pull/13959)); +and Drew's recorded lean of 2026-11-23, confirmed 2026-11-24. +Updated 2026-11-24. diff --git a/pkgs/lab/book/platform/security-and-falco.md b/pkgs/lab/book/platform/security-and-falco.md new file mode 100644 index 000000000..49a485666 --- /dev/null +++ b/pkgs/lab/book/platform/security-and-falco.md @@ -0,0 +1,82 @@ +# Security: Falco runtime detection + +The cluster this book plans will run agent workloads — software +that shells out, reads credential files and talks to the network +as its normal mode of work. That makes the estate's runtime- +security question sharper than usual: the tripwire has to tell a +misbehaving or compromised workload from an agent doing its job. +**The design's tripwire layer is Falco (Drew, 2026-11-23).** +Status: **not deployed — candidate adopted as the design's +runtime-detection layer; there is no cluster to deploy it on.** + +## What Falco is in this design + +Falco is a runtime-detection tool: it watches system calls on a +host — via eBPF probes on modern kernels — and matches the +behaviour it sees against a rule set. In this estate's design +its job is **detection, not prevention**: Falco raises the +alarm; it does not block the call, kill the container or enforce +policy. Enforcement, where the design wants it, belongs to +other layers; Falco is the layer that notices. + +The behaviours it is adopted to watch for, named plainly: + +- **A shell spawned in a container** that has no business + running one — the classic first move after a workload is + compromised. +- **Reads of credential files** — a process opening secret or + credential material outside its expected paths. +- **Unexpected egress** — a workload opening network + connections its role does not explain, in an estate whose + egress strategy is deliberately narrow (see + [The cluster programme](../cluster/the-cluster-programme.md)). + +For an estate running agent workloads, those three are the +tripwire's centre: each is something an agent *can* do +legitimately in the right context and an intruder *must* do in +almost any context, which is exactly what makes the tuning cost +below real rather than hypothetical. + +## The tuning cost, stated honestly + +Falco's cost is not the probe; it is the rule set. A stock rule +set on an estate full of agents — which spawn shells, read +credentials and make network calls as their day job — will +produce a false-positive load that trains its operators to +ignore it, and an ignored tripwire is worse than none. The +design therefore carries, as known and accepted costs: + +- **Per-workload rule tuning:** the expected-behaviour profile + differs per workload, and writing it is real work that lands + with each workload, not once for the cluster. +- **An alert-triage habit:** detections need a named place to + go and a human or agent routine that reads them; Falco + without a consumer is log volume, not security. The natural + consumer is the estate's automation layer — see + [Automation and automated scaling](automation-and-scaling.md) — + but no wiring exists and none is claimed. +- **Kernel/eBPF fit on Talos:** Falco's eBPF delivery on an + immutable, declarative OS like Talos is a deployment question + to prove at install time, not a property this book asserts. + +## Where it sits in the programme + +- Cluster home: the cluster programme's platform-services and + observability work (epics + [#1088](https://github.com/developing-today/code/issues/1088) + and + [#1090](https://github.com/developing-today/code/issues/1090)) — + see [The cluster programme](../cluster/the-cluster-programme.md), + which cross-links this chapter. +- It watches workloads; it does not replace the estate's other + boundaries (egress design, secrets handling, declarative + rebuild-from-config), and this chapter claims no coverage + beyond runtime behaviour on cluster nodes. + +## Current state + +**Not deployed.** No Falco configuration, rule set or alert +route exists anywhere in the estate today. What exists is this +decision of record (Drew, 2026-11-23): Falco is the adopted +candidate for the runtime-detection layer, to be installed and +tuned when a cluster exists to run it on.