R2 runbook: preparing the two Macs (PROPOSED, not approved)
Status: PROPOSED. One-time setup for the R2 two-Mac variant of the feeder-under-load protocol. Nothing here has been done; the maintainer performs it, and only after approving the variant and confirming that both Macs are available. It changes nothing in the repository.
Host K is the Apple M3 that runs Knotrel; host L is the MacBook Pro M4 that runs PostgreSQL, the feeder and the load tool. Every arm is driven from host L; host L connects to host K over SSH, never the other way.
Host L (load)
- Toolchain and checkout. Rust 1.100.0 (
rustup toolchain install 1.100.0), Git, Docker Desktop. Clone the repository to$HOME/knotrel-r2/knotreland check out the commit that adds the R2 variant (record it). -
Build the feeder and the load tool:
cd "$HOME/knotrel-r2/knotrel/integrations/postgres-feeder" cargo build --release --locked --bins --example load shasum -a 256 target/release/knotrel-pg-feeder target/release/examples/load -
PostgreSQL container. Start Docker Desktop, then check that the pinned 18.7 image starts and stops (this pulls it once):
scripts/start-test-postgres.sh 18 && scripts/stop-test-postgres.sh 18During arms T and U the container runs on host L only; the arm commands start and stop it.
- Link. Connect the two Macs with a Thunderbolt or Ethernet cable and
note host K’s address on that interface as
KADDR(System Settings → Network → Thunderbolt Bridge, orifconfig bridge0on host K). Wi-Fi may stay on for other traffic, butroute get KADDRmust name the wired interface. -
SSH key for host K. A dedicated key and an alias that goes over the link:
ssh-keygen -t ed25519 -f ~/.ssh/knotrel_r2 -C knotrel-r2 ssh-copy-id -i ~/.ssh/knotrel_r2.pub <user on K>@KADDRand in
~/.ssh/config:Host hostk HostName KADDR User <user on K> IdentityFile ~/.ssh/knotrel_r2 IdentitiesOnly yesCheck that it needs no prompt (the tool uses
BatchMode=yes):ssh -o BatchMode=yes hostk 'sysctl -n hw.ncpu'prints 8.
Host K (Knotrel)
- Remote Login on (System Settings → General → Sharing → Remote Login), limited to the maintainer’s user.
-
Server under test, at the same path layout as host L:
git -C "$HOME/knotrel-r2/knotrel" worktree add "$HOME/knotrel-r2/knotrel-v0.9.0" v0.9.0 cd "$HOME/knotrel-r2/knotrel-v0.9.0" && cargo build -p knotrel-server --release --locked shasum -a 256 target/release/knotrel-server - Feeder and load tool at the same commit as host L, built the same way (arm S runs them on host K; arm U uses the load binary as its busy loop).
- PostgreSQL image pulled for arm S (
scripts/start-test-postgres.sh 18 && scripts/stop-test-postgres.sh 18with Docker Desktop running). Docker Desktop is quit after arm S. - Firewall. Either the macOS firewall is off on host K, or
knotrel-serveris allowed to accept incoming connections: start it once bound toKADDRand answer the dialog, so that no dialog is pending on host K’s screen during the session.
Before the session
Go through the pre-flight checklist of the variant. Then follow its commands in order S, T, U, and the decision, in one session.