Docs: add note about management commands targeting a manager

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f540eae7fe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-12-23 12:27:52 +01:00
parent ab4a5cc0f7
commit f0bf0d2c46
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
31 changed files with 149 additions and 34 deletions

View File

@ -27,9 +27,11 @@ Options:
## Description ## Description
Demotes an existing manager so that it is no longer a manager. This command Demotes an existing manager so that it is no longer a manager.
targets a docker engine that is a manager in the swarm.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -34,6 +34,10 @@ given template for each result. Go's
[text/template](http://golang.org/pkg/text/template/) package describes all the [text/template](http://golang.org/pkg/text/template/) package describes all the
details of the format. details of the format.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
### Inspect a node ### Inspect a node

View File

@ -36,6 +36,10 @@ Lists all the nodes that the Docker Swarm manager knows about. You can filter
using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section
for more information about available filter options. for more information about available filter options.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
```bash ```bash

View File

@ -28,6 +28,10 @@ Options:
Promotes a node to manager. This command can only be executed on a manager node. Promotes a node to manager. This command can only be executed on a manager node.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
```bash ```bash

View File

@ -32,7 +32,13 @@ Options:
## Description ## Description
Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. Lists all the tasks on a Node that Docker knows about. You can filter using the
`-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more
information about available filter options.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -30,8 +30,11 @@ Options:
## Description ## Description
When run from a manager node, removes the specified nodes from a swarm. Removes the specified nodes from a swarm.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -32,6 +32,10 @@ Options:
Update metadata about a node, such as its availability, labels, or roles. Update metadata about a node, such as its availability, labels, or roles.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
### Add label metadata to a node ### Add label metadata to a node

View File

@ -27,10 +27,14 @@ Options:
## Description ## Description
Creates a secret using standard input or from a file for the secret content. You must run this command on a manager node. Creates a secret using standard input or from a file for the secret content.
For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/). For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/).
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
### Create a secret ### Create a secret

View File

@ -27,8 +27,7 @@ Options:
## Description ## Description
Inspects the specified secret. This command has to be run targeting a manager Inspects the specified secret.
node.
By default, this renders all results in a JSON array. If a format is specified, By default, this renders all results in a JSON array. If a format is specified,
the given template will be executed for each result. the given template will be executed for each result.
@ -38,6 +37,10 @@ describes all the details of the format.
For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/). For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/).
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
### Inspect a secret by name or ID ### Inspect a secret by name or ID

View File

@ -36,6 +36,10 @@ Run this command on a manager node to list the secrets in the swarm.
For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/). For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/).
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
```bash ```bash

View File

@ -29,11 +29,14 @@ Options:
## Description ## Description
Removes the specified secrets from the swarm. This command has to be run Removes the specified secrets from the swarm.
targeting a manager node.
For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/). For detailed information about using secrets, refer to [manage sensitive data with Docker secrets](https://docs.docker.com/engine/swarm/secrets/).
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
This example removes a secret: This example removes a secret:

View File

@ -40,3 +40,6 @@ Run 'docker service COMMAND --help' for more information on a command.
Manage services. Manage services.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.

View File

@ -92,8 +92,11 @@ Options:
## Description ## Description
Creates a service as described by the specified parameters. You must run this Creates a service as described by the specified parameters.
command on a manager node.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -28,8 +28,7 @@ Options:
## Description ## Description
Inspects the specified service. This command has to be run targeting a manager Inspects the specified service.
node.
By default, this renders all results in a JSON array. If a format is specified, By default, this renders all results in a JSON array. If a format is specified,
the given template will be executed for each result. the given template will be executed for each result.
@ -37,6 +36,10 @@ the given template will be executed for each result.
Go's [text/template](http://golang.org/pkg/text/template/) package Go's [text/template](http://golang.org/pkg/text/template/) package
describes all the details of the format. describes all the details of the format.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
### Inspect a service by name or ID ### Inspect a service by name or ID

View File

@ -35,6 +35,10 @@ Options:
The `docker service logs` command batch-retrieves logs present at the time of execution. The `docker service logs` command batch-retrieves logs present at the time of execution.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
The `docker service logs` command can be used with either the name or ID of a The `docker service logs` command can be used with either the name or ID of a
service, or with the ID of a task. If a service is passed, it will display logs service, or with the ID of a task. If a service is passed, it will display logs
for all of the containers in that service. If a task is passed, it will only for all of the containers in that service. If a task is passed, it will only

View File

@ -32,8 +32,11 @@ Options:
## Description ## Description
This command when run targeting a manager, lists services are running in the This command lists services are running in the swarm.
swarm.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -32,8 +32,11 @@ Options:
## Description ## Description
Lists the tasks that are running as part of the specified services. This command Lists the tasks that are running as part of the specified services.
has to be run targeting a manager node.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -29,8 +29,11 @@ Options:
## Description ## Description
Removes the specified services from the swarm. This command has to be run Removes the specified services from the swarm.
targeting a manager node.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -28,8 +28,11 @@ Options:
## Description ## Description
Roll back a specified service to its previous version from the swarm. This command must be run Roll back a specified service to its previous version from the swarm.
targeting a manager node.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -33,6 +33,10 @@ services which are global mode. The command will return immediately, but the
actual scaling of the service may take some time. To stop all replicas of a actual scaling of the service may take some time. To stop all replicas of a
service while keeping the service active in the swarm you can set the scale to 0. service while keeping the service active in the swarm you can set the scale to 0.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
### Scale a single service ### Scale a single service

View File

@ -109,9 +109,9 @@ Options:
## Description ## Description
Updates a service as described by the specified parameters. This command has to be run targeting a manager node. Updates a service as described by the specified parameters. The parameters are
The parameters are the same as [`docker service create`](service_create.md). Please look at the description there the same as [`docker service create`](service_create.md). Refer to the description
for further information. there for further information.
Normally, updating a service will only cause the service's tasks to be replaced with new ones if a change to the Normally, updating a service will only cause the service's tasks to be replaced with new ones if a change to the
service requires recreating the tasks for it to take effect. For example, only changing the service requires recreating the tasks for it to take effect. For example, only changing the
@ -119,6 +119,10 @@ service requires recreating the tasks for it to take effect. For example, only c
setting. However, the `--force` flag will cause the tasks to be recreated anyway. This can be used to perform a setting. However, the `--force` flag will cause the tasks to be recreated anyway. This can be used to perform a
rolling restart without any changes to the service parameters. rolling restart without any changes to the service parameters.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
### Update a service ### Update a service

View File

@ -38,8 +38,12 @@ Options:
## Description ## Description
Create and update a stack from a `compose` or a `dab` file on the swarm. This command Create and update a stack from a `compose` file on the swarm.
has to be run targeting a manager node.
> **Note**: This is a cluster management command. When using swarm as an orchestrator,
> this command must be executed on a swarm manager node. To learn about managers
> and workers, refer to the [Swarm mode section](https://docs.docker.com/engine/swarm/)
> in the documentation.
## Examples ## Examples

View File

@ -35,6 +35,11 @@ Options:
Lists the stacks. Lists the stacks.
> **Note**: This is a cluster management command. When using swarm as an orchestrator,
> this command must be executed on a swarm manager node. To learn about managers
> and workers, refer to the [Swarm mode section](https://docs.docker.com/engine/swarm/)
> in the documentation.
## Examples ## Examples
The following command shows all stacks and some additional information: The following command shows all stacks and some additional information:

View File

@ -34,8 +34,12 @@ Options:
## Description ## Description
Lists the tasks that are running as part of the specified stack. This Lists the tasks that are running as part of the specified stack.
command has to be run targeting a manager node.
> **Note**: This is a cluster management command. When using swarm as an orchestrator,
> this command must be executed on a swarm manager node. To learn about managers
> and workers, refer to the [Swarm mode section](https://docs.docker.com/engine/swarm/)
> in the documentation.
## Examples ## Examples

View File

@ -32,8 +32,12 @@ Options:
## Description ## Description
Remove the stack from the swarm. This command has to be run targeting Remove the stack from the swarm.
a manager node.
> **Note**: This is a cluster management command. When using swarm as an orchestrator,
> this command must be executed on a swarm manager node. To learn about managers
> and workers, refer to the [Swarm mode section](https://docs.docker.com/engine/swarm/)
> in the documentation.
## Examples ## Examples

View File

@ -32,8 +32,12 @@ Options:
## Description ## Description
Lists the services that are running as part of the specified stack. This Lists the services that are running as part of the specified stack.
command has to be run targeting a manager node.
> **Note**: This is a cluster management command. When using swarm as an orchestrator,
> this command must be executed on a swarm manager node. To learn about managers
> and workers, refer to the [Swarm mode section](https://docs.docker.com/engine/swarm/)
> in the documentation.
## Examples ## Examples

View File

@ -33,7 +33,11 @@ Options:
## Description ## Description
View or rotate the current swarm CA certificate. This command must target a manager node. View or rotate the current swarm CA certificate.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples

View File

@ -34,6 +34,10 @@ role. You pass the token using the `--token` flag when you run
[swarm join](swarm_join.md). Nodes use the join token only when they join the [swarm join](swarm_join.md). Nodes use the join token only when they join the
swarm. swarm.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
You can view or rotate the join tokens using `swarm join-token`. You can view or rotate the join tokens using `swarm join-token`.

View File

@ -31,6 +31,10 @@ used to reactivate a manager after its Docker daemon restarts if the autolock
setting is turned on. The unlock key is printed at the time when autolock is setting is turned on. The unlock key is printed at the time when autolock is
enabled, and is also available from the `docker swarm unlock-key` command. enabled, and is also available from the `docker swarm unlock-key` command.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
```bash ```bash

View File

@ -35,6 +35,10 @@ swarm.
You can view or rotate the unlock key using `swarm unlock-key`. To view the key, You can view or rotate the unlock key using `swarm unlock-key`. To view the key,
run the `docker swarm unlock-key` command without any arguments: run the `docker swarm unlock-key` command without any arguments:
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples
```bash ```bash

View File

@ -33,7 +33,11 @@ Options:
## Description ## Description
Updates a swarm with new parameter values. This command must target a manager node. Updates a swarm with new parameter values.
> **Note**: This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the [Swarm mode
> section](https://docs.docker.com/engine/swarm/) in the documentation.
## Examples ## Examples