Scale your cluster

Docker UCP is designed for scaling horizontally as your applications grow in
size and usage. You can add or remove nodes from the UCP cluster to make it
scale to your needs.

Since UCP leverages the clustering functionality provided by Docker Engine,
you use the docker swarm join
command to add more nodes to your cluster. When joining new nodes, the UCP
services automatically start running in that node.

When joining a node to a cluster you can specify its role: manager or worker.

After you run the join command in the node, the node is displayed in the UCP
web UI.

Remove nodes from the cluster

If the target node is a manager, you will need to first demote the node into
a worker before proceeding with the removal:

From the UCP web UI, navigate to the Nodes page. Select the node you
wish to remove and switch its role to Worker, wait until the operation
completes, and confirm that the node is no longer a manager.

From the CLI, perform docker node ls and identify the nodeID or hostname
of the target node. Then, run docker node demote <nodeID or hostname>.

If the status of the worker node is Ready, you’ll need to manually force
the node to leave the swarm. To do this, connect to the target node through
SSH and run docker swarm leave --force directly against the local docker
engine.

Loss of quorum

Do not perform this step if the node is still a manager, as
this may cause loss of quorum.

Now that the status of the node is reported as Down, you may remove the
node:

From the UCP web UI, browse to the Nodes page and select the node.
In the details pane, click Actions and select Remove.
Click Confirm when you’re prompted.

From the CLI, perform docker node rm <nodeID or hostname>.

Pause and drain nodes

Once a node is part of the cluster you can change its role making a manager
node into a worker and vice versa. You can also configure the node availability
so that it is: