You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): deploy fresh-host bootstrap — proxy start_or_run per host, kamal network, real setup() (#3162)
Wave 2a of the #2957 deploy-orchestration campaign:
- DEP-5a: the proxy boot guard was details() || boot(), but details()
(docker ps --filter) exits 0 whether or not the proxy exists, so
boot() was unreachable and kamal-proxy never started on a fresh host.
Replaced with Kamal's Proxy##start_or_run shape:
docker start kamal-proxy || docker run ... (ProxyCommands.start_or_run).
- DEP-5b: the guard was dispatched to ONE host via $dispatchAny; the
proxy now boots on every proxy-fronted host via $dispatch/onEach.
- DEP-5c: DockerCommands.create_network had zero call sites while every
app/proxy/accessory docker run joins --network kamal. New
ensure_network() (inspect probe || create, idempotent) is dispatched
to all app hosts during deploy and to accessory hosts during setup.
- setup() was literally 'return deploy(opts)'. It now runs a real setup
phase: kamal network create + accessory boot on each accessory's
hosts, then the full deploy (Kamal setup semantics). Deploy body
extracted to $deploy() so setup's bootstrap commands survive into
dryRunOutput().
- Proxy gating: kamal-proxy deploy fired for EVERY role; it is now
gated to proxy-fronted roles via Role.runningProxy() (explicit
role-level proxy: boolean/hash wins, default true only for web),
matching Kamal's Role##running_proxy?.
Verified with FakeSshPool specs (fresh-host sequence ordering,
multi-host proxy iteration, setup!=deploy, proxy gating) and dry-run
flows; real SSH/docker-remote is unverifiable in-harness. Full CLI
suite in the lucee7 docker harness: 1005 pass / 0 fail / 2 tolerated
docker-env artifacts (SshClientSpec/SshPoolSpec docker-not-found).
Refs #2957
Signed-off-by: Peter Amiri <peter@alurium.com>
-`wheels deploy` now works on fresh hosts: the kamal-proxy boot guard `details() || boot()` never reached `boot()` (`docker ps` exits 0 whether or not the proxy exists) and was dispatched to only one host — the proxy is now booted via Kamal's `docker start kamal-proxy || docker run ...` (`ProxyCommands.start_or_run()`) on every proxy-fronted host; the `kamal` docker network, previously never created (zero `create_network` call sites while every app/proxy/accessory `docker run` joins `--network kamal`), is now idempotently ensured on every host before the first consumer; `wheels deploy setup` is a real setup phase (network create + accessory boot on accessory hosts, then deploy) instead of a literal `deploy()` alias; and `kamal-proxy deploy` registration is gated to proxy-fronted roles (role-level `proxy:` boolean, defaulting to the `web` role) instead of firing for every job/worker role (#2957)
0 commit comments