How to install IML using Docker stack

Software Installation Guide Table of Contents

Starting with Integrated Manager for Lustre 5, the IML manager can be installed via docker using docker stack.

There are two ways to use the IML manager with Docker:

  1. With RPM + systemd (RHEL only)
  2. Without RPM

Usage with RPM

  1. Install Docker on your host and init the swarm

    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    yum install -y docker-ce
    systemctl enable --now docker
    docker swarm init --advertise-addr=127.0.0.1 --listen-addr=127.0.0.1
    
  2. Pull down the iml-docker RPM and install it

    yum install -y yum-plugin-copr
    yum copr enable -y managerforlustre/manager-for-lustre-devel
    yum install -y iml-docker
    
  3. Create the file /etc/iml-docker/docker-compose.overrides.yml. It should contain host to ip mappings for each storage server and any other necessary overrides.

    version: "3.7"
    services:
      job-scheduler:
        extra_hosts:
          - "<STORAGE_SERVER_X_NAME>:<STORAGE_SERVER_X_IP>"
          - "<STORAGE_SERVER_Y_NAME>:<STORAGE_SERVER_Y_IP>"
          - ...
        environment:
          - "NTP_SERVER_HOSTNAME=<NTP_TIMESERVER_ADDRESS>"
    
  4. Create a docker secret with a new root IML password

     echo <PASSWORD_HERE> | docker secret create iml_pw -
    
  5. Run systemctl enable --now iml-docker. This will start the swarm and block until services are available.

  6. Add an entry to each storage server’s hostfile that maps the docker OS host IP to nginx

    <HOST_IP>	nginx
    
  7. Start the stack with systemctl start iml-docker

  8. Login to the GUI via https:://<HOSTNAME>:7443 or https:://<HOST_IP>:7443 and proceed to deploy agents to storage servers.

Stopping with systemd

If you wish to stop the IML stack from running, do the following:

  1. Stop the stack

     systemctl stop iml-docker
    
  2. Optionally stop and disable the iml-docker and docker services

     # Optionally disable iml-docker
     systemctl disable iml-docker
     # Optionally stop docker
     systemctl stop docker
     # Optionally disable docker
     systemctl disable docker
    

Starting with systemd

If you wish to start the IML stack again, do the following:

  1. Enable and start docker and iml-docker:

     systemctl enable --now docker iml-docker
    

Usage without RPM

  1. Install Docker on your node and init the swarm. The following assumes RHEL 7 as the host OS, but any docker compatible host should work.

     yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
     yum install -y docker-ce
     systemctl enable --now docker
     docker swarm init --advertise-addr=127.0.0.1 --listen-addr=127.0.0.1
    
  2. Pull the docker-compose.yml from the IML repo. This is used by docker stack to bring up IML.

     mkdir -p /etc/iml-docker/
     cd /etc/iml-docker/
     wget https://raw.githubusercontent.com/whamcloud/integrated-manager-for-lustre/master/docker/docker-compose.yml
    
  3. Create a new file docker-compose.overrides.yml, adjacent to docker-compose.yml. It should contain host to ip mappings for each storage server and any other necessary overrides, so the job-scheduler can map them correctly:

    version: "3.7"
    services:
      job-scheduler:
        extra_hosts:
          - "<STORAGE_SERVER_X_NAME>:<STORAGE_SERVER_X_IP>"
          - "<STORAGE_SERVER_Y_NAME>:<STORAGE_SERVER_Y_IP>"
          - ...
        environment:
          - "NTP_SERVER_HOSTNAME=<NTP_TIMESERVER_ADDRESS>"
    
  4. Create a docker secret with a new root IML password

     echo <PASSWORD_HERE> | docker secret create iml_pw -
    
  5. Deploy the stack. This will bring up the manager within docker.

    docker stack deploy -c /etc/iml-docker/docker-compose.yml -c /etc/iml-docker/docker-compose.overrides.yml iml
    
  6. Add the following executable script to /usr/bin/iml. This will allow for iml CLI access outside the swarm.

    #! /usr/bin/env bash
    
    trailer=$(docker service ps -f 'name=iml_iml-manager-cli.1' iml_iml-manager-cli -q --no-trunc | head -n1)
    
    docker exec -ti iml_iml-manager-cli.1.$trailer iml ${@:1}
    
  7. Add an entry to each storage server’s hostfile that maps the docker OS host IP to nginx

    <HOST_IP>	nginx
    
  8. Login to the GUI via https:://<HOSTNAME>:7443 or https:://<HOST_IP>:7443 and proceed to deploy agents to storage servers.

Stopping

If you wish to stop the IML stack from running, do the following:

  1. Stop the stack

     docker stack rm iml
     # make sure all services have stopped
     docker stack ps iml
    
  2. Optionally stop and disable docker

     # Optionally stop docker
     systemctl stop docker
     # Optionally disable
     systemctl disable docker
    

Starting

If you wish to start the IML stack again, do the following:

  1. Optionally enable and start docker:

     systemctl enable --now docker
    
  2. re-deploy the stack

     docker stack deploy -c /etc/iml-docker/docker-compose.yml -c /etc/iml-docker/docker-compose.overrides.yml iml