jan kaufman | 636b815 | 2016-01-26 14:02:14 +0100 | [diff] [blame] | 1 | keepalived: |
| 2 | cluster: |
| 3 | enabled: True |
| 4 | instance: |
Petr Michalec | 97aab16 | 2017-02-21 14:16:18 +0100 | [diff] [blame] | 5 | VIP0: |
| 6 | priority: 100 |
| 7 | virtual_router_id: 10 |
| 8 | password: pass |
| 9 | addresses: |
| 10 | - 192.168.11.1 |
| 11 | - 192.168.11.2 |
| 12 | interface: eth0 |
jan kaufman | 636b815 | 2016-01-26 14:02:14 +0100 | [diff] [blame] | 13 | VIP1: |
Petr Michalec | 97aab16 | 2017-02-21 14:16:18 +0100 | [diff] [blame] | 14 | priority: 100 |
| 15 | virtual_router_id: 11 |
jan kaufman | 636b815 | 2016-01-26 14:02:14 +0100 | [diff] [blame] | 16 | password: pass |
| 17 | addresses: |
| 18 | - 192.168.10.1 |
| 19 | - 192.168.10.2 |
| 20 | interface: eth0 |
Petr Michalec | 8863f47 | 2017-05-05 15:57:22 +0200 | [diff] [blame] | 21 | track_script: check_random_exit |
Max Yatsenko | 2f4ba22 | 2017-10-23 11:14:59 +0300 | [diff] [blame] | 22 | virtual_routes: [] |
| 23 | virtual_rules: [] |
Petr Michalec | 8863f47 | 2017-05-05 15:57:22 +0200 | [diff] [blame] | 24 | VIP2: |
| 25 | priority: 100 |
| 26 | virtual_router_id: 12 |
| 27 | password: pass |
| 28 | addresses: |
| 29 | - 192.168.12.1 |
| 30 | - 192.168.12.2 |
| 31 | interface: eth0 |
| 32 | track_script: check_haproxy |
Max Yatsenko | 2f4ba22 | 2017-10-23 11:14:59 +0300 | [diff] [blame] | 33 | virtual_routes: ['add default via 192.168.12.1 table 120'] |
| 34 | virtual_rules: ['add from 0.0.0.0 table 120'] |
Petr Michalec | 8863f47 | 2017-05-05 15:57:22 +0200 | [diff] [blame] | 35 | VIP3: |
| 36 | priority: 100 |
| 37 | virtual_router_id: 13 |
| 38 | password: pass |
| 39 | addresses: |
| 40 | - 192.168.13.1 |
| 41 | - 192.168.13.2 |
| 42 | interface: eth0 |
Petr Michalec | b48338d | 2017-05-18 15:20:55 +0200 | [diff] [blame] | 43 | track_script: |
| 44 | check_haproxy: |
| 45 | interval: 10 |
| 46 | check_mysql_cluster: |
| 47 | weight: 50 |
Max Yatsenko | 2f4ba22 | 2017-10-23 11:14:59 +0300 | [diff] [blame] | 48 | virtual_routes: ['add default via 192.168.12.1 table 120'] |
| 49 | virtual_rules: ['add from 0.0.0.0 table 120'] |
Petr Michalec | 8863f47 | 2017-05-05 15:57:22 +0200 | [diff] [blame] | 50 | VIP4: |
| 51 | priority: 100 |
| 52 | virtual_router_id: 14 |
| 53 | password: pass |
| 54 | addresses: |
| 55 | - 192.168.14.1 |
| 56 | - 192.168.14.2 |
| 57 | interface: eth0 |
Petr Michalec | b48338d | 2017-05-18 15:20:55 +0200 | [diff] [blame] | 58 | track_script: |
| 59 | check_haproxy: None |
| 60 | check_ssh_port: |
| 61 | weight: 50 |
Petr Michalec | 97aab16 | 2017-02-21 14:16:18 +0100 | [diff] [blame] | 62 | vrrp_scripts: |
Petr Michalec | 8863f47 | 2017-05-05 15:57:22 +0200 | [diff] [blame] | 63 | check_ssh_port: |
| 64 | name: check_port |
| 65 | args: "22" |
| 66 | check_mysql_cluster: |
| 67 | args: |
| 68 | - clustercheck |
| 69 | - clustercheck |
| 70 | - available_when_donor=0 |
| 71 | - available_when_readonly=0 |
| 72 | check_haproxy: |
| 73 | name: check_pidof |
| 74 | args: haproxy |
| 75 | check_haproxy2: |
| 76 | name: check_pidof |
| 77 | args: |
| 78 | - haproxy |
| 79 | check_random_exit: |
Petr Michalec | 97aab16 | 2017-02-21 14:16:18 +0100 | [diff] [blame] | 80 | interval: 10 |
| 81 | content: | |
| 82 | #!/bin/bash |
| 83 | exit $(($RANDOM%2)) |
jan kaufman | 636b815 | 2016-01-26 14:02:14 +0100 | [diff] [blame] | 84 | |