1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

update docker swarm cli

Signed-off-by: Charles Smith <charles.smith@docker.com>
(cherry picked from commit 78ebfaff1a)
This commit is contained in:
Charles Smith 2016-06-17 13:30:17 -07:00 committed by Tibor Vass
parent 75193e58ce
commit 3f276b58a5
4 changed files with 24 additions and 26 deletions

View file

@ -29,17 +29,17 @@ in the newly created one node Swarm cluster.
```bash ```bash
$ docker swarm init --listen-addr 192.168.99.121:2377 $ 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 $ docker node ls
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes 1ujecd0j9n3ro9i6628smdmth * manager1 Accepted Ready Active Reachable Yes
``` ```
### --auto-accept value ### --auto-accept value
This flag controls node acceptance into the cluster. By default, both `worker` and `manager` 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 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. [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 For example, the following initializes a cluster with auto-acceptance of workers, but not managers
@ -47,7 +47,7 @@ For example, the following initializes a cluster with auto-acceptance of workers
```bash ```bash
$ docker swarm init --listen-addr 192.168.99.121:2377 --auto-accept worker $ 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` ### `--force-new-cluster`

View file

@ -29,23 +29,23 @@ targeted by this command becomes a `manager`. If it is not specified, it becomes
```bash ```bash
$ docker swarm join --manager --listen-addr 192.168.99.122:2377 192.168.99.121:2377 $ 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 $ docker node ls
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE dkp8vy1dq1kxleu9g4u78tlag * manager2 Accepted Ready Active Reachable
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes dvfxp4zseq4s0rih1selh0d20 manager1 Accepted Ready Active Reachable Yes
``` ```
### Join a node to swarm as a worker ### Join a node to swarm as a worker
```bash ```bash
$ docker swarm join --listen-addr 192.168.99.123:2377 192.168.99.121:2377 $ 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 $ docker node ls
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
04zm7ue1fd1q swarm-node-02 READY ACTIVE 7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Ready Active
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
``` ```
### `--manager` ### `--manager`

View file

@ -24,10 +24,10 @@ This command causes the node to leave the swarm.
On a manager node: On a manager node:
```bash ```bash
$ docker node ls $ docker node ls
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
04zm7ue1fd1q swarm-node-02 READY ACTIVE 7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Ready Active
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
``` ```
On a worker node: On a worker node:
@ -39,10 +39,10 @@ Node left the default swarm.
On a manager node: On a manager node:
```bash ```bash
$ docker node ls $ docker node ls
ID NAME STATUS AVAILABILITY/MEMBERSHIP MANAGER STATUS LEADER ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
04zm7ue1fd1q swarm-node-02 DOWN ACTIVE 7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Down Active
2fg70txcrde2 swarm-node-01 READY ACTIVE REACHABLE dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
3l1f6uzcuoa3 * swarm-master READY ACTIVE REACHABLE Yes dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
``` ```
## Related information ## Related information

View file

@ -13,16 +13,15 @@ parent = "smn_cli"
# swarm update # swarm update
Usage: docker swarm update [OPTIONS] Usage: docker swarm update [OPTIONS]
update the Swarm. update the Swarm.
Options: Options:
--auto-accept value Auto acceptance policy (worker, manager or none) --auto-accept value Auto acceptance policy (worker, manager or none)
--dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s) --dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
--help Print usage --help Print usage
--secret string Set secret value needed to accept nodes into cluster --secret string Set secret value needed to accept nodes into cluster
--task-history-limit int Task history retention limit (default 10) --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. Updates a Swarm cluster with new parameter values. This command must target a manager node.
@ -36,4 +35,3 @@ $ docker swarm update --auto-accept manager
* [swarm init](swarm_init.md) * [swarm init](swarm_init.md)
* [swarm join](swarm_join.md) * [swarm join](swarm_join.md)
* [swarm leave](swarm_leave.md) * [swarm leave](swarm_leave.md)