satl service¶
Manage services
satl service is a group: it always takes one of the subcommands below.
satl service create¶
Create a new service
Arguments
| Argument | Description |
|---|---|
<IMAGE> |
Image to run |
[COMMAND]... |
Command and arguments to run inside the container |
Options
| Option | Description |
|---|---|
--name <NAME> |
Service name |
--replicas <N> |
Number of tasks (replicated services only; on a replicated job it sets both MaxConcurrent and TotalCompletions, as Docker's CLI does) |
--mode <MODE> |
Service mode Values: replicated, global, replicated-job, global-job |
--max-concurrent <N> |
Maximum number of job tasks live at once (replicated-job only) |
--total-completions <N> |
Total completions that finish a replicated job (replicated-job only) |
-p, --publish <PORT> |
Publish a port as a node port ([published:]target[/protocol]) |
-e, --env <KEY=VALUE> |
Set environment variables |
-l, --label <KEY=VALUE> |
Service labels |
--constraint <EXPR> |
Placement constraints |
--placement-pref <PREF> |
Soft placement preference (spread=node.labels.zone); repeatable, applied in order |
--limit-cpu <VALUE> |
Limit CPUs |
--limit-memory <BYTES> |
Limit memory |
--reserve-cpu <VALUE> |
Reserve CPUs |
--reserve-memory <BYTES> |
Reserve memory |
--restart-condition <CONDITION> |
Restart when a condition is met Values: none, on-failure, any |
--network <NETWORK> |
Network attachments |
--secret <SECRET> |
Give the tasks a secret, delivered as one file: NAME, or source=NAME[,target=FILE][,uid=UID][,gid=GID][,mode=0444] |
--config <CONFIG> |
Give the tasks a config file, in the same forms as --secret |
satl service create also accepts the update and rollback policy options (12 flags), documented once below.
satl service ls¶
List services
Options
| Option | Description |
|---|---|
-q, --quiet |
Only display IDs |
satl service ps¶
List the tasks of a service
Arguments
| Argument | Description |
|---|---|
<SERVICE>... |
Services whose tasks to list |
Options
| Option | Description |
|---|---|
--no-trunc |
Don't truncate output |
-q, --quiet |
Only display task IDs |
satl service inspect¶
Display detailed information on one or more services
Arguments
| Argument | Description |
|---|---|
<SERVICE>... |
Services to inspect |
Options
| Option | Description |
|---|---|
--pretty |
Print the information in a human friendly format |
satl service scale¶
Scale one or multiple replicated services
Arguments
| Argument | Description |
|---|---|
<SERVICE=REPLICAS>... |
SERVICE=REPLICAS pairs |
satl service rm¶
Remove one or more services
Arguments
| Argument | Description |
|---|---|
<SERVICE>... |
Services to remove |
satl service update¶
Update a service
Arguments
| Argument | Description |
|---|---|
<SERVICE> |
The service to update |
Options
| Option | Description |
|---|---|
--image <IMAGE> |
Service image tag |
--replicas <N> |
Number of tasks |
--constraint-add <EXPR> |
Add or update a placement constraint |
--constraint-rm <EXPR> |
Remove a placement constraint |
--placement-pref-add <PREF> |
Add a placement preference (spread=node.labels.zone) |
--placement-pref-rm <DESCRIPTOR> |
Remove a placement preference by descriptor (node.labels.zone) |
--label-add <KEY=VALUE> |
Add or update a service label |
--label-rm <KEY> |
Remove a service label |
--limit-cpu <VALUE> |
Limit CPUs. 0 clears the limit. A resources-only update is a hot resize — the live tasks are not replaced |
--limit-memory <BYTES> |
Limit memory. 0 clears the limit |
--reserve-cpu <VALUE> |
Reserve CPUs. 0 clears the reservation |
--reserve-memory <BYTES> |
Reserve memory. 0 clears the reservation |
satl service update also accepts the update and rollback policy options (12 flags), documented once below.
Update and rollback policy¶
A service update replaces tasks in waves rather than all at once, and can
undo itself when a wave goes badly. These twelve flags configure both
halves of that: --update-* governs the roll forward, --rollback-* the
roll back, and each half takes the same five knobs plus an order.
They come from a single PolicyArgs struct in the SatL source, which is
why they are documented once here instead of twice: setting one on
satl service create records it as the service's default, and setting it
on satl service update changes it for that update and every later one.
Accepted by satl service create, satl service update, with identical meaning.
| Option | Description |
|---|---|
--update-parallelism <N> |
Maximum number of tasks updated simultaneously (0 to update all at once) |
--update-delay <DURATION> |
Delay between updates (1m30s, 10s) |
--update-failure-action <ACTION> |
Action on update failure Values: pause, continue, rollback |
--update-monitor <DURATION> |
Duration after each task update to monitor for failure |
--update-max-failure-ratio <RATIO> |
Failure rate to tolerate during an update (0 to 1) |
--update-order <ORDER> |
Update order Values: start-first, stop-first |
--rollback-parallelism <N> |
Maximum number of tasks rolled back simultaneously (0 to roll back all at once) |
--rollback-delay <DURATION> |
Delay between task rollbacks (1m30s, 10s) |
--rollback-failure-action <ACTION> |
Action on rollback failure. A rollback never rolls back: rollback is not a value here, exactly as in dockerValues: pause, continue |
--rollback-monitor <DURATION> |
Duration after each task rollback to monitor for failure |
--rollback-max-failure-ratio <RATIO> |
Failure rate to tolerate during a rollback (0 to 1) |
--rollback-order <ORDER> |
Rollback order Values: start-first, stop-first |
create versus update¶
satl service create defines a service from nothing; satl service update
edits one that exists. The two option sets therefore do not mirror each
other, and the difference is worth knowing before you reach for a flag
that is not there.
Derived mechanically from the two commands' own --help, with the update and rollback policy options and the global options excluded.
| Accepted by | Options |
|---|---|
| both | --limit-cpu, --limit-memory, --replicas, --reserve-cpu, --reserve-memory |
satl service create only |
--config, --constraint, --env, --label, --max-concurrent, --mode, --name, --network, --placement-pref, --publish, --restart-condition, --secret, --total-completions, <IMAGE>, [COMMAND]... |
satl service update only |
--constraint-add, --constraint-rm, --image, --label-add, --label-rm, --placement-pref-add, --placement-pref-rm, <SERVICE> |
A set difference cannot see that two differently-named options do the same job. These pairings are asserted by hand in overlay/cli.yml:
satl service create |
satl service update |
Why they differ |
|---|---|---|
--constraint |
--constraint-add / --constraint-rm |
Create sets the whole constraint list at once. Update edits it in place: there is no --constraint on update, because replacing the list wholesale is rarely what you mean and always what you would get. |
<IMAGE> |
--image |
The image is a required positional on create and an optional flag on update -- a service cannot exist without one, and most updates do not change it. |
Global options¶
Accepted by every satl command.
| Option | Description |
|---|---|
--host <URL> |
Daemon socket to connect to (docker-style URL) Default: unix:///var/run/satl.sockEnvironment: DOCKER_HOST |
-h, --help |
Print help |
-V, --version |
Print version |
Generated from satl 0.1.0 by make gen. Change it in the SatL source or in overlay/cli.yml, never here.