Installing Docker

The StorageGRID Webscale system runs on Red Hat Enterprise Linux or CentOS as a collection of Docker containers. Before you can install StorageGRID Webscale, you must install Docker.

About this task

When using Docker with Red Hat Enterprise Linux, you must use either the overlay2 storage driver or the devicemapper storage driver.
  • If the Red Hat Enterprise Linux version is 7.5 or later, the overlay2 storage driver is the recommended storage driver.
  • If the Red Hat Enterprise Linux version is earlier than 7.5, the devicemapper storage driver is the recommended storage driver. On production systems using devicemapper, you must use direct-lvm mode.

For details about the overlay2 and devicemapper storage drivers, see the Docker documentation and your installation instructions for Red Hat Enterprise Linux.

Steps

  1. If you are installing Docker on Red Hat Enterprise Linux, activate the RHEL Extras channel.
    sudo subscription-manager repos --enable rhel-7-server-extras-rpms
    Note: The CentOS Extras repository is enabled by default.
  2. Install Docker.
    sudo yum install docker
  3. Confirm you have installed the expected version of Docker by entering the following:
    sudo docker version
    The Client and Server versions must be 1.10.3 or later.
    Client:
      Version: 1.10.3
      API version: 1.22
      Package version: docker-common-1.10.3-46.el7.14.x86_64
      Go version: go1.6.2
      Git commit: 5206701-unsupported
      Built: Mon Aug 29 14:00:01 2016
      OS/Arch: linux/amd64
    
    Server:
      Version: 1.10.3
      API version: 1.22
      Package version: docker-common-1.10.3-46.el7.14.x86_64
      Go version: go1.6.2
      Git commit: 5206701-unsupported
      Built: Mon Aug 29 14:00:01 2016
      OS/Arch: linux/amd64
  4. Determine which storage driver you are using:
    • If the Red Hat Enterprise Linux version is 7.5 or later, you have the overlay2 storage driver, which does not need to be configured. Go to step 5.
    • If the Red Hat Enterprise Linux version is earlier than 7.5, you have the devicemapper storage driver. By default, this storage driver is configured in loopback-lvm mode, which is not suitable for production. Follow these steps to configure the storage driver in direct-lvm mode.
    1. After completing the Docker installation on a host, enter the command: sudo docker info
      If the output of this command shows that the Data loop file and Metadata loop file are underneath /var/lib/docker/devicemapper/devicemapper, then Docker is configured in loopback-lvm mode.
    2. Reconfigure Docker in direct-lvm mode before continuing with this installation process.

      You will use the Docker storage pool volume you allocated for each host when configuring host storage as the block device backing your dm.thinpooldev container storage pool. The referenced instructions use the example block device name /dev/xvdf. You must replace /dev/xvdf with the persistent name of the Docker storage pool volume allocated to the host on which you are reconfiguring docker.

      Attention: If you use shared storage for the Docker storage pool volumes, you must use a different physical volume for each host. System data will be corrupted if two hosts attempt to use the same Docker storage pool volume for container storage.
  5. Run the following two commands to enable and start Docker:
    sudo systemctl enable docker
    sudo systemctl start docker