Mastering Docker Enterprise
上QQ阅读APP看书,第一时间看更新

Joining a Windows server 2016 worker node to the cluster

We start by looking at the UCP manager for the Windows UCP agent and dsinfo versions. SSH to the UCP node and run the following:

UCP-node$ docker container run --rm docker/ucp:3.1.2 images --list --enable-windows

docker/ucp-agent-win:3.1.2
docker/ucp-dsinfo-win:3.1.2

We need to make sure the same images are pulled to the Windows work nodes. Use an RDP session to access the Windows 2016 Node and open a standard PowerShell Terminal. From the Terminal, we pull the images as follows:

PS> docker image pull docker/ucp-agent-win:3.1.2
PS> docker image pull docker/ucp-dsinfo-win:3.1.2

Now, we need to run a script that:

  • Verifies the Windows Server Kernel
  • Verifies Docker certificates
  • Secures Dockerd on port 2376 with a tls encrypted named pipe
  • Opens inbound Windows firewall ports 2376, 12376, and 2377
  • Opens inbound/outbound ports 7946, 4789, and 7946.
  • Restarts the Docker service.

To make this easier, Docker has created a script inside the docker.ucp-agent-win container that can be used to generate a PowerShell script as follows:

PS> $script = [ScriptBlock]::Create((docker run --rm docker/ucp-agent-win:3.1.2 windows-script | Out-String))
PS> Invoke-Command $script

After the script finishes restarting the Docker service, go back to your UCP and click on Shared Resources | Nodes and Add Node as shown in following Figure 8a. This time, select the Windows Option and acknowledge that you completed the previous steps by checking the step 2 box: I have followed the instructions and I'm ready to join my windows nodeThe docker join command appears. Copy the docker swarm run command to PowerShell and run it.

Following is the UCP Add Node Dialog where are adding a Windows worker node to our cluster:

Figure 8a: Universal Control Plane Add Windows Node

Now, head back to the UCP Dashboard in our browser and wait for the new Windows node to initialize and become healthy:

Figure 9: Universal Control Plane All Nodes Joined

Now, we have the Docker Enterprise Universal Control Plane installed onto a healthy four node cluster. Now, it's time to install the DTR.