Asterisk HA Configuration Pacemaker systemctl start pacemaker; systemctl start corosync

pcs cluster setup --name cluster_asterisk asterisk-master asterisk-slave --force
systemctl start pacemaker; systemctl start corosync
pcs cluster start --all
pcs property set stonith-enabled=false
pcs property set no-quorum-policy=ignore
pcs resource create virtual_ip ocf:heartbeat:IPaddr2 ip=192.168.88.10 nic=eth1 cidr_netmask=28 op monitor interval=30s on-fail=restart
pcs resource create p_asterisk ocf:heartbeat:asterisk  op monitor timeout="30s" interval="20s" 
pcs constraint colocation add p_asterisk with virtual_ip score=INFINITY
pcs constraint order virtual_ip then p_asterisk
optional >> pcs resource defaults resource-stickiness="0"
pcs constraint location p_asterisk prefers asterisk-master
systemctl enable pcsd; systemctl enable corosync;  systemctl enable pacemaker
disable om both nodes: systemctl disable asterisk

Leave a Reply

Your email address will not be published. Required fields are marked *