docs: DooPlex-local commands in PROMPT-TEMPLATE and the manual-build runbook
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# RUNBOOK — manual build / deploy / publish (agent · controller · golden · hub)
|
||||
|
||||
**Audience:** the operator, from the Windows workstation (Git Bash), same environment CC uses.
|
||||
**Audience:** the operator, on DooPlex (192.168.0.180, Debian 13) — the same environment CC uses.
|
||||
Builds are local commands; felhom-pve is one `ssh` hop.
|
||||
**Written:** 2026-07-11, from the verified `felhom.eu/skills/felhom-build-deploy/SKILL.md` command set
|
||||
+ the publish-train procedure (`documentation/pilot/RUNBOOK-publish-0.79-0.110-2026-07-10.md`) +
|
||||
`documentation/runbooks/publish-train-rules.md`. If this doc and the skill ever disagree, the skill wins.
|
||||
@@ -28,15 +29,16 @@ acts immediately; save it LAST). Rules: `publish-train-rules.md`.
|
||||
## 1. Session setup (every session, first)
|
||||
|
||||
```bash
|
||||
SSH=/c/Windows/System32/OpenSSH/ssh.exe # Git Bash's own ssh fails silently against the Windows agent
|
||||
export MSYS_NO_PATHCONV=1 # before any felhom-pve command with absolute paths (pct etc.)
|
||||
FELHOM_ROOT=/mnt/5_hdd/felhom.eu # build-server working root: ALL felhom repos/build/drill/iso moved HERE 2026-07-18
|
||||
FELHOM_ROOT=/mnt/5_hdd/felhom.eu # working root: ALL felhom repos/build/drill/iso live HERE
|
||||
```
|
||||
|
||||
**Clean-tree gate before any build:** `git status --porcelain` must be empty and `git rev-parse HEAD`
|
||||
must equal `git rev-parse origin/main` in the repo being built. An unpushed change does not exist.
|
||||
|
||||
| Host | Access | Role |
|
||||
|---|---|---|
|
||||
| Build server | `$SSH kisfenyo@192.168.0.180` | builds (`$FELHOM_ROOT/git/felhom-agent`, `$FELHOM_ROOT/build/felhom-controller`, `$FELHOM_ROOT/build/felhom-hub`), kubectl |
|
||||
| Demo PVE host | `$SSH felhom-pve` (root@192.168.0.162) | agent install, `pct exec 9201` |
|
||||
| DooPlex (this host) | local | builds (`$FELHOM_ROOT/git/felhom-agent`, `$FELHOM_ROOT/build/felhom-controller`, `$FELHOM_ROOT/build/felhom-hub`), kubectl |
|
||||
| Demo PVE host | `ssh felhom-pve` (root@192.168.0.162) | agent install, `pct exec 9201` |
|
||||
| Hub UI | hub.felhom.eu → Configuration | manifest vouch, MinAgent, floor (operator password) |
|
||||
|
||||
Housekeeping note: `$FELHOM_ROOT/build/felhom-agent` on 180 is a stale pre-June-23 leftover — agent
|
||||
@@ -48,14 +50,13 @@ Always commit+push to `main` first (an unpushed change does not exist).
|
||||
|
||||
```bash
|
||||
# BUILD on 180 (the explicit git pull is load-bearing)
|
||||
$SSH kisfenyo@192.168.0.180 "cd $FELHOM_ROOT/git/felhom-agent && git pull && go build -ldflags '-X main.version=<VER>' -o /tmp/felhom-agent-<VER> ./cmd/felhom-agent"
|
||||
cd $FELHOM_ROOT/git/felhom-agent && git pull && go build -ldflags '-X main.version=<VER>' -o /tmp/felhom-agent-<VER> ./cmd/felhom-agent
|
||||
|
||||
# FETCH locally, PUSH to the PVE host (Windows scp needs cygpath for the local side)
|
||||
scp kisfenyo@192.168.0.180:/tmp/felhom-agent-<VER> "$(cygpath -w /tmp/felhom-agent-<VER>)"
|
||||
scp "$(cygpath -w /tmp/felhom-agent-<VER>)" felhom-pve:/tmp/
|
||||
# PUSH to the PVE host — ONE hop, the binary is already local
|
||||
scp /tmp/felhom-agent-<VER> felhom-pve:/tmp/
|
||||
|
||||
# DEPLOY with backup + restart + verify
|
||||
$SSH felhom-pve "cp /usr/local/bin/felhom-agent /usr/local/bin/felhom-agent.bak-\$(/usr/local/bin/felhom-agent --version | awk '{print \$2}') && install -m0755 /tmp/felhom-agent-<VER> /usr/local/bin/felhom-agent && systemctl restart felhom-agent && sleep 3 && /usr/local/bin/felhom-agent --version && journalctl -u felhom-agent -n 20 --no-pager"
|
||||
ssh felhom-pve "cp /usr/local/bin/felhom-agent /usr/local/bin/felhom-agent.bak-\$(/usr/local/bin/felhom-agent --version | awk '{print \$2}') && install -m0755 /tmp/felhom-agent-<VER> /usr/local/bin/felhom-agent && systemctl restart felhom-agent && sleep 3 && /usr/local/bin/felhom-agent --version && journalctl -u felhom-agent -n 20 --no-pager"
|
||||
```
|
||||
|
||||
Gotchas (earned): if `configs/` changed in the repo, ship the **sudoers + guarded wrapper WITH the
|
||||
@@ -83,13 +84,13 @@ artifact manifest**. (This save does NOT move the floor — that's a separate ca
|
||||
|
||||
```bash
|
||||
# BUILD+PUSH the image (build.sh does NOT pull — the explicit pull is load-bearing)
|
||||
$SSH kisfenyo@192.168.0.180 "cd $FELHOM_ROOT/build/felhom-controller && git -C $FELHOM_ROOT/git/felhom-controller pull && ./build.sh <VER> --push"
|
||||
cd $FELHOM_ROOT/build/felhom-controller && git -C $FELHOM_ROOT/git/felhom-controller pull && ./build.sh <VER> --push
|
||||
|
||||
# DEPLOY on the demo guest
|
||||
$SSH felhom-pve "pct exec 9201 -- bash -c 'docker pull gitea.dooplex.hu/admin/felhom-controller:<VER> && echo gitea.dooplex.hu/admin/felhom-controller:<VER> > /etc/felhom-controller-image && systemctl restart felhom-controller-bootstrap.service'"
|
||||
ssh felhom-pve "pct exec 9201 -- bash -c 'docker pull gitea.dooplex.hu/admin/felhom-controller:<VER> && echo gitea.dooplex.hu/admin/felhom-controller:<VER> > /etc/felhom-controller-image && systemctl restart felhom-controller-bootstrap.service'"
|
||||
|
||||
# VERIFY
|
||||
$SSH felhom-pve "pct exec 9201 -- docker ps --filter name=felhom-controller --format '{{.Image}} {{.Status}}'"
|
||||
ssh felhom-pve "pct exec 9201 -- docker ps --filter name=felhom-controller --format '{{.Image}} {{.Status}}'"
|
||||
```
|
||||
|
||||
**Remote rollout** = the hub floor (Configuration → Managed updates). Order rules (train rules doc):
|
||||
@@ -120,20 +121,20 @@ tag changes in git and the ArgoCD app is deliberately synced (auto-sync is OFF;
|
||||
`kubectl set image`, never `:latest`).
|
||||
|
||||
```bash
|
||||
$SSH kisfenyo@192.168.0.180 "cd $FELHOM_ROOT/build/felhom-hub && ./build.sh <VER> --push"
|
||||
cd $FELHOM_ROOT/build/felhom-hub && ./build.sh <VER> --push
|
||||
# edit manifests/hub.yaml image tag → <VER>; commit; push
|
||||
$SSH kisfenyo@192.168.0.180 "sudo kubectl -n argocd annotate application felhom argocd.argoproj.io/refresh=hard --overwrite; sleep 8; sudo kubectl -n argocd get application felhom -o jsonpath='{.status.sync.status} {.status.sync.revision}{\"\n\"}'"
|
||||
$SSH kisfenyo@192.168.0.180 "sudo kubectl -n argocd patch application felhom --type merge -p '{\"operation\":{\"initiatedBy\":{\"username\":\"op\"},\"sync\":{\"syncStrategy\":{\"apply\":{}}}}}'"
|
||||
sudo kubectl -n argocd annotate application felhom argocd.argoproj.io/refresh=hard --overwrite; sleep 8; sudo kubectl -n argocd get application felhom -o jsonpath='{.status.sync.status} {.status.sync.revision}{"\n"}'
|
||||
sudo kubectl -n argocd patch application felhom --type merge -p '{"operation":{"initiatedBy":{"username":"op"},"sync":{"syncStrategy":{"apply":{}}}}}'
|
||||
# verify: Synced/Healthy + rollout + live image tag + logs
|
||||
$SSH kisfenyo@192.168.0.180 "sudo kubectl -n argocd get application felhom -o jsonpath='sync={.status.sync.status} health={.status.health.status}{\"\n\"}'; sudo kubectl -n felhom-system rollout status deploy/hub --timeout=90s; sudo kubectl -n felhom-system get deploy hub -o jsonpath='{.spec.template.spec.containers[0].image}'; echo; sudo kubectl -n felhom-system logs -l app=hub --tail 10"
|
||||
sudo kubectl -n argocd get application felhom -o jsonpath='sync={.status.sync.status} health={.status.health.status}{"\n"}'; sudo kubectl -n felhom-system rollout status deploy/hub --timeout=90s; sudo kubectl -n felhom-system get deploy hub -o jsonpath='{.spec.template.spec.containers[0].image}'; echo; sudo kubectl -n felhom-system logs -l app=hub --tail 10
|
||||
```
|
||||
|
||||
## 6. "What's live right now?" one-liners
|
||||
|
||||
```bash
|
||||
$SSH felhom-pve "/usr/local/bin/felhom-agent --version" # agent on demo
|
||||
$SSH felhom-pve "pct exec 9201 -- cat /etc/felhom-controller-image" # controller on demo
|
||||
$SSH kisfenyo@192.168.0.180 "sudo kubectl -n felhom-system get deploy hub -o jsonpath='{.spec.template.spec.containers[0].image}'" # hub
|
||||
ssh felhom-pve "/usr/local/bin/felhom-agent --version" # agent on demo
|
||||
ssh felhom-pve "pct exec 9201 -- cat /etc/felhom-controller-image" # controller on demo
|
||||
sudo kubectl -n felhom-system get deploy hub -o jsonpath='{.spec.template.spec.containers[0].image}' # hub
|
||||
# published = the hub Configuration dropdowns (they read Gitea packages live)
|
||||
# fleet = hub Dashboard per-host rows (agent_version + controller version per box)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user