Memory-file flush for the dotfiles-deploy session with the blankpad admin credential scrubbed to a placeholder; sessions transcripts untracked (gitignored) since harness transcripts can carry raw secrets. Managed skills: command-center-dotfiles-import, ssh-fish-host-remote-exec, stash-supersession-audit-before-drop.
3.8 KiB
3.8 KiB
name, description
| name | description |
|---|---|
| command-center-dotfiles-import | Runbook for deploying the command-center repo (dotfiles env layer + OMP harness) to fleet machines via full-replica rsync and deploy.sh, including override-package mechanics and ssh/sshpass transport gotchas; executed end-to-end on blankpad 2026-09-09. |
Command-center fleet deployment (repo = deployment)
Repo ~/.omp is itself the deployment: packages are home-relative trees under dotfiles/<pkg>/; scripts/deploy.sh symlinks live files into the repo checkout. git pull + deploy.sh is the whole propagation story.
Transport decision (agreed with Frank, executed 2026-09-09)
- Ship via full-replica rsync of
/home/dank/.omp/including.gitto<user>@<host>:/home/<user>/.omp/, NOT clone-from-Gitea —maincan be ahead oforigin/main; push is a user-only trigger, so clone would ship stale state. - Deploy runs on-target as the target user:
bash /home/<user>/.omp/scripts/deploy.sh(resolves repo viagit -C $(dirname $(realpath $0)) rev-parse --show-toplevel, so.gitmust be present at target path — full-replica transport guarantees this).
Pre-overwrite audit (MANDATORY before first sync on a non-blank host)
Diff every file that deploy.sh --check reports as DRIFT against the repo copy BEFORE letting quarantine-and-replace run. Host-specific divergence belongs in an override package, not in quarantine:
- Pull divergent live files from target (
ssh ... 'cat <path>' > local-staged-copy). - Secret-audit staged copies (grep token/secret/password/key shapes) before anything enters git.
- Compose
dotfiles/zz-<hostname>/on the source machine from those live copies; commit to repo first. - Ship package dir via rsync, then run deploy sync — override deploys LAST and wins over base packages.
deploy.sh mechanics (verified on blankpad)
--check= pure report (ADOPT/LINK/DRIFT lines), writes nothing. Run it first, always.- Default mode = sync: adopt identicals silently, link new, quarantine-and-replace divergents into
.quarantine/<host>/<ts>/(gitignored; never rm). - Override-target bug (fixed
cc2c652):zz-<host>packages nest base-package dirs internally (zz-blankpad/niri/.config/...); target derivation must strip the nested package segment, else overrides deploy to phantom$HOME/niri/.config/...while real targets keep pointing at canonical copies (visible symptom: check shows 0 actions butreadlink ~/.zshrcpoints at basezsh/.zshrc). - systemd units auto-enable only when ExecStart binary resolves on that host; dconf package loads via
dconf load /, never symlinks. core.hooksPath=.githooksis armed by deploy.sh per machine — set it once post-transfer even before first sync.
ssh/sshpass transport gotchas (bit us live)
- Resolve target via mDNS FQDN (
avahi-resolve -4 -n <host>.local); bare hostname may not resolve. Drop-not-refuse on port 22 = sshd down or firewall default-drop, not auth failure — needs local/console fix on target. SSHPASS='...' sshpass -e ssh ...inline per invocation; env passed via toolenvparam did not propagate to the sshpass child process.- Remote login shell may be fish: never send bash syntax (
for/do/done,$?) bare throughssh host 'cmd'; wrap asbash /path/script.shorbash -c "...". - File shipping:
ssh 'cat > /remote/path' < localfile(stdin redirect). A here-doc attached to the ssh command is consumed bycat— the intended script body becomes the file content, silently. Verify shipped bytes with md5sum compare on both ends; do NOT compare/dev/stdinaftercatdrained it (false DIVERGED).
Verification of a completed deploy
Re-run deploy.sh --check → expect exactly zero actions/quarantined/skipped = idempotent steady state. Spot-check readlink on override files points into dotfiles/zz-<host>/, not base packages.