default_value_changes

This commit is contained in:
YuruC3 2023-12-15 20:16:12 +01:00 committed by GitHub
parent d98a22abff
commit afba96d7d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 105 additions and 204 deletions

View 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
}
}

View 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
}
}

View 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
}
}

View File

@ -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")

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -1,2 +1,4 @@
# Nginx-Proxy-Manager-KeepAliveD
KeepAliveD with NPM for a HA cluster