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
Add fleet config: server groups, plural targets, per-server isolation
Groundwork for running one app on several servers. Nothing rolls yet — this
is the config and resolution layer the rolling deploy will sit on.
An app's `on` becomes a server name, a group name, or a list of either.
Groups are declared workspace-level and expand at resolution time, so
`.group('web', ['web-a','web-b'])` + `.on('web')` puts one app on two boxes.
Resolving to more than one server is what makes an app a fleet: assembly
fills in rolling defaults (batch 1, port 80, 30s drain, /_shipnode/ready)
so nothing downstream has to ask "is this a fleet?" twice and get two
answers. Declaring `fleet` explicitly opts a single-server app into the same
contract, which is how you get behind a load balancer before scaling out.
servers.ts goes plural. resolveServerName -> resolveServerNames returning a
list, with resolveSingleServerName kept for the things that genuinely cannot
be replicated — an accessory's host, a `run` invocation, a monitor session.
That one errors naming the candidates instead of silently picking the first,
because operating on the wrong replica is worse than being asked which.
getAppsForServer stops being a partition: a fleet app appears under each of
its replicas, or deploy would skip all but one.
Two things the schema now refuses. An accessory, database or redis pointed at
a group — shipnode does not replicate managed services, and doing so would
start two unrelated databases rather than a cluster. And a fleet whose
servers have no privateHost, since the load balancer has to reach each
replica directly and the public SSH host is not necessarily that address.
The fan-out no longer abandons the remaining servers when one fails. The
try/catch moves inside the loop, failures are collected per server and
reported together, and the process exits non-zero if any failed — a
half-finished fan-out with no account of what happened is worse than a slow
one. `--app` now also narrows which servers are visited rather than only
validating the name, so an unrelated unreachable server stops sinking a
command scoped to one app.
0 commit comments