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
/rootdirectory. Give execute permission and execute the script:
# chmod +x keepalived.sh# ./keepalived.shConfigure keep.env file inside
/root/keep-alivedfolderName
Description
KEEPALIVED_UNICAST_PEERSIPs of the machines in the cluster. On each machine, this variable should have the IP of the other machine in HA.
KEEPALIVED_VIRTUAL_IPSVirtual IP of the cluster. It should be available in the LAN. For example: 192.168.1.245 KEEPALIVED_PRIORITYThe priority of the node. Instances with lower numbers will have a higher priority. It can take any value from 1-255. KEEPALIVED_INTERFACEName of the network interface with which your machine is connected to the network. On CentOS, ifconfigorip addrwill show all the network interfaces and assigned addresses.CLEARANCE_TIMEOUTCorresponds 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_IDDo not change this value. SCRIPT_VARThis 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:443Give the execute permission and execute the script:
# chmod +x keep-command.sh# ./keep-command.sh