-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Language: Keepalived configure file (#2417)
Co-authored-by: RunDevelopment <[email protected]>
- Loading branch information
1 parent
a80a68b
commit d908e45
Showing
17 changed files
with
1,125 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<h2>A example from keepalived document</h2> | ||
<pre><code> | ||
# Configuration File for keepalived | ||
global_defs { | ||
notification_email { | ||
[email protected] | ||
[email protected] | ||
} | ||
notification_email_from [email protected] | ||
smtp_server 192.168.200.20 | ||
smtp_connect_timeout 30 | ||
router_id LVS_MAIN | ||
} | ||
|
||
# VRRP Instances definitions | ||
vrrp_instance VI_1 { | ||
state MASTER | ||
interface eth0 | ||
virtual_router_id 51 | ||
priority 150 | ||
advert_int 1 | ||
authentication { | ||
auth_type PASS | ||
auth_pass k@l!ve1 | ||
} | ||
virtual_ipaddress { | ||
192.168.200.10 | ||
192.168.200.11 | ||
} | ||
} | ||
vrrp_instance VI_2 { | ||
state MASTER | ||
interface eth1 | ||
virtual_router_id 52 | ||
priority 150 | ||
advert_int 1 | ||
authentication { | ||
auth_type PASS | ||
auth_pass k@l!ve2 | ||
} | ||
virtual_ipaddress { | ||
192.168.100.10 | ||
} | ||
} | ||
vrrp_instance VI_3 { | ||
state BACKUP | ||
interface eth0 | ||
virtual_router_id 53 | ||
priority 100 | ||
advert_int 1 | ||
authentication { | ||
auth_type PASS | ||
auth_pass k@l!ve3 | ||
} | ||
virtual_ipaddress { | ||
192.168.200.12 | ||
192.168.200.13 | ||
} | ||
} | ||
vrrp_instance VI_4 { | ||
state BACKUP | ||
interface eth1 | ||
virtual_router_id 54 | ||
priority 100 | ||
advert_int 1 | ||
authentication { | ||
auth_type PASS | ||
auth_pass k@l!ve4 | ||
} | ||
virtual_ipaddress { | ||
192.168.100.11 | ||
} | ||
} | ||
# Virtual Servers definitions | ||
virtual_server 192.168.200.10 80 { | ||
delay_loop 30 | ||
lb_algo wrr | ||
lb_kind NAT | ||
persistence_timeout 50 | ||
protocol TCP | ||
sorry_server 192.168.100.100 80 | ||
real_server 192.168.100.2 80 { | ||
weight 2 | ||
HTTP_GET { | ||
url { | ||
path /testurl/test.jsp | ||
digest ec90a42b99ea9a2f5ecbe213ac9eba03 | ||
} | ||
url { | ||
path /testurl2/test.jsp | ||
digest 640205b7b0fc66c1ea91c463fac6334c | ||
} | ||
connect_timeout 3 | ||
retry 3 | ||
delay_before_retry 2 | ||
} | ||
} | ||
real_server 192.168.100.3 80 { | ||
weight 1 | ||
HTTP_GET { | ||
url { | ||
path /testurl/test.jsp | ||
digest 640205b7b0fc66c1ea91c463fac6334c | ||
} | ||
connect_timeout 3 | ||
retry 3 | ||
delay_before_retry 2 | ||
} | ||
} | ||
} | ||
virtual_server 192.168.200.12 443 { | ||
delay_loop 20 | ||
lb_algo rr | ||
lb_kind NAT | ||
persistence_timeout 360 | ||
protocol TCP | ||
real_server 192.168.100.2 443 { | ||
weight 1 | ||
TCP_CHECK { | ||
connect_timeout 3 | ||
} | ||
} | ||
real_server 192.168.100.3 443 { | ||
weight 1 | ||
TCP_CHECK { | ||
connect_timeout 3 | ||
} | ||
} | ||
} | ||
</code></pre> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ <h2>Server Block</h2> | |
location / { | ||
proxy_pass http://127.0.0.1:8080; | ||
} | ||
}</code></pre> | ||
} | ||
</code></pre> |
This file contains 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
Oops, something went wrong.