官术网_书友最值得收藏!

Installing Docker's Universal Control Plane

SSH into your UCP/manager node and install the Docker UCP. As you might expect, the UCP installer runs from inside a container called docker/ucp:3.1.2. Notice how the container mounts the Docker socket as a volume so it can issues docker commands to a Docker daemon running on the host from inside the UCP installer's container. This is the preferred approach over Docker in Docker (DinD), which requires the --privileged flag and can lead to filesystem corruption.

At this time, Docker's UCP and DTR application are only supported on Linux platforms. Windows may be supported in a future release as Docker on Windows Server rounds out the feature set to match Linux and completes Kubernetes certification. 

The following code block shows the UCP install command with an example.

$ docker container run -it --rm --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp:3.1.2 install \
--host-address {internal IP Address of UCP Node}  \
--admin-username admin \
--admin-password {add your password here} \
--san {Internal IP of UCP node, i.e., 172.31.0.99}  \
--san {External DNS name UCP node, i.e., ucp.mydomain.com} \
--san {External IP of UCP node, i.e., 54.189.176.6} \
--interactive

## --- Actual example with my clusters values ---
$ docker run -it --rm --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/ucp:3.1.2 install \
--swarm-port 3376 \
--host-address 172.31.0.170 \
--admin-username admin \
--admin-password notReallyThePassword \
--san ip-172-31-0-170.us-west-2.compute.internal \
--san ec2-54-245-193-10.us-west-2.compute.amazonaws.com \
--san 54.245.193.10 \
--interactive

Looking at the Docker command in the previous code block, we see the Docker container runs the install binary inside the ucp:3.1.2 container with an interactive Terminal -it flag (output from the container shows in the host Terminal screen and input, if prompted, is directed to the container's standard input) and --name ucp names the container ucp. The --rm removes the ucp container from the local node after the install finishes. We see the volume mount of the Docker socket with -v /var/run/docker.sock:/var/run/docker.sock used by the container to access the host's Docker daemon. Make sure you replace all of your node-specific values { ... } before running the install command. The next part of the command is docker/ucp:3.1.2 install with the following parameters:

  • --host-address is the internal IP address of UCP node on—something like 172.o.31.2.
  • --admin-username is the username for the main administrator account, usually something like admin.
  • --admin-password is the password for the main administrator account; this should be a strong password, where you may consider using a password generator. 
  • --san is a subject alternative name, another valid name for the certificate. UCP generates a self-signed certificate during installation and adds sans for each alternative name provided. See the following sample command, where we add any possible UCP IP or DNS name that might be used access the UCP node. This includes internal/external IP addresses as well as internal/external IP addresses. Without these, you may get x509 certificate errors when interacting with the UCP node.
  • --interactive is for interactive mode where the installer prompts for additional information when necessary.

Once the install completes successfully, it's time to log in. Since the --interactive flag is used, you may be prompted for additional information. 

主站蜘蛛池模板: 枣强县| 郑州市| 宁阳县| 海盐县| 大竹县| 葫芦岛市| 石渠县| 北海市| 安仁县| 普洱| 溧阳市| 江永县| 邵东县| 南靖县| 宿迁市| 喀喇沁旗| 阿荣旗| 台北市| 称多县| 拉萨市| 卓尼县| 沅江市| 长岭县| 晋江市| 瓦房店市| 台北县| 长垣县| 前郭尔| 泌阳县| 秦皇岛市| 浦北县| 洛浦县| 准格尔旗| 安阳县| 会泽县| 娱乐| 泽州县| 新宁县| 望奎县| 瑞金市| 遵义县|