Merge pull request 'docs(plan): replace Track C with 3 USB→disk deploy strategies' (#90) from docs/usb-to-disk-deploy-strategies into main
Reviewed-on: #90
This commit is contained in:
commit
e4ff0a9bd3
1 changed files with 61 additions and 26 deletions
|
|
@ -124,39 +124,74 @@ hook so regressions are caught on the next build.
|
||||||
later round once the data is in.
|
later round once the data is in.
|
||||||
- VSCode / Cursor. Stay off the live image — see project memory.
|
- VSCode / Cursor. Stay off the live image — see project memory.
|
||||||
|
|
||||||
### Track C — Disk deployment progression (first step)
|
### Track C — Disk deployment: USB → bare metal
|
||||||
|
|
||||||
**Goal:** unblock the disk-install path so it can consume
|
**Goal:** deploy the Clawdie service from a booted operator USB onto bare
|
||||||
`pkg-list-disk-install-extras.txt`. Per `AGENTS.md`: "The disk-install path
|
FreeBSD hardware.
|
||||||
does not consume `pkg-list-disk-install-extras.txt` yet."
|
|
||||||
|
|
||||||
This round does **not** ship a full installer. It sets up the plumbing.
|
The `clawdie` binary (Rust, in `crates/clawdie` in Colibri) already does
|
||||||
|
`discover` → `plan` → `apply` for ZFS layout + rc.d service + clawdie user.
|
||||||
|
What's missing is the USB → disk workflow. Three strategies, ascending in
|
||||||
|
automation:
|
||||||
|
|
||||||
**Steps:**
|
#### Strategy C1: Direct CLI (validate now, ship immediately)
|
||||||
|
|
||||||
1. **Profile selection scaffold.** `firstboot/shell-desktop.sh` (or a new
|
```
|
||||||
`shell-profile.sh`) reads a `CLAWDIE_PROFILE` value with three valid
|
clawdie discover # see pools, confirm target
|
||||||
options: `xfce` (default), `kde`, `headless`. Wire from
|
clawdie plan --pool tank # review ZFS layout, datasets, rc.d
|
||||||
`/tmp/clawdie-install.conf` for now — no GUI surface yet.
|
clawdie apply --pool tank --yes # provision: datasets, user, rc.d service
|
||||||
2. **Disk-install pkg step.** New function
|
```
|
||||||
`clawdie_shell_pkg_install_disk_extras` in `firstboot/shell-pkg.sh`
|
|
||||||
that installs every package in `packages/pkg-list-disk-install-extras.txt`
|
**What exists:** `discover`, `plan`, and `apply --yes` are built and
|
||||||
from the bundled offline repo, gated by profile (the `kde` profile
|
unit-tested. `plan` + dry-run `apply` validated on FreeBSD host (osa).
|
||||||
will later pull `pkg-list-kde.txt`; not creating that file yet).
|
**Gap:** `apply --yes` has not been run destructively on a scratch pool.
|
||||||
3. **Hook from `firstboot.sh`.** Call the new function after base
|
**Effort:** 1 destructive test on a VM/scratch pool. Zero new code.
|
||||||
firstboot completes, before `clawdie_shell_deploy_*` runs.
|
|
||||||
4. **Bhyve validation test.** A shell script under `scripts/` that boots the
|
#### Strategy C2: Guided firstboot wizard
|
||||||
built image in bhyve, runs the disk-install path with
|
|
||||||
`CLAWDIE_PROFILE=xfce`, and asserts `blender` (the roadmap-essential
|
A `/usr/local/sbin/clawdie-setup` shell script (or firstboot hook):
|
||||||
member of disk-install-extras) ends up installed on the target disk.
|
1. Run `clawdie discover`, show available pools
|
||||||
Bhyve is suitable for plumbing verification; use real hardware for
|
2. Prompt: "Which pool?"
|
||||||
graphical validation — leave that for Track A/E on real hardware.
|
3. Show `clawdie plan --pool <chosen>` for review
|
||||||
|
4. Prompt: "Deploy? [y/N]"
|
||||||
|
5. Run `clawdie apply --pool <chosen> --yes`
|
||||||
|
6. Print success, point at `service clawdie start`
|
||||||
|
|
||||||
|
**Effort:** ~60 lines shell script + firstboot wiring. A day's work.
|
||||||
|
**Depends on:** C1 validated first.
|
||||||
|
|
||||||
|
#### Strategy C3: Declarative config (repeatable, auto-deploy)
|
||||||
|
|
||||||
|
A `/etc/clawdie/deploy.toml` on the USB's FAT32 partition (editable from
|
||||||
|
any OS before boot):
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[host]
|
||||||
|
hostname = "clawdie-host"
|
||||||
|
pool = "tank"
|
||||||
|
|
||||||
|
[zfs]
|
||||||
|
raid = "mirror"
|
||||||
|
disks = ["da0", "da1"] # only if creating a new pool
|
||||||
|
|
||||||
|
[services]
|
||||||
|
postgresql = true # install + enable PostgreSQL + pgvector
|
||||||
|
bhyve = true # install bhyve + vm-bhyve
|
||||||
|
```
|
||||||
|
|
||||||
|
Boot behavior:
|
||||||
|
- If `/etc/clawdie/deploy.toml` present → `clawdie apply --config …` runs on boot
|
||||||
|
- If absent → boots to desktop (operator USB mode)
|
||||||
|
|
||||||
|
**Effort:** Config schema + parser in `clawdie` crate (~120 lines Rust).
|
||||||
|
Firstboot auto-detect (~15 lines shell). A week of work.
|
||||||
|
**Depends on:** C1 validated first.
|
||||||
|
|
||||||
**Definition of done:**
|
**Definition of done:**
|
||||||
|
|
||||||
- One commit per step. Each step compiles and passes existing tests
|
- [ ] C1: `apply --yes` tested on scratch pool. `FIRSTBOOT.md` documents the CLI path.
|
||||||
before the next is added.
|
- [ ] C2: `clawdie-setup` script exists, wired into firstboot, tested in bhyve.
|
||||||
- A documented "what happens on disk install" paragraph in `FIRSTBOOT.md`.
|
- [ ] C3: `deploy.toml` schema defined, parser in `clawdie`, auto-detect on boot.
|
||||||
|
|
||||||
### Track D — Hardware detection pipeline refinement
|
### Track D — Hardware detection pipeline refinement
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue