mirror of https://github.com/docker/docs.git
Always use your client bundle
This commit is contained in:
parent
e4f56fe84e
commit
6550b42302
|
@ -45,7 +45,7 @@ To join nodes to the cluster, go to the Docker EE web UI and navigate to the
|
|||
|
||||
1. Click **Add Node** to add a new node.
|
||||
2. Select the type of node to add, **Windows** or **Linux**.
|
||||
2. Click **Manager** if you want to add the node as a manager.
|
||||
2. Click **Manager** if you want to add the node as a manager.
|
||||
3. Check the **Use a custom listen address** option to specify the address
|
||||
and port where new node listens for inbound cluster management traffic.
|
||||
4. Check the **Use a custom listen address** option to specify the
|
||||
|
@ -57,7 +57,7 @@ Copy the displayed command, use SSH to log in to the host that you want to
|
|||
join to the cluster, and run the `docker swarm join` command on the host.
|
||||
|
||||
To add a Windows node, click **Windows** and follow the instructions in
|
||||
[Join Windows worker nodes to a cluster](join-windows-nodes-to-cluster.md).
|
||||
[Join Windows worker nodes to a cluster](join-windows-nodes-to-cluster.md).
|
||||
|
||||
After you run the join command in the node, the node is displayed on the
|
||||
**Nodes** page in the Docker EE web UI. From there, you can change the node's
|
||||
|
@ -87,19 +87,8 @@ Pause or drain a node from the **Edit Node** page:
|
|||
|
||||
## Promote or demote a node
|
||||
|
||||
As your cluster architecture changes, you may need to promote worker nodes to
|
||||
managers or demote manger nodes to workers. Change the current role of node on
|
||||
the **Edit node** page.
|
||||
|
||||
If you remove a manager node from the cluster, always demote the node
|
||||
before removing it.
|
||||
|
||||
> Load balancing
|
||||
>
|
||||
> If you're load-balancing user requests to Docker EE across multiple manager
|
||||
> nodes, don't forget to remove these nodes from your load-balancing pool when
|
||||
> you demote them to workers.
|
||||
{: .important}
|
||||
You can promote worker nodes to managers to make UCP fault tolerant. You can
|
||||
also demote a manager node into a worker.
|
||||
|
||||
To promote or demote a manager node:
|
||||
|
||||
|
@ -110,85 +99,35 @@ To promote or demote a manager node:
|
|||
4. Click **Save** and wait until the operation completes.
|
||||
5. Navigate to the **Nodes** page, and confirm that the node role has changed.
|
||||
|
||||
If you're load-balancing user requests to Docker EE across multiple manager
|
||||
nodes, don't forget to remove these nodes from your load-balancing pool when
|
||||
you demote them to workers.
|
||||
|
||||
## Remove a node from the cluster
|
||||
|
||||
Before you remove a node from the cluster, ensure that it's not a manager node.
|
||||
If it is, [demote it to a worker](#promote-or-demote-a-node) before you remove
|
||||
it from the cluster.
|
||||
|
||||
To remove a node:
|
||||
You can remove worker nodes from the cluster at any time:
|
||||
|
||||
1. Navigate to the **Nodes** page and select the node.
|
||||
2. In the details pane, click **Actions** and select **Remove**.
|
||||
3. Click **Confirm** when you're prompted.
|
||||
|
||||
If the status of the worker node is `Ready`, you need to force the node to leave
|
||||
the cluster manually. To do this, connect to the target node through SSH and
|
||||
run `docker swarm leave --force` directly against the local Docker EE Engine.
|
||||
|
||||
> Loss of quorum
|
||||
>
|
||||
> Don't perform this step if the node is still a manager, as this may cause
|
||||
> loss of quorum.
|
||||
{: .important}
|
||||
Since manager nodes are important to the cluster overall health, you need to
|
||||
be careful when removing one from the cluster.
|
||||
|
||||
When the status of the node is reported as `Down`, you can remove the node from
|
||||
the cluster.
|
||||
To remove a manager node:
|
||||
|
||||
If you want to join the removed node to the cluster again, you need to force
|
||||
the node to leave the cluster manually. To do this, connect to the target node
|
||||
through SSH and run `docker swarm leave --force` directly against the local
|
||||
Docker EE Engine.
|
||||
1. Make sure all nodes in the cluster are healthy. Don't remove manager nodes
|
||||
if that's not the case.
|
||||
2. Demote the manager node into a worker.
|
||||
3. Now you can remove that node from the cluster.
|
||||
|
||||
## Use the CLI to join nodes
|
||||
## Use the CLI to manage your nodes
|
||||
|
||||
You can use the command line to join a node to a Docker EE cluster.
|
||||
To get the join token, run the following command on a manager node:
|
||||
You can use the Docker CLI client to manage your nodes from the CLI. To do
|
||||
this, configure your Docker CLI client with a [UCP client bundle](../../../user-access/cli.md).
|
||||
|
||||
```bash
|
||||
docker swarm join-token worker
|
||||
```
|
||||
|
||||
If you want to add a new manager node instead of a worker node, use
|
||||
`docker swarm join-token manager` instead. If you want to use a custom listen
|
||||
address, add the `--listen-addr` arg:
|
||||
|
||||
```bash
|
||||
$ docker swarm join \
|
||||
--token SWMTKN-1-2o5ra9t7022neymg4u15f3jjfh0qh3yof817nunoioxa9i7lsp-dkmt01ebwp2m0wce1u31h6lmj \
|
||||
--listen-addr 234.234.234.234 \
|
||||
192.168.99.100:2377
|
||||
```
|
||||
|
||||
Once your node is added, you can see it by running `docker node ls` on a manager:
|
||||
Once you do that, you can start managing your UCP nodes:
|
||||
|
||||
```bash
|
||||
docker node ls
|
||||
```
|
||||
|
||||
To change the node's availability, use:
|
||||
|
||||
```bash
|
||||
docker node update --availability drain node2
|
||||
```
|
||||
|
||||
You can set the availability to `active`, `pause`, or `drain`.
|
||||
|
||||
## Remove nodes from the cluster
|
||||
|
||||
If the target node is a manager, you need to demote the node to a worker
|
||||
before proceeding with the removal.
|
||||
|
||||
1. Log in to a manager node, other than the one you'll be demoting, by using
|
||||
SSH.
|
||||
2. Run `docker node ls` and identify the `nodeID` or `hostname` of the target
|
||||
node.
|
||||
3. Run `docker node demote <nodeID or hostname>`.
|
||||
|
||||
When the status of the node is reported as `Down`, you can remove the node from
|
||||
the cluster.
|
||||
|
||||
```bash
|
||||
docker node rm <nodeID or hostname>
|
||||
```
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@ Copy the displayed command. It looks similar to the following:
|
|||
docker cluster join --token <token> <ucp-manager-ip>
|
||||
```
|
||||
|
||||
You can also use the command line to get the join token. On a manager node,
|
||||
run the following command:
|
||||
You can also use the command line to get the join token. Using your
|
||||
[UCP client bundle](../../../user-access/cli.md), run:
|
||||
|
||||
```bash
|
||||
docker swarm join-token worker
|
||||
|
@ -205,4 +205,3 @@ Some features are not yet supported on Windows nodes:
|
|||
* Mounts
|
||||
* On Windows, Docker can't listen on a Unix socket. Use TCP or a named pipe
|
||||
instead.
|
||||
|
||||
|
|
Loading…
Reference in New Issue