Expand description
Stacks: a compose file deployed to the isb serve daemon, which keeps it
running the way docker swarm keeps a stack running, on one host.
The daemon’s desired state is a file per stack under its state directory,
and every instance it creates carries user.isb.stack, user.isb.service,
user.isb.slot and user.isb.rev. Both survive a daemon restart, so a new
daemon picks up exactly where the last one stopped. Apps never depend on
the daemon being alive: they are supervised inside their guests (see
crate::supervise) and start with the host.
- A service has
deploy.replicasslots. Each slot holds one instance, named<stack>-<service>-<slot>-<id>. - A service’s revision is a hash of everything that shapes an instance. An
instance whose revision is not the current one is replaced, in batches,
per
deploy.update_config. - Published host ports are served by the daemon’s load balancer
(
crate::balance), which only sends traffic to healthy replicas, so astart-firstrollout has no gap.
Re-exports§
pub use controller::Controller;pub use secrets::SecretBinding;
Modules§
- controller
- The reconciler behind
isb serve: one worker thread per service keeps its replicas created, current, running, healthy and in the load balancer. - failure
- Why a replica did not come up.
- migrate
- Upgrading stored stacks whose definitions held secret values.
- secrets
- A stack’s secrets: references into its org’s store, by name and version.
Structs§
- Stack
Def - A deployed stack, as the daemon stores it.
- Store
- Where stack definitions live:
$XDG_STATE_HOME/isb(else~/.local/state/isb), one 0600 file per stack understacks/.
Constants§
- LABEL_
REV - LABEL_
SERVICE - LABEL_
SLOT - LABEL_
STACK - Instance config keys (without
user.) that tie an instance to its stack.
Functions§
- instance_
name <stack>-<service>-<slot>-<id>, checked against incus’ 63-character limit.- local_
deploy_ args - Resolve the paths the local CLI sends with a deploy: the project’s own
directory, so relative binds and
file:secrets work as withisb up. - new_id
- A short random id for a new instance.
- now_
secs - qualified
- A stack’s name qualified by its org:
webin the default org,alpha/webin orgalpha. The controller keys everything by it. - split_
qualified - The org and name of a qualified stack name.
- validate_
stack_ name - Valid stack name: what an instance name prefix allows.