Infrastructure at your Service

Karsten Lenz

Rancher installation on RHEL 8 compatible Linux

This Blog is about the installation of Rancher Community on a RHEL 8 compatible Linux, for this Blog i choose AlmaLinux 8.4, but i will also work on Rocky Linux 8.4 Release Candidate.
Base is an AlmaLinux / Rocky Linux minimal installation on a VMWare Host for all nodes, using the same configuration with 4vCPU and 4GB RAM.

A small comaprsion of RHEL 8 and the alternatives can be found in my other blog her:

CentOS 8 binary compatible alternatives

Rancher is doing everything out of running conatainers, so the control node itself is a running container using Docker as base.
So we need to install Docker on our minimal Linux system.

Add Docker Repository

$ [[[email protected] ~]$ dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
$ [[[email protected] ~]$

Install Docker

$ [[[email protected] ~]$ dnf install --nobest docker-ce -y
Docker CE Stable - x86_64                                                                                                                                                                                                                          46 kB/s |  14 kB     00:00
Dependencies resolved.
==========================================================================================================================================================================================================================================================================================
 Package                                                                   Architecture                                        Version                                                                                Repository                                                     Size
==========================================================================================================================================================================================================================================================================================
Installing:
 docker-ce                                                                 x86_64                                              3:20.10.7-3.el8                                                                        docker-ce-stable                                               27 M
Installing dependencies:
 checkpolicy                                                               x86_64                                              2.9-1.el8                                                                              baseos                                                        347 k
 container-selinux                                                         noarch                                              2:2.158.0-1.module_el8.4.0+2332+f4da7515                                               appstream                                                      50 k
 containerd.io                                                             x86_64                                              1.4.6-3.1.el8                                                                          docker-ce-stable                                               34 M
 docker-ce-cli                                                             x86_64                                              1:20.10.7-3.el8                                                                        docker-ce-stable                                               33 M
 docker-ce-rootless-extras                                                 x86_64                                              20.10.7-3.el8                                                                          docker-ce-stable                                              9.2 M
 docker-scan-plugin                                                        x86_64                                              0.8.0-3.el8                                                                            docker-ce-stable                                              4.2 M
 fuse-overlayfs                                                            x86_64                                              1.4.0-2.module_el8.4.0+2332+f4da7515                                                   appstream                                                      71 k
 fuse3                                                                     x86_64                                              3.2.1-12.el8                                                                           baseos                                                         50 k
 fuse3-libs                                                                x86_64                                              3.2.1-12.el8                                                                           baseos                                                         94 k
 libcgroup                                                                 x86_64                                              0.41-19.el8                                                                            baseos                                                         69 k
 libslirp                                                                  x86_64                                              4.3.1-1.module_el8.4.0+2332+f4da7515                                                   appstream                                                      68 k
 policycoreutils-python-utils                                              noarch                                              2.9-14.el8                                                                             baseos                                                        251 k
 python3-audit                                                             x86_64                                              3.0-0.17.20191104git1c2f876.el8                                                        baseos                                                         86 k
 python3-libsemanage                                                       x86_64                                              2.9-6.el8                                                                              baseos                                                        126 k
 python3-policycoreutils                                                   noarch                                              2.9-14.el8                                                                             baseos                                                        2.2 M
 python3-setools                                                           x86_64                                              4.3.0-2.el8                                                                            baseos                                                        625 k
 slirp4netns                                                               x86_64                                              1.1.8-1.module_el8.4.0+2332+f4da7515                                                   appstream                                                      50 k
Enabling module streams:
 container-tools                                                                                                               rhel8

Transaction Summary
==========================================================================================================================================================================================================================================================================================
Install  18 Packages

Total download size: 111 M
Installed size: 449 M
Downloading Packages:
(1/18): fuse3-libs-3.2.1-12.el8.x86_64.rpm                                                                                                                                                                                                                416 kB/s |  94 kB     00:00
(2/18): fuse3-3.2.1-12.el8.x86_64.rpm                                                                                                                                                                                                                     217 kB/s |  50 kB     00:00
(3/18): libcgroup-0.41-19.el8.x86_64.rpm                                                                                                                                                                                                                  2.4 MB/s |  69 kB     00:00
(4/18): checkpolicy-2.9-1.el8.x86_64.rpm                                                                                                                                                                                                                  1.2 MB/s | 347 kB     00:00
(5/18): python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64.rpm                                                                                                                                                                                          3.7 MB/s |  86 kB     00:00
(6/18): policycoreutils-python-utils-2.9-14.el8.noarch.rpm                                                                                                                                                                                                3.8 MB/s | 251 kB     00:00
(7/18): python3-libsemanage-2.9-6.el8.x86_64.rpm                                                                                                                                                                                                          4.5 MB/s | 126 kB     00:00
(8/18): container-selinux-2.158.0-1.module_el8.4.0+2332+f4da7515.noarch.rpm                                                                                                                                                                               2.0 MB/s |  50 kB     00:00
(9/18): fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64.rpm                                                                                                                                                                                    3.1 MB/s |  71 kB     00:00
(10/18): libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64.rpm                                                                                                                                                                                         3.2 MB/s |  68 kB     00:00
(11/18): python3-setools-4.3.0-2.el8.x86_64.rpm                                                                                                                                                                                                           6.3 MB/s | 625 kB     00:00
(12/18): slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64.rpm                                                                                                                                                                                      1.9 MB/s |  50 kB     00:00
(13/18): python3-policycoreutils-2.9-14.el8.noarch.rpm                                                                                                                                                                                                    8.6 MB/s | 2.2 MB     00:00
(14/18): docker-ce-20.10.7-3.el8.x86_64.rpm                                                                                                                                                                                                                17 MB/s |  27 MB     00:01
(15/18): containerd.io-1.4.6-3.1.el8.x86_64.rpm                                                                                                                                                                                                            17 MB/s |  34 MB     00:01
(16/18): docker-ce-cli-20.10.7-3.el8.x86_64.rpm                                                                                                                                                                                                            16 MB/s |  33 MB     00:02
(17/18): docker-ce-rootless-extras-20.10.7-3.el8.x86_64.rpm                                                                                                                                                                                                13 MB/s | 9.2 MB     00:00
(18/18): docker-scan-plugin-0.8.0-3.el8.x86_64.rpm                                                                                                                                                                                                         15 MB/s | 4.2 MB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                                      36 MB/s | 111 MB     00:03
warning: /var/cache/dnf/docker-ce-stable-fa9dc42ab4cec2f4/packages/containerd.io-1.4.6-3.1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Docker CE Stable - x86_64                                                                                                                                                                                                                                  24 kB/s | 1.6 kB     00:00
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) "
 Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
 From       : https://download.docker.com/linux/centos/gpg
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                                                                  1/1
  Installing       : docker-scan-plugin-0.8.0-3.el8.x86_64                                                                                                                                                                                                                           1/18
  Running scriptlet: docker-scan-plugin-0.8.0-3.el8.x86_64                                                                                                                                                                                                                           1/18
  Installing       : docker-ce-cli-1:20.10.7-3.el8.x86_64                                                                                                                                                                                                                            2/18
  Running scriptlet: docker-ce-cli-1:20.10.7-3.el8.x86_64                                                                                                                                                                                                                            2/18
  Installing       : libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                            3/18
  Installing       : slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                         4/18
  Installing       : python3-setools-4.3.0-2.el8.x86_64                                                                                                                                                                                                                              5/18
  Installing       : python3-libsemanage-2.9-6.el8.x86_64                                                                                                                                                                                                                            6/18
  Installing       : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64                                                                                                                                                                                                            7/18
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    8/18
  Installing       : libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    8/18
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    8/18
  Installing       : fuse3-libs-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                  9/18
  Running scriptlet: fuse3-libs-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                  9/18
  Installing       : fuse3-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                      10/18
  Installing       : fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                     11/18
  Running scriptlet: fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                     11/18
  Installing       : checkpolicy-2.9-1.el8.x86_64                                                                                                                                                                                                                                   12/18
  Installing       : python3-policycoreutils-2.9-14.el8.noarch                                                                                                                                                                                                                      13/18
  Installing       : policycoreutils-python-utils-2.9-14.el8.noarch                                                                                                                                                                                                                 14/18
  Running scriptlet: container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              15/18
  Installing       : container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              15/18
  Running scriptlet: container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              15/18
  Installing       : containerd.io-1.4.6-3.1.el8.x86_64                                                                                                                                                                                                                             16/18
  Running scriptlet: containerd.io-1.4.6-3.1.el8.x86_64                                                                                                                                                                                                                             16/18
  Installing       : docker-ce-rootless-extras-20.10.7-3.el8.x86_64                                                                                                                                                                                                                 17/18
  Running scriptlet: docker-ce-rootless-extras-20.10.7-3.el8.x86_64                                                                                                                                                                                                                 17/18
  Installing       : docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               18/18
  Running scriptlet: docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               18/18
  Running scriptlet: container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              18/18
  Running scriptlet: docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               18/18
  Verifying        : checkpolicy-2.9-1.el8.x86_64                                                                                                                                                                                                                                    1/18
  Verifying        : fuse3-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                       2/18
  Verifying        : fuse3-libs-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                  3/18
  Verifying        : libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    4/18
  Verifying        : policycoreutils-python-utils-2.9-14.el8.noarch                                                                                                                                                                                                                  5/18
  Verifying        : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64                                                                                                                                                                                                            6/18
  Verifying        : python3-libsemanage-2.9-6.el8.x86_64                                                                                                                                                                                                                            7/18
  Verifying        : python3-policycoreutils-2.9-14.el8.noarch                                                                                                                                                                                                                       8/18
  Verifying        : python3-setools-4.3.0-2.el8.x86_64                                                                                                                                                                                                                              9/18
  Verifying        : container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              10/18
  Verifying        : fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                     11/18
  Verifying        : libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                           12/18
  Verifying        : slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                        13/18
  Verifying        : containerd.io-1.4.6-3.1.el8.x86_64                                                                                                                                                                                                                             14/18
  Verifying        : docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               15/18
  Verifying        : docker-ce-cli-1:20.10.7-3.el8.x86_64                                                                                                                                                                                                                           16/18
  Verifying        : docker-ce-rootless-extras-20.10.7-3.el8.x86_64                                                                                                                                                                                                                 17/18
  Verifying        : docker-scan-plugin-0.8.0-3.el8.x86_64                                                                                                                                                                                                                          18/18

Installed:
  checkpolicy-2.9-1.el8.x86_64                      container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch    containerd.io-1.4.6-3.1.el8.x86_64                            docker-ce-3:20.10.7-3.el8.x86_64                        docker-ce-cli-1:20.10.7-3.el8.x86_64
  docker-ce-rootless-extras-20.10.7-3.el8.x86_64    docker-scan-plugin-0.8.0-3.el8.x86_64                                fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64    fuse3-3.2.1-12.el8.x86_64                               fuse3-libs-3.2.1-12.el8.x86_64
  libcgroup-0.41-19.el8.x86_64                      libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64                 policycoreutils-python-utils-2.9-14.el8.noarch                python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64    python3-libsemanage-2.9-6.el8.x86_64
  python3-policycoreutils-2.9-14.el8.noarch         python3-setools-4.3.0-2.el8.x86_64                                   slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64

Complete!
$ [[[email protected] ~]$

Start and enable Docker

$ [[[email protected] ~]$ systemctl daemon-reload
$ [[[email protected] ~]$ systemctl start docker
$ [[[email protected] ~]$ systemctl enable docker
$ [[[email protected] ~]$ Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
$ [[[email protected] ~]$

Now Docker is installed, up and running and configured to start automatically on boot.

Installing the Rachner Control Container using port 8080 for the webfrontend

$ [[[email protected] ~]$ docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable
$ [[[email protected] ~]$ Unable to find image 'rancher/server:stable' locally
$ [[[email protected] ~]$ stable: Pulling from rancher/server
$ [[[email protected] ~]$ bae382666908: Pull complete
$ [[[email protected] ~]$ 29ede3c02ff2: Pull complete
$ [[[email protected] ~]$ da4e69f33106: Pull complete
$ [[[email protected] ~]$ 8d43e5f5d27f: Pull complete
$ [[[email protected] ~]$ b0de1abb17d6: Pull complete
$ [[[email protected] ~]$ 422f47db4517: Pull complete
$ [[[email protected] ~]$ 79d37de643ce: Pull complete
$ [[[email protected] ~]$ 69d13e08a4fe: Pull complete
$ [[[email protected] ~]$ 2ddfd3c6a2b7: Pull complete
$ [[[email protected] ~]$ bc433fed3823: Pull complete
$ [[[email protected] ~]$ b82e188df556: Pull complete
$ [[[email protected] ~]$ dae2802428a4: Pull complete
$ [[[email protected] ~]$ 07bf18e8eec0: Pull complete
$ [[[email protected] ~]$ 339e24088f91: Pull complete
$ [[[email protected] ~]$ 9372455de0b8: Pull complete
$ [[[email protected] ~]$ 5a33b348bf45: Pull complete
$ [[[email protected] ~]$ 3286997d8874: Pull complete
$ [[[email protected] ~]$ bd79bfb954de: Pull complete
$ [[[email protected] ~]$ ba7c19991a31: Pull complete
$ [[[email protected] ~]$ 0c19aca4f8a1: Pull complete
$ [[[email protected] ~]$ e03fc76c8997: Pull complete
$ [[[email protected] ~]$ Digest: sha256:95b55603122c28baea4e8d94663aa34ad770bbc624a9ed6ef986fb3ea5224d91
$ [[[email protected] ~]$ Status: Downloaded newer image for rancher/server:stable
$ [[[email protected] ~]$ b3db9a254b284f8f3f048bea8d68a0efd3786dd77d35d4fd0245199b179339fa
$ [[[email protected] ~]$

Check status

$ [[[email protected] ~]$ docker ps -a
$ [[[email protected] ~]$ CONTAINER ID   IMAGE                   COMMAND                  CREATED          STATUS          PORTS                                                 NAMES
$ [[[email protected] ~]$ b3db9a254b28   rancher/server:stable   "/usr/bin/entry /usr…"   16 seconds ago   Up 14 seconds   3306/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   flamboyant_lehmann
$ [[[email protected] ~]$

Now the Rancher control container is up and running.

No installing the worker nodes, this is also an eaysy step, the Docker installation is the same like we did for the control node.
Add Docker Repository

$ [[[email protected]~]$ dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
$ [[[email protected]~]$

Install Docker

$ [[[email protected] ~]$ dnf install --nobest docker-ce -y
Docker CE Stable - x86_64                                                                                                                                                                                                                          46 kB/s |  14 kB     00:00
Dependencies resolved.
==========================================================================================================================================================================================================================================================================================
 Package                                                                   Architecture                                        Version                                                                                Repository                                                     Size
==========================================================================================================================================================================================================================================================================================
Installing:
 docker-ce                                                                 x86_64                                              3:20.10.7-3.el8                                                                        docker-ce-stable                                               27 M
Installing dependencies:
 checkpolicy                                                               x86_64                                              2.9-1.el8                                                                              baseos                                                        347 k
 container-selinux                                                         noarch                                              2:2.158.0-1.module_el8.4.0+2332+f4da7515                                               appstream                                                      50 k
 containerd.io                                                             x86_64                                              1.4.6-3.1.el8                                                                          docker-ce-stable                                               34 M
 docker-ce-cli                                                             x86_64                                              1:20.10.7-3.el8                                                                        docker-ce-stable                                               33 M
 docker-ce-rootless-extras                                                 x86_64                                              20.10.7-3.el8                                                                          docker-ce-stable                                              9.2 M
 docker-scan-plugin                                                        x86_64                                              0.8.0-3.el8                                                                            docker-ce-stable                                              4.2 M
 fuse-overlayfs                                                            x86_64                                              1.4.0-2.module_el8.4.0+2332+f4da7515                                                   appstream                                                      71 k
 fuse3                                                                     x86_64                                              3.2.1-12.el8                                                                           baseos                                                         50 k
 fuse3-libs                                                                x86_64                                              3.2.1-12.el8                                                                           baseos                                                         94 k
 libcgroup                                                                 x86_64                                              0.41-19.el8                                                                            baseos                                                         69 k
 libslirp                                                                  x86_64                                              4.3.1-1.module_el8.4.0+2332+f4da7515                                                   appstream                                                      68 k
 policycoreutils-python-utils                                              noarch                                              2.9-14.el8                                                                             baseos                                                        251 k
 python3-audit                                                             x86_64                                              3.0-0.17.20191104git1c2f876.el8                                                        baseos                                                         86 k
 python3-libsemanage                                                       x86_64                                              2.9-6.el8                                                                              baseos                                                        126 k
 python3-policycoreutils                                                   noarch                                              2.9-14.el8                                                                             baseos                                                        2.2 M
 python3-setools                                                           x86_64                                              4.3.0-2.el8                                                                            baseos                                                        625 k
 slirp4netns                                                               x86_64                                              1.1.8-1.module_el8.4.0+2332+f4da7515                                                   appstream                                                      50 k
Enabling module streams:
 container-tools                                                                                                               rhel8

Transaction Summary
==========================================================================================================================================================================================================================================================================================
Install  18 Packages

Total download size: 111 M
Installed size: 449 M
Downloading Packages:
(1/18): fuse3-libs-3.2.1-12.el8.x86_64.rpm                                                                                                                                                                                                                416 kB/s |  94 kB     00:00
(2/18): fuse3-3.2.1-12.el8.x86_64.rpm                                                                                                                                                                                                                     217 kB/s |  50 kB     00:00
(3/18): libcgroup-0.41-19.el8.x86_64.rpm                                                                                                                                                                                                                  2.4 MB/s |  69 kB     00:00
(4/18): checkpolicy-2.9-1.el8.x86_64.rpm                                                                                                                                                                                                                  1.2 MB/s | 347 kB     00:00
(5/18): python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64.rpm                                                                                                                                                                                          3.7 MB/s |  86 kB     00:00
(6/18): policycoreutils-python-utils-2.9-14.el8.noarch.rpm                                                                                                                                                                                                3.8 MB/s | 251 kB     00:00
(7/18): python3-libsemanage-2.9-6.el8.x86_64.rpm                                                                                                                                                                                                          4.5 MB/s | 126 kB     00:00
(8/18): container-selinux-2.158.0-1.module_el8.4.0+2332+f4da7515.noarch.rpm                                                                                                                                                                               2.0 MB/s |  50 kB     00:00
(9/18): fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64.rpm                                                                                                                                                                                    3.1 MB/s |  71 kB     00:00
(10/18): libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64.rpm                                                                                                                                                                                         3.2 MB/s |  68 kB     00:00
(11/18): python3-setools-4.3.0-2.el8.x86_64.rpm                                                                                                                                                                                                           6.3 MB/s | 625 kB     00:00
(12/18): slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64.rpm                                                                                                                                                                                      1.9 MB/s |  50 kB     00:00
(13/18): python3-policycoreutils-2.9-14.el8.noarch.rpm                                                                                                                                                                                                    8.6 MB/s | 2.2 MB     00:00
(14/18): docker-ce-20.10.7-3.el8.x86_64.rpm                                                                                                                                                                                                                17 MB/s |  27 MB     00:01
(15/18): containerd.io-1.4.6-3.1.el8.x86_64.rpm                                                                                                                                                                                                            17 MB/s |  34 MB     00:01
(16/18): docker-ce-cli-20.10.7-3.el8.x86_64.rpm                                                                                                                                                                                                            16 MB/s |  33 MB     00:02
(17/18): docker-ce-rootless-extras-20.10.7-3.el8.x86_64.rpm                                                                                                                                                                                                13 MB/s | 9.2 MB     00:00
(18/18): docker-scan-plugin-0.8.0-3.el8.x86_64.rpm                                                                                                                                                                                                         15 MB/s | 4.2 MB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                                      36 MB/s | 111 MB     00:03
warning: /var/cache/dnf/docker-ce-stable-fa9dc42ab4cec2f4/packages/containerd.io-1.4.6-3.1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Docker CE Stable - x86_64                                                                                                                                                                                                                                  24 kB/s | 1.6 kB     00:00
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) "
 Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
 From       : https://download.docker.com/linux/centos/gpg
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                                                                  1/1
  Installing       : docker-scan-plugin-0.8.0-3.el8.x86_64                                                                                                                                                                                                                           1/18
  Running scriptlet: docker-scan-plugin-0.8.0-3.el8.x86_64                                                                                                                                                                                                                           1/18
  Installing       : docker-ce-cli-1:20.10.7-3.el8.x86_64                                                                                                                                                                                                                            2/18
  Running scriptlet: docker-ce-cli-1:20.10.7-3.el8.x86_64                                                                                                                                                                                                                            2/18
  Installing       : libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                            3/18
  Installing       : slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                         4/18
  Installing       : python3-setools-4.3.0-2.el8.x86_64                                                                                                                                                                                                                              5/18
  Installing       : python3-libsemanage-2.9-6.el8.x86_64                                                                                                                                                                                                                            6/18
  Installing       : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64                                                                                                                                                                                                            7/18
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    8/18
  Installing       : libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    8/18
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    8/18
  Installing       : fuse3-libs-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                  9/18
  Running scriptlet: fuse3-libs-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                  9/18
  Installing       : fuse3-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                      10/18
  Installing       : fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                     11/18
  Running scriptlet: fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                     11/18
  Installing       : checkpolicy-2.9-1.el8.x86_64                                                                                                                                                                                                                                   12/18
  Installing       : python3-policycoreutils-2.9-14.el8.noarch                                                                                                                                                                                                                      13/18
  Installing       : policycoreutils-python-utils-2.9-14.el8.noarch                                                                                                                                                                                                                 14/18
  Running scriptlet: container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              15/18
  Installing       : container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              15/18
  Running scriptlet: container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              15/18
  Installing       : containerd.io-1.4.6-3.1.el8.x86_64                                                                                                                                                                                                                             16/18
  Running scriptlet: containerd.io-1.4.6-3.1.el8.x86_64                                                                                                                                                                                                                             16/18
  Installing       : docker-ce-rootless-extras-20.10.7-3.el8.x86_64                                                                                                                                                                                                                 17/18
  Running scriptlet: docker-ce-rootless-extras-20.10.7-3.el8.x86_64                                                                                                                                                                                                                 17/18
  Installing       : docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               18/18
  Running scriptlet: docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               18/18
  Running scriptlet: container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              18/18
  Running scriptlet: docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               18/18
  Verifying        : checkpolicy-2.9-1.el8.x86_64                                                                                                                                                                                                                                    1/18
  Verifying        : fuse3-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                       2/18
  Verifying        : fuse3-libs-3.2.1-12.el8.x86_64                                                                                                                                                                                                                                  3/18
  Verifying        : libcgroup-0.41-19.el8.x86_64                                                                                                                                                                                                                                    4/18
  Verifying        : policycoreutils-python-utils-2.9-14.el8.noarch                                                                                                                                                                                                                  5/18
  Verifying        : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64                                                                                                                                                                                                            6/18
  Verifying        : python3-libsemanage-2.9-6.el8.x86_64                                                                                                                                                                                                                            7/18
  Verifying        : python3-policycoreutils-2.9-14.el8.noarch                                                                                                                                                                                                                       8/18
  Verifying        : python3-setools-4.3.0-2.el8.x86_64                                                                                                                                                                                                                              9/18
  Verifying        : container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch                                                                                                                                                                                              10/18
  Verifying        : fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                     11/18
  Verifying        : libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                           12/18
  Verifying        : slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64                                                                                                                                                                                                        13/18
  Verifying        : containerd.io-1.4.6-3.1.el8.x86_64                                                                                                                                                                                                                             14/18
  Verifying        : docker-ce-3:20.10.7-3.el8.x86_64                                                                                                                                                                                                                               15/18
  Verifying        : docker-ce-cli-1:20.10.7-3.el8.x86_64                                                                                                                                                                                                                           16/18
  Verifying        : docker-ce-rootless-extras-20.10.7-3.el8.x86_64                                                                                                                                                                                                                 17/18
  Verifying        : docker-scan-plugin-0.8.0-3.el8.x86_64                                                                                                                                                                                                                          18/18

Installed:
  checkpolicy-2.9-1.el8.x86_64                      container-selinux-2:2.158.0-1.module_el8.4.0+2332+f4da7515.noarch    containerd.io-1.4.6-3.1.el8.x86_64                            docker-ce-3:20.10.7-3.el8.x86_64                        docker-ce-cli-1:20.10.7-3.el8.x86_64
  docker-ce-rootless-extras-20.10.7-3.el8.x86_64    docker-scan-plugin-0.8.0-3.el8.x86_64                                fuse-overlayfs-1.4.0-2.module_el8.4.0+2332+f4da7515.x86_64    fuse3-3.2.1-12.el8.x86_64                               fuse3-libs-3.2.1-12.el8.x86_64
  libcgroup-0.41-19.el8.x86_64                      libslirp-4.3.1-1.module_el8.4.0+2332+f4da7515.x86_64                 policycoreutils-python-utils-2.9-14.el8.noarch                python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64    python3-libsemanage-2.9-6.el8.x86_64
  python3-policycoreutils-2.9-14.el8.noarch         python3-setools-4.3.0-2.el8.x86_64                                   slirp4netns-1.1.8-1.module_el8.4.0+2332+f4da7515.x86_64

Complete!
$ [[[email protected] ~]$

The worker nodes need two open ports to work proberly, port 500 udp and port 4500 udp.

$ [[[email protected] ~]$ firewall-cmd --zone=public --permanent --add-port 500/udp
$ [[[email protected] ~]$ success
$ [[[email protected] ~]$[firewall-cmd --zone=public --permanent --add-port 4500/udp
$ [[[email protected] ~]$ success
$ [[[email protected] ~]$ firewall-cmd --reload
$ [[[email protected] ~]$ success
$ [[[email protected] ~]$

No it is time to register the worker node, for that go to in the webfrontend from the control node to Infrastructure -> Hosts.
There at first will come a question if the control node is reachable over the url, please accept.

Adding a Host, marked is the url as docker command to tegister a agent / worker node at the control node.

Adding the agent / worker node using the url provide by the control node:

$ [[[email protected] ~]$ docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.11 http://192.168.198.128:8080/v1/scripts/3E86E8E2646B5571AAEE:1609372800000:HQWlTmjzKhd4MGvQP8fs2n7jlZQ
$ [[[email protected] ~]$ Unable to find image 'rancher/agent:v1.2.11' locally
$ [[[email protected] ~]$ v1.2.11: Pulling from rancher/agent
$ [[[email protected] ~]$ b3e1c725a85f: Pull complete
$ [[[email protected] ~]$ 6a710864a9fc: Pull complete
$ [[[email protected] ~]$ d0ac3b234321: Pull complete
$ [[[email protected] ~]$ 87f567b5cf58: Pull complete
$ [[[email protected] ~]$ 063e24b217c4: Pull complete
$ [[[email protected] ~]$ d0a3f58caef0: Pull complete
$ [[[email protected] ~]$ 16914729cfd3: Pull complete
$ [[[email protected] ~]$ bbad862633b9: Pull complete
$ [[[email protected] ~]$ 3cf9849d7f3c: Pull complete
$ [[[email protected] ~]$ Digest: sha256:0fba3fb10108f7821596dc5ad4bfa30e93426d034cd3471f6ccd3afb5f87a963
$ [[[email protected] ~]$ Status: Downloaded newer image for rancher/agent:v1.2.11
$ [[[email protected] ~]$ 
$ [[[email protected] ~]$ INFO: Running Agent Registration Process, CATTLE_URL=http://192.168.198.128:8080/v1
$ [[[email protected] ~]$ INFO: Attempting to connect to: http://192.168.198.128:8080/v1
$ [[[email protected] ~]$ INFO: http://192.168.198.128:8080/v1 is accessible
$ [[[email protected] ~]$ INFO: Configured Host Registration URL info: CATTLE_URL=http://192.168.198.128:8080/v1 ENV_URL=http://192.168.198.128:8080/v1
$ [[[email protected] ~]$ INFO: Inspecting host capabilities
$ [[[email protected] ~]$ INFO: Boot2Docker: false
$ [[[email protected] ~]$ INFO: Host writable: true
$ [[[email protected] ~]$ INFO: Token: xxxxxxxx
$ [[[email protected] ~]$ INFO: Running registration
$ [[[email protected] ~]$ INFO: Printing Environment
$ [[[email protected] ~]$ INFO: ENV: CATTLE_ACCESS_KEY=5E71550625C281E062F5
$ [[[email protected] ~]$ INFO: ENV: CATTLE_HOME=/var/lib/cattle
$ [[[email protected] ~]$ INFO: ENV: CATTLE_REGISTRATION_ACCESS_KEY=registrationToken
$ [[[email protected] ~]$ INFO: ENV: CATTLE_REGISTRATION_SECRET_KEY=xxxxxxx
$ [[[email protected] ~]$ INFO: ENV: CATTLE_SECRET_KEY=xxxxxxx
$ [[[email protected] ~]$ INFO: ENV: CATTLE_URL=http://192.168.198.128:8080/v1
$ [[[email protected] ~]$ INFO: ENV: DETECTED_CATTLE_AGENT_IP=192.168.198.129
$ [[[email protected] ~]$ INFO: ENV: RANCHER_AGENT_IMAGE=rancher/agent:v1.2.11
$ [[[email protected] ~]$ INFO: Launched Rancher Agent: 78fba978ef03b9d0604a8bd8ea580a01aa4bb3a0c2cd900d4898d7bc0097c721
$ [[[email protected] ~]$

Waiting a few minutes and the agents are registered:

Running container on a fresh installation:

No it is time to play with containers, this is a good test installation for the first steps using Rancher:

I choose a PostgreSQL container latest PostgreSQL Version:

And a fiew seconds later the containers are up and running:

Load Balancer looks like outdated lets upgrade:

Just click on upgrade, wait a few seconds and everything is up to date, up and running.

Rancher Community is a good choice for starting with container technologies.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Karsten Lenz
Karsten Lenz

Consultant