Hot-Patch: Live Updates Without A Full Redeploy¶
For iterating on a single mock's server.py, or pushing a new aipostex binary to the attack
box, without re-running deploy-all.sh. Both edit the running estate directly.
⚠ A hot-patch lives on the running VMs only.
lab-ready/reset-wave.shrestore the snapshot, so the change does not survive a reset unless you re-snapshotlab-ready(see Snapshots & Teardown). That is deliberate — the reset guarantees a clean baseline every wave.
Hot-Patch A Single Mock¶
Mock services run from /home/mluser/projects/<name>-mock/server.py as systemd unit
<name>-mock (user mluser) — the same copy → chown → restart pattern each provision.sh
applies (e.g. lab-scripts/ml-platform/provision.sh), narrowed to one service. The estate
/24 is reachable only from the Proxmox host, so the file travels dev → Proxmox → VM.
-
Edit the source of record locally:
lab-scripts/<role>/<name>-mock/server.py(<role>=dev-workstation|ml-platform|data-sci|app-platform). -
Sync to Proxmox (the deploy origin; repo at
/root/aipostex-lab): -
Ship to the VM and restart (from Proxmox; reach VMs as
labadmin, key auth —root@<vm>scp is rejected):VM=<vm-ip>; NAME=<name>; ROLE=<role> scp /root/aipostex-lab/lab-scripts/$ROLE/$NAME-mock/server.py labadmin@$VM:/tmp/server.py ssh labadmin@$VM "sudo cp /tmp/server.py /home/mluser/projects/$NAME-mock/server.py \ && sudo chown mluser:mluser /home/mluser/projects/$NAME-mock/server.py \ && sudo systemctl restart $NAME-mock" -
Verify the restart took and the surface responds:
ssh labadmin@$VM "systemctl is-active $NAME-mock && curl -sf http://localhost:<port>/<health> | head"Or run the full health gate:
bash lab-scripts/verify-lab.sh.
VM IPs and ports: VM Map. The systemd unit name and on-VM path
for any service are in that role's provision.sh (grep systemctl restart <name>-mock).
Update The aipostex Binary On The Attack Box¶
The attack box has no Go and no internet — cross-compile on dev and scp the binary in.
-
Cross-compile (linux/amd64, stamped with the commit) from the
aipostextool repo: -
Install over one SSH — backs up the current binary, installs the piped one, prints version:
-
Re-verify end-to-end from the box:
⚠
lab-ready/reset-wave.shinclude the attack box (qm 240). A reset reverts the binary to the snapshot's copy, so re-snapshotlab-readyafter deploying if the new binary must survive resets (Snapshots & Teardown).