default_value_changes
This commit is contained in:
parent
d98a22abff
commit
afba96d7d3
33
KeepAliveD_config/KPAVD-VM-1.conf
Normal file
33
KeepAliveD_config/KPAVD-VM-1.conf
Normal file
@ -0,0 +1,33 @@
|
||||
vrrp_script track_npm {
|
||||
script "/etc/keepalived/check_docker_container.sh <name_of_your_container>"
|
||||
interval 5
|
||||
fall 1
|
||||
rise 30
|
||||
}
|
||||
|
||||
vrrp_instance NPM-V1 {
|
||||
state MASTER
|
||||
interface eth0
|
||||
virtual_router_id 40
|
||||
priority 100
|
||||
advert_int 1
|
||||
|
||||
unicast_src_ip <NODE_IP>
|
||||
unicast_peer {
|
||||
<PEER_IP>
|
||||
}
|
||||
|
||||
authentication {
|
||||
auth_type PASS
|
||||
auth_pass <CHANGE_TO_8-CHARACTER_PASSWORD>
|
||||
}
|
||||
|
||||
virtual_ipaddress {
|
||||
<VIRTUAL_IP>/<SUBNETMASK>
|
||||
}
|
||||
|
||||
track_script {
|
||||
track_npm
|
||||
}
|
||||
|
||||
}
|
33
KeepAliveD_config/KPAVD-VM-2.conf
Normal file
33
KeepAliveD_config/KPAVD-VM-2.conf
Normal file
@ -0,0 +1,33 @@
|
||||
vrrp_script track_npm {
|
||||
script "/etc/keepalived/check_docker_container.sh <name_of_your_container>"
|
||||
interval 5
|
||||
fall 1
|
||||
rise 30
|
||||
}
|
||||
|
||||
vrrp_instance NPM-V1 {
|
||||
state BACKUP
|
||||
interface eth0
|
||||
virtual_router_id 40
|
||||
priority 10
|
||||
advert_int 1
|
||||
|
||||
unicast_src_ip <NODE_IP>
|
||||
unicast_peer {
|
||||
<PEER_IP>
|
||||
}
|
||||
|
||||
authentication {
|
||||
auth_type PASS
|
||||
auth_pass <CHANGE_TO_8-CHARACTER_PASSWORD>
|
||||
}
|
||||
|
||||
virtual_ipaddress {
|
||||
<VIRTUAL_IP>/<SUBNETMASK>
|
||||
}
|
||||
|
||||
track_script {
|
||||
track_npm
|
||||
}
|
||||
|
||||
}
|
33
KeepAliveD_config/KPAVD-VM-3.conf
Normal file
33
KeepAliveD_config/KPAVD-VM-3.conf
Normal file
@ -0,0 +1,33 @@
|
||||
vrrp_script track_npm {
|
||||
script "/etc/keepalived/check_docker_container.sh <name_of_your_container>"
|
||||
interval 5
|
||||
fall 1
|
||||
rise 30
|
||||
}
|
||||
|
||||
vrrp_instance NPM-V1 {
|
||||
state BACKUP
|
||||
interface eth0
|
||||
virtual_router_id 40
|
||||
priority 11
|
||||
advert_int 1
|
||||
|
||||
unicast_src_ip <NODE_IP>
|
||||
unicast_peer {
|
||||
<PEER_IP>
|
||||
}
|
||||
|
||||
authentication {
|
||||
auth_type PASS
|
||||
auth_pass <CHANGE_TO_8-CHARACTER_PASSWORD>
|
||||
}
|
||||
|
||||
virtual_ipaddress {
|
||||
<VIRTUAL_IP>/<SUBNETMASK>
|
||||
}
|
||||
|
||||
track_script {
|
||||
track_npm
|
||||
}
|
||||
|
||||
}
|
@ -17,19 +17,17 @@ rsync_npmz () {
|
||||
# $1 == local_username input
|
||||
# $2 == remote_username input
|
||||
|
||||
# NODE-2
|
||||
rsync -avru /home/$1/npm/ $2@192.168.25.15:/home/$2/npm/
|
||||
# NODE-1
|
||||
rsync -avru /home/$1/npm/ $2@<NODE_1_IP>:/home/$2/npm/
|
||||
|
||||
# NODE-3
|
||||
rsync -avru /home/$1/npm/ $2@192.168.25.17:/home/$2/npm/
|
||||
# NODE-2
|
||||
rsync -avru /home/$1/npm/ $2@<NODE_2_IP>:/home/$2/npm/
|
||||
|
||||
}
|
||||
|
||||
# DEF VARIABLE NAMES
|
||||
container_name=$1
|
||||
|
||||
local_username=$2
|
||||
|
||||
remote_username=$3
|
||||
|
||||
state_restarting=$(sudo docker inspect --format="{{.State.Restarting}}" "$container_name")
|
@ -1,58 +0,0 @@
|
||||
vrrp_script track_npm {
|
||||
script "/etc/keepalived/check_docker_container.sh yuru_app_1"
|
||||
interval 5
|
||||
fall 1
|
||||
rise 30
|
||||
}
|
||||
|
||||
vrrp_instance TEST-NPM-V1 {
|
||||
state MASTER
|
||||
interface eth0
|
||||
virtual_router_id 40
|
||||
priority 100
|
||||
advert_int 1
|
||||
|
||||
unicast_src_ip 192.168.1.130
|
||||
unicast_peer {
|
||||
192.168.1.131
|
||||
192.168.1.132
|
||||
}
|
||||
|
||||
authentication {
|
||||
auth_type PASS
|
||||
auth_pass Loli6969
|
||||
}
|
||||
|
||||
virtual_ipaddress {
|
||||
192.168.1.125/24
|
||||
}
|
||||
|
||||
track_script {
|
||||
track_npm
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
virtual_server 192.168.1.125 80 {
|
||||
delay_loop 6
|
||||
lb_algo rr
|
||||
lb_kind NAT
|
||||
protocol TCP
|
||||
|
||||
real_server 192.168.1.130 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.131 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.132 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
vrrp_script track_npm {
|
||||
script "/etc/keepalived/check_docker_container.sh npm"
|
||||
interval 5
|
||||
fall 1
|
||||
rise 30
|
||||
}
|
||||
|
||||
vrrp_instance TEST-NPM-V1 {
|
||||
state BACKUP
|
||||
interface eth0
|
||||
virtual_router_id 40
|
||||
priority 10
|
||||
advert_int 1
|
||||
|
||||
unicast_src_ip 192.168.1.131
|
||||
unicast_peer {
|
||||
192.168.1.130
|
||||
192.168.1.132
|
||||
}
|
||||
|
||||
authentication {
|
||||
auth_type PASS
|
||||
auth_pass Loli6969
|
||||
}
|
||||
|
||||
virtual_ipaddress {
|
||||
192.168.1.125/24
|
||||
}
|
||||
|
||||
track_script {
|
||||
track_npm
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
virtual_server 192.168.1.125 80 {
|
||||
delay_loop 6
|
||||
lb_algo rr
|
||||
lb_kind NAT
|
||||
protocol TCP
|
||||
|
||||
real_server 192.168.1.130 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.131 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.132 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
vrrp_script track_npm {
|
||||
script "/etc/keepalived/check_docker_container.sh npm"
|
||||
interval 5
|
||||
fall 1
|
||||
rise 30
|
||||
}
|
||||
|
||||
vrrp_instance TEST-NPM-V1 {
|
||||
state BACKUP
|
||||
interface eth0
|
||||
virtual_router_id 40
|
||||
priority 11
|
||||
advert_int 1
|
||||
|
||||
unicast_src_ip 192.168.1.132
|
||||
unicast_peer {
|
||||
192.168.1.130
|
||||
192.168.1.131
|
||||
}
|
||||
|
||||
authentication {
|
||||
auth_type PASS
|
||||
auth_pass Loli6969
|
||||
}
|
||||
|
||||
virtual_ipaddress {
|
||||
192.168.1.125/24
|
||||
}
|
||||
|
||||
track_script {
|
||||
track_npm
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
virtual_server 192.168.1.125 80 {
|
||||
delay_loop 6
|
||||
lb_algo rr
|
||||
lb_kind NAT
|
||||
protocol TCP
|
||||
|
||||
real_server 192.168.1.130 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.131 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.132 80 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
|
||||
virtual_server 192.168.1.125 443 {
|
||||
delay_loop 6
|
||||
lb_algo rr
|
||||
lb_kind NAT
|
||||
protocol TCP
|
||||
|
||||
real_server 192.168.1.130 443 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.131 443 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
real_server 192.168.1.132 443 {
|
||||
TCP_CHECK {
|
||||
connect_timeout 10
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user