6.1 Installing Docker and Docker Compose

As ZENworks aims to adopt a more robust and flexible architecture, you are required to install Docker and Docker Compose on the Linux Primary Server on which the ZENworks server software will be installed.

  • Docker Version: Docker v19.x or higher should be installed on the server on which the ZENworks Primary Server software will be installed.

  • Docker Compose Version: Docker Compose v1.28.x or higher should be installed on the server on which the ZENworks Primary Server software will be installed.

6.1.1 Installing Docker

The procedure detailed in this section will enable you to download the latest version of Docker.

  1. After registering to SUSE Customer Center, generate a registration key for the operating system version of your Primary Server and register the device with the SUSE Customer Center.

  2. Start YaST.

  3. In the Administrator Settings window, select Software > Software Repositories.

  4. Click Add to open the Add On Product dialog box.

  5. Select Extensions and Modules from the Registration Server.... Click Next.

  6. From the list of Available Extensions and Modules, based on the platform version, select one of the following container modules. Click Next and Finish the wizard. The modules and its repositories will be added to your system.

    • SLES 12 SP3, SLES 12 SP4, SLES 12 SP5: Containers Module 12 x86_64

    • SLES 15: Containers Module 15 x86_64

    • SLES 15 SP1: Containers Module 15 SP1 x86_64

  7. On the Linux terminal, execute the following command to install the Docker package:

    $ sudo zypper install docker

    NOTE:If the zypper install docker command fails to install docker, then run the following command to check whether the container module has been added to the repository:

    $ sudo zypper ls

    If the container module has not been added, then run the following command to add the container module:

    For SLES 12 SP3, SLES 12 SP4, SLES 12 SP5:

    $ sudo SUSEConnect -p sle-module-containers/12/x86_64

    For SLES 15:

    $ sudo SUSEConnect -p sle-module-containers/15/x86_64

    For SLES 15 SP1:

    $ sudo SUSEConnect -p sle-module-containers/15.1/x86_64
  8. Execute the following command to enable the Docker services:

    $ sudo systemctl enable docker.service
  9. Execute the following command to start the Docker service:

    $ sudo systemctl start docker.service
  10. Execute the following command to test whether Docker has been installed properly:

    $ docker run hello-world

    If the message Hello from Docker! is displayed, then it indicates that Docker has been installed successfully.

6.1.2 Installing Docker Compose

Before installing Docker Compose, ensure that you have already installed the Docker engine as elaborated in the previous section.

  1. On the Linux terminal, run the following command to download the latest release of Docker Compose, in this case Docker Compose version 1.28.2:

    $ sudo curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

    NOTE:If the server does not have Internet access and communicates through a proxy server, then refer to the curl man page for configuring curl to use proxy.

  2. Run the following command to apply executable permissions to the binary:

    $ sudo chmod +x /usr/local/bin/docker-compose

    NOTE:If the docker-compose command fails after installation, check the path. You can also create a symbolic link to /usr/bin or any other directory in your path.

    Example:

    $ sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
  3. Test the installation by running the following command. The Docker Compose version will be displayed.

    $ docker-compose --version

NOTE:The latest release versions of Docker Compose is published in https://github.com/docker/compose/releases. To upgrade to the latest release, follow the steps displayed under the Linux tab in https://docs.docker.com/compose/install/. However, before upgrading Docker Compose to the latest version, ensure that you stop the ZENworks services. For more information on stopping these services, see Stopping the ZENworks Services.

6.1.3 Changing the Internal Docker IP

By default, docker internally uses the IP 172.17.0.1/16. In case this IP conflicts with any other device or network in your organization, only then the docker IP should be changed.

To change the internal docker IP that is being used, perform the following steps:

  1. Stop all the ZENworks services by running the microfocus-zenworks-configure -c Start command.

  2. Modify the daemon.json file available in the /etc/docker/, and add the line "bip":"<IP_address>", to the start of the file, as shown in the below image:

    NOTE:You can use any private IP that is not being used by your organization.

    In above example we have used 192.168.2.1/24

  3. Restart the docker service by running the following command:

    systemctl restart docker

  4. Start all the ZENworks services by running the microfocus-zenworks-configure -c Start command.