Last active
October 19, 2017 03:05
-
-
Save franzramadhan/d3dd8db1281b75800d779386e1a58ae3 to your computer and use it in GitHub Desktop.
Maxcale and Keepalived Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/sysctl.d/99-vrrp.conf | |
net.ipv4.ip_nonlocal_bind = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global_defs { | |
notification_email { | |
[email protected] | |
} | |
notification_email_from [email protected] | |
smtp_server 127.0.0.1 | |
smpt_connect_timeout 30 | |
lvs_id LB1 | |
} | |
vrrp_script chk_haproxy { | |
script "/usr/bin/kill -0 haproxy" | |
interval 2 | |
weight 2 | |
timeout 2 | |
fall 2 | |
rise 2 | |
} | |
vrrp_script chk_maxscale { | |
script "/usr/bin/kill -0 maxscale" | |
interval 2 | |
weight 2 | |
timeout 2 | |
fall 2 | |
rise 2 | |
} | |
vrrp_instance DB { | |
state MASTER | |
interface ens18 | |
virtual_router_id 61 | |
priority 101 | |
advert_int 1 | |
authentication { | |
auth_type PASS | |
auth_pass 1111 | |
} | |
virtual_ipaddress { | |
10.32.6.113 | |
} | |
track_script { | |
chk_maxscale | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[maxscale] | |
threads=2 | |
[Splitter Service] | |
type=service | |
router=readwritesplit | |
servers=db2,db4 | |
user=sstmoi | |
passwd=sstmoi-uae | |
[Splitter Listener] | |
type=listener | |
service=Splitter Service | |
protocol=MySQLClient | |
port=3306 | |
socket=/tmp/ClusterMaster | |
address=10.32.6.113 | |
[db2] | |
type=server | |
address=10.32.6.164 | |
port=3306 | |
protocol=MySQLBackend | |
[db4] | |
type=server | |
address=10.32.6.157 | |
port=3306 | |
protocol=MySQLBackend | |
[Galera Monitor] | |
type=monitor | |
module=galeramon | |
servers=db2,db4 | |
user=sstmoi | |
passwd=sstmoi-uae | |
disable_master_failback=1 | |
[CLI] | |
type=service | |
router=cli | |
[CLI Listener] | |
type=listener | |
service=CLI | |
protocol=maxscaled | |
socket=default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment