Installation Prerequisites¶
The installation of the PROVISION environment under Docker Swarm is done using the reemo-provision Ansible role.
The PROVISION environment consists of two main services:
Nginx: communication with the Reemo infrastructure
Docker API: creation and deletion of work containers
Before starting, ensure your environment meets the following conditions.
Supported Operating Systems¶
Ubuntu (recent LTS versions)
Red Hat Enterprise Linux
Rocky Linux
Minimum Hardware Specifications¶
Ansible Dependencies¶
The reemo-provision role relies on Ansible and several collections. Install them according to your distribution:
Red Hat / RockyLinux¶
yum install ansible-core
yum install -y python3-pip
pip3 install docker
ansible-galaxy collection install community.docker
ansible-galaxy collection install community.crypto
Warning
On RockyLinux 9, you must use community.docker >= 3.10.2. If necessary, force the update:
ansible-galaxy collection install community.docker --upgrade
Ubuntu¶
apt install ansible
apt install python3-docker
ansible-galaxy collection install community.docker
ansible-galaxy collection install community.crypto
Before proceeding with the installation of the PROVISION environment, Docker Swarm must be installed.
Docker Swarm¶
PROVISION relies on a Docker Swarm cluster to dynamically deploy and manage user work containers. The installation and initialization of Docker Swarm are therefore prerequisites before setting up the PROVISION environment.
For Docker Swarm installation, two approaches are possible:
manual installation, performed directly on the servers,
automated installation, via the reemo-provision Ansible role, which can both install Docker and initialize the cluster with various parameters.
Minimal Inventory File¶
For Docker Swarm installation, a minimal inventory file is required, grouping the nodes where Docker Swarm will be installed and configured.
The inventory is based on the provision_manager group. In the rest of this documentation, the inventory file will be named inventory.yml.
Example with a single server¶
This server acts as both a Manager and a Worker.
provision:
children:
provision_manager:
hosts:
provision_manager1:
ansible_host: "10.10.0.1"
Example with two servers¶
One server acts as Manager and the second as Worker.
provision:
children:
provision_manager:
hosts:
provision_manager1:
ansible_host: "10.10.0.1"
provision_worker:
hosts:
provision_worker1:
ansible_host: "10.10.0.2"
Manual Docker Swarm Installation¶
Here are the commands for a manual installation of Docker, which includes Docker Swarm.
Ubuntu :
apt install docker.io python3-docker -y
RedHat :
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
yum install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
systemctl start docker
systemctl enable docker
yum install -y python3-pip
pip3 install docker
After installing Docker, the cluster must be initialized. Two options are available:
Manually, using the Docker Documentation
Using the reemo-provision Ansible role with the SWARM_INIT option. Initialization options are detailed later in this documentation.
Automated Docker Swarm Installation¶
The reemo-provision Ansible role allows you to automatically install and configure Docker Swarm. The full installation is done automatically using the PROVISION_INSTALL_DOCKER option.
ansible-playbook -i inventory.yml playbooks/reemo-provision.yml --extra-vars "PROVISION_INSTALL_DOCKER=true"
Important
Docker Swarm Cluster Initialization¶
The reemo-provision Ansible role allows you to automatically initialize Docker Swarm using the SWARM_INIT option.
ansible-playbook -i inventory.yml playbooks/reemo-provision.yml --extra-vars "SWARM_INIT=true"
Several options are available for cluster initialization (example):
provision:
vars:
PROVISION_SWARM_INIT_DEFAULT_ADDR_POOL: "192.168.120.0/24"
PROVISION_SWARM_ADVERTISE_ADDR: "eth0"
PROVISION_SWARM_DATA_PATH_PORT: 4789
children:
provision_manager:
hosts:
provision_manager1:
ansible_host: "10.10.0.1"
provision_worker:
hosts:
provision_worker1:
ansible_host: "10.10.0.2"
Default IP Address Pool¶
Specifies the range used by Docker Swarm for the PROVISION environment. /24 minimum.
PROVISION_SWARM_INIT_DEFAULT_ADDR_POOL: "192.168.120.0/24"
Advertised address¶
In a multi-node cluster, you can specify the network interface or IP address that will be advertised to nodes for registration and communication:
PROVISION_SWARM_ADVERTISE_ADDR: "eth0"
Data Path Port¶
PROVISION_SWARM_DATA_PATH_PORT: 4789
Warning
In VMware NSX environments, port 4789 may conflict. Define another port at Swarm initialization.
Warning
Once Docker Swarm has been initialized, these parameters must not be modified.