Skip to content

Instantly share code, notes, and snippets.

@NiceRath
Last active May 13, 2024 14:43
Show Gist options
  • Save NiceRath/b535d25be8de3ec922c130d7ffb10632 to your computer and use it in GitHub Desktop.
Save NiceRath/b535d25be8de3ec922c130d7ffb10632 to your computer and use it in GitHub Desktop.
LinuxHA (CRM/Corosync/Pacemaker) - Config for basic service cluster with floating IP
# bash > crm configure
primitive resHAProxy systemd:haproxy \
op monitor interval=5
clone clone_HAProxy resHAProxy
primitive resIP_LB IPaddr2 \
params ip=172.x.x.x nic=ens18 cidr_netmask=32 \
op monitor interval=10s \
meta target-role=Started
location cli-prefer-resIP_LB resIP_LB role=Started inf: node01 # prefer node01 if available
primitive resPingGW ocf:pacemaker:ping \
params host_list=172.x.x.x \
op monitor interval=2s timeout=60 on-fail=restart
clone resPingGW resPingGW
## only if 2-node cluster
property no-quorum-policy=ignore
property stonith-enabled=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment