Merge pull request #4110 from yixingjia/updatekeepalived

Update keepalived config file
This commit is contained in:
yixingjia 2018-01-24 12:24:44 +08:00 committed by GitHub
commit f676a71422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,8 @@ vrrp_sync_groups VG1 {
VI_1
}
}
#Please change to ens160 to the interface name on you loadbalancer hosts.
#Please change "ens160" to the interface name on you loadbalancer hosts.
#In some case it will be eth0, ens16xxx etc.
vrrp_instance VI_1 {
interface ens160
@ -19,7 +20,7 @@ vrrp_instance VI_1 {
priority 10
virtual_ipaddress {
VIP/32
<change_to_VIP_address>/32
}
advert_int 1
authentication {
@ -29,9 +30,8 @@ vrrp_instance VI_1 {
}
########## Section for Harbor use HTTP protocol ######################
#Please change VIP, harbor_node1_ip, harbor_node2_ip to real ip address
#Please comment this secion out when use https
virtual_server VIP 80 {
#Please change <change_to_VIP_address>, <harbor_node1_ip>, <harbor_node2_ip> to real ip address
virtual_server <change_to_VIP_address> 80 {
delay_loop 15
lb_algo rr
lb_kind DR
@ -39,18 +39,18 @@ virtual_server VIP 80 {
nat_mask 255.255.255.0
persistence_timeout 10
real_server harbor_node1_ip 80 {
real_server <harbor_node1_ip> 80 {
weight 10
MISC_CHECK {
misc_path “/usr/local/bin/check.sh harbor_node1_ip”
misc_path "/usr/local/bin/check.sh <harbor_node1_ip>"
misc_timeout 5
}
}
real_server harbor_node2_ip 80 {
real_server <harbor_node2_ip> 80 {
weight 10
MISC_CHECK {
misc_path “/usr/local/bin/check.sh harbor_node2_ip”
misc_path "/usr/local/bin/check.sh <harbor_node2_ip>"
misc_timeout 5
}
}
@ -60,7 +60,7 @@ virtual_server VIP 80 {
##########################HTTPS#################################
#Please uncomment the follow when harbor running under https
#virtual_server VIP 443 {
#virtual_server <change_to_VIP_address> 443 {
# delay_loop 15
# lb_algo rr
# lb_kind DR
@ -68,10 +68,10 @@ virtual_server VIP 80 {
# nat_mask 255.255.255.0
# persistence_timeout 10
#
# real_server harbor_node1_ip 443 {
# real_server <harbor_node1_ip> 443 {
# weight 10
# MISC_CHECK {
# misc_path “/usr/local/bin/check.sh harbor_node1_ip”
# misc_path "/usr/local/bin/check.sh <harbor_node1_ip>"
# misc_timeout 5
# }
# }
@ -79,7 +79,7 @@ virtual_server VIP 80 {
# real_server harbor_node2_ip 443 {
# weight 10
# MISC_CHECK {
# misc_path “/usr/local/bin/check.sh harbor_node2_ip”
# misc_path "/usr/local/bin/check.sh <harbor_node2_ip>"
# misc_timeout 5
# }
# }