= Keepalived active stand by = On master site ip 10.7.168.221, file '''/etc/keepalived/keepalived.conf'''. All config in '''/etc/keepalived''' can be found [attachment:keepalived_master.tar here] {{{ root@n4:/etc/keepalived# pwd /etc/keepalived root@n4:/etc/keepalived# more keepalived.conf vrrp_script chk_service_health { #script /etc/keepalived/check_proc.sh #script /etc/keepalived/check_ping.sh weight 10 # how often script run in period 10 sec interval 5 # How long to wait for the script to return (5 seconds). timeout 5 # How many times the script must return successfully in order for the host to be considered healthy. rise 3 # How many times the script must return unsuccessfully (or time out) in order for the host to be considered unhealthy fall 3 } vrrp_instance VI_1 { #state BACKUP state MASTER interface ens3 virtual_router_id 51 priority 201 advert_int 10 authentication { auth_type PASS auth_pass 1234 } unicast_src_ip 10.7.168.221 unicast_peer { 10.7.168.58 } virtual_ipaddress { 10.7.168.200/24 } track_script { chk_service_health } notify /etc/keepalived/keepalived_notify.sh notify_master /etc/keepalived/keepalived_notify_master.sh notify_backup /etc/keepalived/keepalived_notify_backup.sh } }}} At user directory '''/home/ubuntu''', pls see files [attachment:check_containner.sh check_containner.sh], [attachment:notifyFile_3.sh notifyFile_3.sh], [attachment:stop_notifyFile_3.sh stop_notifyFile_3.sh] use for start/stop docker. For sync with unison, we need to place file [attachment:default.prf default.prf] in '''./unison/default.prf''' user folder /home/ubuntu/.unison. Pls note, unison need to use ssh-keygen to authentication and place in user as /home/ubuntu/.ssh/authorized_keys. {{{ ubuntu@n4:~$ tree -L 2 ├── check_containner.sh ├── default.prf ├── notifyFile_3.sh ├── omd-labs-docker │   ├── Dockerfile.omd-labs-debian │   ├── Makefile.omd-labs-debian │   ├── README.md │   ├── ansible_dropin │   ├── hooks │   ├── run.sh │   ├── scripts │   └── site └── stop_notifyFile_3.sh }}} For standby site (backup site ip 10.7.168.58) config can be found [attachment:keepalived_backup.tar here]