Skip to content

Commit

Permalink
Merge pull request #1590 from thaJeztah/docs_add_management_notes
Browse files Browse the repository at this point in the history
Docs: add note about management commands targeting a manager
  • Loading branch information
silvin-lubecki authored Dec 12, 2019
2 parents cff1a88 + f540eae commit eb33f87
Show file tree
Hide file tree
Showing 31 changed files with 149 additions and 34 deletions.
6 changes: 4 additions & 2 deletions docs/reference/commandline/node_demote.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ Options:

## Description

Demotes an existing manager so that it is no longer a manager. This command
targets a docker engine that is a manager in the swarm.
Demotes an existing manager so that it is no longer a manager.

> **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

Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/node_inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ given template for each result. Go's
[text/template](http://golang.org/pkg/text/template/) package 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

### Inspect a node
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/node_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

```bash
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/node_promote.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Options:

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

```bash
Expand Down
8 changes: 7 additions & 1 deletion docs/reference/commandline/node_ps.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ Options:

## 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

Expand Down
5 changes: 4 additions & 1 deletion docs/reference/commandline/node_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ Options:

## 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

Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/node_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ Options:

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

### Add label metadata to a node
Expand Down
6 changes: 5 additions & 1 deletion docs/reference/commandline/secret_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ Options:

## 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/).

> **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

### Create a secret
Expand Down
7 changes: 5 additions & 2 deletions docs/reference/commandline/secret_inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ Options:

## Description

Inspects the specified secret. This command has to be run targeting a manager
node.
Inspects the specified secret.

By default, this renders all results in a JSON array. If a format is specified,
the given template will be executed for each result.
Expand All @@ -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/).

> **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

### Inspect a secret by name or ID
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/secret_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

> **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

```bash
Expand Down
7 changes: 5 additions & 2 deletions docs/reference/commandline/secret_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ Options:

## Description

Removes the specified secrets from the swarm. This command has to be run
targeting a manager node.
Removes the specified secrets from the swarm.

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

This example removes a secret:
Expand Down
3 changes: 3 additions & 0 deletions docs/reference/commandline/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ Run 'docker service COMMAND --help' for more information on a command.

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.
7 changes: 5 additions & 2 deletions docs/reference/commandline/service_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ Options:

## Description

Creates a service as described by the specified parameters. You must run this
command on a manager node.
Creates a service as described by the specified 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

Expand Down
7 changes: 5 additions & 2 deletions docs/reference/commandline/service_inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,18 @@ Options:

## Description

Inspects the specified service. This command has to be run targeting a manager
node.
Inspects the specified service.

By default, this renders all results in a JSON array. If a format is specified,
the given template will be executed for each result.

Go's [text/template](http://golang.org/pkg/text/template/) package
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

### Inspect a service by name or ID
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/service_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Options:

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
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
Expand Down
7 changes: 5 additions & 2 deletions docs/reference/commandline/service_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ Options:

## Description

This command when run targeting a manager, lists services are running in the
swarm.
This command lists services are running 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

Expand Down
7 changes: 5 additions & 2 deletions docs/reference/commandline/service_ps.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ Options:

## Description

Lists the tasks that are running as part of the specified services. This command
has to be run targeting a manager node.
Lists the tasks that are running as part of the specified 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.
## Examples

Expand Down
7 changes: 5 additions & 2 deletions docs/reference/commandline/service_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ Options:

## Description

Removes the specified services from the swarm. This command has to be run
targeting a manager node.
Removes the specified services from 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

Expand Down
7 changes: 5 additions & 2 deletions docs/reference/commandline/service_rollback.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ Options:

## Description

Roll back a specified service to its previous version from the swarm. This command must be run
targeting a manager node.
Roll back a specified service to its previous version from 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

Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/service_scale.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

### Scale a single service
Expand Down
10 changes: 7 additions & 3 deletions docs/reference/commandline/service_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,20 @@ Options:

## Description

Updates a service as described by the specified parameters. This command has to be run targeting a manager node.
The parameters are the same as [`docker service create`](service_create.md). Please look at the description there
for further information.
Updates a service as described by the specified parameters. The parameters are
the same as [`docker service create`](service_create.md). Refer to the description
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
service requires recreating the tasks for it to take effect. For example, only changing the
`--update-parallelism` setting will not recreate the tasks, because the individual tasks are not affected by this
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.

> **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

### Update a service
Expand Down
8 changes: 6 additions & 2 deletions docs/reference/commandline/stack_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ Options:

## Description

Create and update a stack from a `compose` file on the swarm. This command has to
be run targeting a manager node.
Create and update a stack from a `compose` file on the swarm.

> **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

Expand Down
5 changes: 5 additions & 0 deletions docs/reference/commandline/stack_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Options:

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

The following command shows all stacks and some additional information:
Expand Down
8 changes: 6 additions & 2 deletions docs/reference/commandline/stack_ps.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ Options:

## Description

Lists the tasks that are running as part of the specified stack. This
command has to be run targeting a manager node.
Lists the tasks that are running as part of the specified stack.

> **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

Expand Down
8 changes: 6 additions & 2 deletions docs/reference/commandline/stack_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ Options:

## Description

Remove the stack from the swarm. This command has to be run targeting
a manager node.
Remove the stack from the swarm.

> **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

Expand Down
8 changes: 6 additions & 2 deletions docs/reference/commandline/stack_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ Options:

## Description

Lists the services that are running as part of the specified stack. This
command has to be run targeting a manager node.
Lists the services that are running as part of the specified stack.

> **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

Expand Down
6 changes: 5 additions & 1 deletion docs/reference/commandline/swarm_ca.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ Options:

## 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

Expand Down
4 changes: 4 additions & 0 deletions docs/reference/commandline/swarm_join_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

> **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

You can view or rotate the join tokens using `swarm join-token`.
Expand Down
Loading

0 comments on commit eb33f87

Please sign in to comment.