Redundant deployment with docker compose
Wallboard deployment
Follow this guide to deploy the Wallboard on two machines.
Virtual IP configuration
Repeat the following steps for all the machines in the HA cluster.
- Download keepalived.sh script and place it in
/root
directory. Give execute permission and execute the script:
# chmod +x keepalived.sh
# ./keepalived.sh
Configure keep.env file inside
/root/keep-alived
folderName
Description
KEEPALIVED_UNICAST_PEERS
IPs of the machines in the cluster. On each machine, this variable should have the IP of the other machine in HA.
KEEPALIVED_VIRTUAL_IPS
Virtual IP of the cluster. It should be available in the LAN. For example: 192.168.1.245 KEEPALIVED_PRIORITY
The priority of the node. Instances with lower numbers will have a higher priority. It can take any value from 1-255. KEEPALIVED_INTERFACE
Name of the network interface with which your machine is connected to the network. On CentOS, ifconfig
orip addr
will show all the network interfaces and assigned addresses.CLEARANCE_TIMEOUT
Corresponds to the initial startup time of the application in seconds which is being monitored by keepalived. A nominal value of 60-120 is good enough KEEPALIVED_ROUTER_ID
Do not change this value. SCRIPT_VAR
This script is continuously polled after 2 seconds. Keepalived relinquishes control if this shell script returns a non-zero response. For wallboard, it should be:
pidof dockerd && wget -O index.html https://localhost:443
Give the execute permission and execute the script:
# chmod +x keep-command.sh
# ./keep-command.sh