mirror of https://github.com/docker/cli.git
update docker swarm cli
Signed-off-by: Charles Smith <charles.smith@docker.com>
This commit is contained in:
parent
ab24ffa000
commit
87591ae9b7
|
@ -28,17 +28,17 @@ in the newly created one node Swarm cluster.
|
|||
|
||||
```bash
|
||||
$ docker swarm init --listen-addr 192.168.99.121:2377
|
||||
Initializing a new swarm
|
||||
Swarm initialized: current node (1ujecd0j9n3ro9i6628smdmth) is now a manager.
|
||||
$ docker node ls
|
||||
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER
|
||||
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes
|
||||
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
|
||||
1ujecd0j9n3ro9i6628smdmth * manager1 Accepted Ready Active Reachable Yes
|
||||
```
|
||||
|
||||
### --auto-accept value
|
||||
|
||||
This flag controls node acceptance into the cluster. By default, both `worker` and `manager`
|
||||
nodes are auto accepted by the cluster. This can be changed by specifing what kinds of nodes
|
||||
can be auto-accepted into the cluster. If auto-accept is not turned on, then
|
||||
can be auto-accepted into the cluster. If auto-accept is not turned on, then
|
||||
[node accept](node_accept.md) can be used to explicitly accept a node into the cluster.
|
||||
|
||||
For example, the following initializes a cluster with auto-acceptance of workers, but not managers
|
||||
|
@ -46,7 +46,7 @@ For example, the following initializes a cluster with auto-acceptance of workers
|
|||
|
||||
```bash
|
||||
$ docker swarm init --listen-addr 192.168.99.121:2377 --auto-accept worker
|
||||
Initializing a new swarm
|
||||
Swarm initialized: current node (1m8cdsylxbf3lk8qriqt07hx1) is now a manager.
|
||||
```
|
||||
|
||||
### `--force-new-cluster`
|
||||
|
|
|
@ -28,23 +28,23 @@ targeted by this command becomes a `manager`. If it is not specified, it becomes
|
|||
|
||||
```bash
|
||||
$ docker swarm join --manager --listen-addr 192.168.99.122:2377 192.168.99.121:2377
|
||||
This node is attempting to join a Swarm as a manager.
|
||||
This node joined a Swarm as a manager.
|
||||
$ docker node ls
|
||||
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER
|
||||
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE
|
||||
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes
|
||||
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
|
||||
dkp8vy1dq1kxleu9g4u78tlag * manager2 Accepted Ready Active Reachable
|
||||
dvfxp4zseq4s0rih1selh0d20 manager1 Accepted Ready Active Reachable Yes
|
||||
```
|
||||
|
||||
### Join a node to swarm as a worker
|
||||
|
||||
```bash
|
||||
$ docker swarm join --listen-addr 192.168.99.123:2377 192.168.99.121:2377
|
||||
This node is attempting to join a Swarm.
|
||||
This node joined a Swarm as a worker.
|
||||
$ docker node ls
|
||||
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER
|
||||
04zm7ue1fd1q swarm-node-02 READY ACTIVE
|
||||
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE
|
||||
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes
|
||||
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
|
||||
7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Ready Active
|
||||
dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
|
||||
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
|
||||
```
|
||||
|
||||
### `--manager`
|
||||
|
|
|
@ -23,10 +23,10 @@ This command causes the node to leave the swarm.
|
|||
On a manager node:
|
||||
```bash
|
||||
$ docker node ls
|
||||
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER
|
||||
04zm7ue1fd1q swarm-node-02 READY ACTIVE
|
||||
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE
|
||||
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes
|
||||
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
|
||||
7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Ready Active
|
||||
dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
|
||||
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
|
||||
```
|
||||
|
||||
On a worker node:
|
||||
|
@ -38,10 +38,10 @@ Node left the default swarm.
|
|||
On a manager node:
|
||||
```bash
|
||||
$ docker node ls
|
||||
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER
|
||||
04zm7ue1fd1q swarm-node-02 DOWN ACTIVE
|
||||
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE
|
||||
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes
|
||||
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
|
||||
7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Down Active
|
||||
dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
|
||||
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
|
||||
```
|
||||
|
||||
## Related information
|
||||
|
|
|
@ -12,16 +12,15 @@ parent = "smn_cli"
|
|||
# swarm update
|
||||
|
||||
Usage: docker swarm update [OPTIONS]
|
||||
|
||||
|
||||
update the Swarm.
|
||||
|
||||
|
||||
Options:
|
||||
--auto-accept value Auto acceptance policy (worker, manager or none)
|
||||
--dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
|
||||
--help Print usage
|
||||
--secret string Set secret value needed to accept nodes into cluster
|
||||
--task-history-limit int Task history retention limit (default 10)
|
||||
--cert-expiry duration Validity period for node certificates (default 2160h0m0s)
|
||||
|
||||
Updates a Swarm cluster with new parameter values. This command must target a manager node.
|
||||
|
||||
|
@ -35,4 +34,3 @@ $ docker swarm update --auto-accept manager
|
|||
* [swarm init](swarm_init.md)
|
||||
* [swarm join](swarm_join.md)
|
||||
* [swarm leave](swarm_leave.md)
|
||||
|
||||
|
|
Loading…
Reference in New Issue