muster fleet

muster fleet

Deploy one project to many servers, over SSH or Fleet Cloud.

Synopsis

Terminal
muster fleet <command>

Description

Fleet config lives in ~/.muster/fleets/ on this machine (a legacy remotes.json in the project is still read). Targets are a server name, a group name, or nothing for every server.

Subcommands

SubcommandDescription
initCreate the fleet config.
add <name> user@host [opts]Add a server to the fleet.
remove <name>Remove a server (and its stored token).
pair <name> --token <token>Manually pair a muster-mode server.
group <name> <s1> [s2...]Create or update a server group.
ungroup <name>Remove a group.
list [--json]Show servers, groups and status.
test [name|group] [--json]Test connectivity (SSH or cloud).
deploy [target] [--parallel]Deploy to fleet servers.
deploy [target] --syncSync hooks before deploying.
status [target] [--json]Check health across the fleet.
rollback [target]Roll back fleet servers.
logs <server> <svc> [--tail N] [--json]Last N log lines from a server (no --follow).
restart <server> [svc...] [--yes] [--json]Restart services on a server.
history <server> [svc] [--json]Deploy history of a muster-mode server.
sync [target] [--dry-run]Push local hooks to remote servers.
edit <name> [--sync|--manual]Change server settings.
setup-user <name> [--user X]Create a dedicated deploy user on the target.
keygenGenerate a signing keypair.
trust-key <name>Send your public key to the target.
list-keys [name]Show trusted signing keys on the target.
revoke-key <name> --label XRemove a signing key from the target.
skill list [fleet]Show skills enabled for a fleet.
skill enable <fleet> <skill>Enable a skill for a fleet.
skill disable <fleet> <skill>Disable a skill for a fleet.
skill configure <fleet> <sk>Set fleet-specific skill config.
install-agent <name>Install the monitoring agent on the target.
agent-status [name]Show agent health data.
remove-agent <name>Remove the agent from the target.

Flags

fleet add

FlagDescription
--mode, -m <muster|push>muster: the server runs its own muster. push: hooks are piped over SSH (default).
--transport, -t <ssh|cloud>Direct SSH (default), or the Fleet Cloud relay (needs muster-tunnel and muster-agent on the server).
--port, -p <N>SSH port (default 22).
--path <dir>Project directory on the server.
--key, -k <file>SSH identity file.
--sync / --manualSync hooks from this machine before each deploy, or expect them on the server (default: --manual).

fleet deploy

FlagDescription
--sequentialOne server at a time (default).
--parallelEvery target server at once (max 10 concurrent).
--rollingOne server, check health, then the next.
--dry-runPreview the plan without executing.
--syncSync hooks before deploying, whatever the hook mode.
--jsonNDJSON events.

Examples

Terminal
muster fleet init
muster fleet add prod-1 [email protected] --mode muster --path /opt/app
muster fleet add prod-2 [email protected] --mode push
muster fleet add cloud-1 deploy@agent-east --transport cloud --path /opt/app
muster fleet group web prod-1 prod-2
muster fleet deploy web
muster fleet deploy --parallel

Exit codes and JSON

list, test, status, logs, restart and history accept --json. See JSON API.