Configuring Docker and loading images
- Log in to the master host as root, or as a user with superuser privileges.
Create a symbolic link for the Docker temporary directory.
Docker uses its temporary directory to spool images. The default directory is /var/lib/docker/tmp. The following command specifies the same directory that Control Center uses, /tmp. You can specify any directory that has a minimum of 10GB of unused space.
Create the docker directory in /var/lib.
Create the link to /tmp.
ln -s /tmp /var/lib/docker/tmp
- Create the docker directory in /var/lib.
Create a systemd drop-in file
Create the override directory.
mkdir -p /etc/systemd/system/docker.service.d
Create the unit drop-in file.
cat <<EOF > /etc/systemd/system/docker.service.d/docker.conf [Service] TimeoutSec=300 EnvironmentFile=-/etc/sysconfig/docker ExecStart= ExecStart=/usr/bin/dockerd \$OPTIONS TasksMax=infinity EOF
Reload the systemd manager configuration.
- Create the override directory.
Create an LVM thin pool for Docker data.
For more information about the serviced-storage command, see serviced-storage.To use an entire block device or partition for the thin pool, replace Device-Path with the device path:
serviced-storage create-thin-pool docker Device-PathOn success, the result is the device mapper name of the thin pool, which always starts with /dev/mapper.
Configure and start the Docker service.
Create a variable for the name of the Docker thin pool.
Replace Thin-Pool-Device with the name of the thin pool device created in the previous step:
Create variables for adding arguments to the Docker configuration
file. The --exec-opt argument is a workaround
for a Docker issue on RHEL/CentOS 7.x systems.
myDriver="--storage-driver devicemapper" myLog="--log-level=error" myFix="--exec-opt native.cgroupdriver=cgroupfs" myMount="--storage-opt dm.mountopt=discard" myFlag="--storage-opt dm.thinpooldev=$myPool"
Add the arguments to the Docker configuration file.
echo 'OPTIONS="'$myLog $myDriver $myFix $myMount $myFlag'"' \ >> /etc/sysconfig/docker
Start or restart Docker.
systemctl restart dockerThe startup may take up to a minute, and may fail. If startup fails, repeat the restart command.
- Create a variable for the name of the Docker thin pool.
Configure name resolution in containers.
Each time it starts, docker selects an IPv4 subnet for its virtual Ethernet bridge. The selection can change; this step ensures consistency.
Identify the IPv4 subnet and netmask docker
has selected for its virtual Ethernet bridge.
ip addr show docker0 | grep inet
- Open /etc/sysconfig/docker in a text editor.
Add the following flags to the end of
the OPTIONS declaration.
Replace Bridge-Subnet with the IPv4 subnet docker selected for its virtual bridge:
--dns=Bridge-Subnet --bip=Bridge-Subnet/16For example, if the bridge subnet is 172.17.0.1, add the following flags:
- Save the file, and then close the editor.
Restart the Docker service.
systemctl restart docker
- Identify the IPv4 subnet and netmask docker has selected for its virtual Ethernet bridge.
Import the Control Center images into the local
The images are contained in the self-extracting archive files that are staged in /root.
Change directory to /root.
Extract the images.
for image in install-zenoss-*.run do /bin/echo -n "$image: " ./$image doneImage extraction begins when you press y. If you press y and then Enter, the current image is extracted, but the next one is not.
Delete the archive files, if desired.
rm -i ./install-zenoss-*.run
- Change directory to /root.
Stop and disable the Docker service.
The cluster management software controls the Docker service.
systemctl stop docker && systemctl disable docker