Ajout de deux nouvelles nodes au serveur

This commit is contained in:
Pierre Coimbra
2020-03-14 00:18:38 +01:00
parent 7258d91e7b
commit 28e6c66ee8
14 changed files with 236 additions and 102 deletions

View File

@@ -12,10 +12,13 @@ Switch Wan VLAN 10
Switch Interne VLAN 10
- Proxmox Alpha :10.0.0.1
- Proxmox Beta : 10.0.0.2
- Firewall Alpha : 10.0.0.3
- Firewall Beta : 10.0.0.4
- HAProxy Alpha : 10.0.0.6
- HAProxy Beta : 10.0.0.7
- Proxmox Sigma : 10.0.0.3
- Firewall Alpha : 10.0.0.4
- Firewall Beta : 10.0.0.5
- Firewall Sigma : 10.0.0.6
- HAProxy Alpha : 10.0.0.7
- HAProxy Beta : 10.0.0.8
- HAProxy Sigma : 10.0.0.9
- HAProxy VIP : 10.0.0.8
- Proxy Interne : 10.0.0.252
- DNS : 10.0.0.253
@@ -25,32 +28,45 @@ Switch Interne VLAN 10
Switch Interne VLAN 20
- HAProxy Alpha : 10.0.1.1
- HAProxy Beta : 10.0.1.2
- HAProxy Sigma : 10.0.1.3
- Nginx Public Alpha : 10.0.1.3
- Nginx Public Beta : 10.0.1.4
- Mail : 10.0.1.10
- Firewall Alpha : 10.0.1.250
- Firewall Bêta : 10.0.1.251
- Nginx Public Sigma : 10.0.1.3
- Mail Alpha : 10.0.1.10
- Mail Sigma : 10.0.1.11
- Mail VIP : 10.0.1.12
- Firewall Alpha : 10.0.1.247
- Firewall Beta : 10.0.1.248
- Firewall Sigma : 10.0.1.249
- DNS Alpha : 10.0.1.250
- DNS Sigma : 10.0.1.251
- Proxy Interne : 10.0.1.252
- DNS : 10.0.1.253
- Firewall VIP : 10.0.0.254
- DNS VIP : 10.0.1.253
- Firewall VIP : 10.0.1.254
### INT
Switch Interne VLAN 30
- LDAP Alpha : 10.0.2.1
- LDAP Bêta : 10.0.2.2
- LDAP Beta : 10.0.2.1
- LDAP Sigma : 10.0.2.2
- LDAP VIP : 10.0.2.3
- Nginx Public Alpha : 10.0.2.4
- Nginx Public Beta : 10.0.2.5
- Mail Frontend : 10.0.2.10
- Mail Backend : 10.0.2.11
- Nginx Public Sigma : 10.0.2.3
- Mail Frontend : 10.0.2.9 (peut-être)
- Mail Backend Alpha : 10.0.2.10
- Mail Backend Sigma : 10.0.2.11
- Mail Backend VIP : 10.0.2.12
- LDAP WebUI : 10.0.2.15
- Nextcloud : 10.0.2.20
- Gitea : 10.0.2.21
- [...]
- Firewall Alpha : 10.0.2.250
- Firewall Bêta : 10.0.2.251
- Firewall Alpha : 10.0.2.247
- Firewall Beta : 10.0.2.248
- Firewall Sigma : 10.0.2.249
- DNS Alpha : 10.0.2.250
- DNS Sigma : 10.0.2.251
- Proxy Interne : 10.0.2.252
- DNS : 10.0.2.253
- DNS VIP : 10.0.2.253
- Firewall VIP : 10.0.2.254
@@ -58,24 +74,27 @@ Switch Interne VLAN 30
Switch Interne VLAN 40
- HAProxy Alpha : 10.0.3.1
- HAProxy Beta : 10.0.3.2
- Nginx CTF : 10.0.3.3
- HAProxy Sigma : 10.0.3.3
- Nginx CTF : 10.0.3.4
- CTFd Open : 10.0.3.10
- CTFd Special : 10.0.3.11
- Environnement Système : 10.0.3.12
- Environnement Web : 10.0.3.13
- [...]
- Firewall Alpha : 10.0.3.250
- Firewall Bêta : 10.0.3.251
- Firewall Alpha : 10.0.3.249
- Firewall Bêta : 10.0.3.250
- Firewall Sigma : 10.0.3.251
- Proxy Interne : 10.0.3.252
- Firewall VIP : 10.0.3.254
### DIRTY :
Switch Interne VLAN 50
- Firewall Alpha : 10.0.4.250
- Firewall Bêta : 10.0.4.251
- Proxy Interne : 10.0.4.252
- Firewall VIP : 10.0.4.254
- Firewall Alpha : 10.0.4.6249
- Firewall Bêta : 10.0.4.6250
- Firewall Sigma : 10.0.4.251
- Proxy Interne : 10.0.4.6252
- Firewall VIP : 10.0.4.6254
Pas d'autres conteneurs permanent (10.0.4.0/24)
@@ -83,28 +102,33 @@ Pas d'autres conteneurs permanent (10.0.4.0/24)
Switch Interne VLAN 100
- Alpha : 10.0.10.1
- Beta : 10.0.10.2
- Gamma : 10.0.10.3
### CoroSync internal
Switch Administration VLAN 10
- Alpha : 10.1.1.1
- Beta : 10.1.1.2
- Gamma : 10.1.1.3
### pfSync internal
Switch Administration VLAN 20
- Alpha : 10.1.2.1
- Beta : 10.1.2.2
- Gamma : 10.1.2.3
### GRE admin
Switch Administration VLAN 30
- Alpha : 10.1.10.1
- Beta : 10.1.10.2
- Gamma : 10.1.10.3
### Administration :
Switch Administration VLAN 100
- Firewall Alpha : 10.1.0.1
- Firewall Bêta : 10.1.0.2
- Proxmox Alpha : 10.1.0.3
- Proxmox Beta : 10.1.0.4
- Proxmox Alpha : 10.1.0.4
- Proxmox Beta : 10.1.0.5
- Proxmox Gamma : 10.1.0.6
- [...]
- Proxy Interne : 10.1.0.252
- DNS : 10.1.0.253
@@ -120,7 +144,7 @@ La configuration et les branchement à faire sur le switch sera détaillé plus
Cette partie consiste à mettre en place OpenvSwitch sur les deux nodes.
## Installation
Commune aux deux nodes
Commune aux trois nodes
```
apt-get update
apt-get install openvswitch-switch
@@ -180,12 +204,14 @@ iface vmbr1 inet manual
ovs_ports bond0 vx1
up ovs-vsctl set Bridge ${IFACE} rstp_enable=true
up ovs-vsctl --may-exist add-port vmbr1 gre1 -- set interface gre1 type=gre options:remote_ip='10.0.10.2'
up ovs-vsctl --may-exist add-port vmbr1 gre2 -- set interface gre2 type=gre options:remote_ip='10.0.10.3'
down ovs-vsctl --if-exists del-port vmbr1 gre1
down ovs-vsctl --if-exists del-port vmbr1 gre2
#Admin Task
allow-vmbr0 admintask
iface vmbr0task inet static
address 10.1.0.3
address 10.1.0.4
netmask 24
ovs_type OVSIntPort
ovs_bridge vmbr0
@@ -224,8 +250,10 @@ iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports eth2 vx2
up ovs-vsctl set Bridge ${IFACE} rstp_enable=true
up ovs-vsctl --may-exist add-port vmbr0 gre2 -- set interface gre2 type=gre options:remote_ip='10.1.10.2'
down ovs-vsctl --if-exists del-port vmbr0 gre2
up ovs-vsctl --may-exist add-port vmbr0 gre3 -- set interface gre3 type=gre options:remote_ip='10.1.10.2'
up ovs-vsctl --may-exist add-port vmbr0 gre4 -- set interface gre4 type=gre options:remote_ip='10.1.10.3'
down ovs-vsctl --if-exists del-port vmbr0 gre3
down ovs-vsctl --if-exists del-port vmbr0 gre4
```
### Pour Beta (/etc/network/interfaces)
@@ -280,12 +308,14 @@ iface vmbr1 inet manual
ovs_ports bond0 vx1
up ovs-vsctl set Bridge ${IFACE} rstp_enable=true
up ovs-vsctl --may-exist add-port vmbr1 gre1 -- set interface gre1 type=gre options:remote_ip='10.0.10.1'
up ovs-vsctl --may-exist add-port vmbr1 gre2 -- set interface gre2 type=gre options:remote_ip='10.0.10.3'
down ovs-vsctl --if-exists del-port vmbr1 gre1
down ovs-vsctl --if-exists del-port vmbr1 gre2
#Admin Task
allow-vmbr0 admintask
iface coro inet static
address 10.1.0.4
address 10.1.0.5
netmask 24
ovs_type OVSIntPort
ovs_bridge vmbr0
@@ -318,12 +348,118 @@ iface vx2 inet static
ovs_bridge vmbr0
ovs_options tag=30
#OVS Bridge administation
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports eth2 vx2
up ovs-vsctl set Bridge ${IFACE} rstp_enable=true
up ovs-vsctl --may-exist add-port vmbr0 gre3 -- set interface gre3 type=gre options:remote_ip='10.1.10.1'
up ovs-vsctl --may-exist add-port vmbr0 gre4 -- set interface gre4 type=gre options:remote_ip='10.1.10.3'
down ovs-vsctl --if-exists del-port vmbr0 gre3
down ovs-vsctl --if-exists del-port vmbr0 gre4
```
### Pour Gamma (/etc/network/interfaces)
```
#Bond eth1/eth3 pour vmbr1
allow-vmbr1 bond0
iface bond0 inet manual
ovs_bonds eth1 eth3
ovs_type OVSBond
ovs_bridge vmbr1
ovs_options bond_mode=active-backup
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual
iface eth3 inet manual
# WAN
allow-vmbr0 wan
iface lan inet static
address X.X.X.X
netmask YY
gateway Z.Z.Z.Z
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=10
allow-ovs vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports eth0
#GRE vmbr1
allow-vmbr1 vx1
iface gre1 inet static
address 10.0.10.3
netmask 24
ovs_type OVSIntPort
ovs_bridge vmbr1
ovs_options tag=100
#OVS Bridge interne
auto vmbr1
iface vmbr1 inet manual
ovs_type OVSBridge
ovs_ports bond0 vx1
up ovs-vsctl set Bridge ${IFACE} rstp_enable=true
up ovs-vsctl --may-exist add-port vmbr1 gre1 -- set interface gre1 type=gre options:remote_ip='10.0.10.1'
up ovs-vsctl --may-exist add-port vmbr1 gre2 -- set interface gre2 type=gre options:remote_ip='10.0.10.2'
down ovs-vsctl --if-exists del-port vmbr1 gre1
down ovs-vsctl --if-exists del-port vmbr1 gre2
#Admin Task
allow-vmbr0 admintask
iface vmbr0task inet static
address 10.1.0.6
netmask 24
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=100
#Corosync
allow-vmbr0 coro
iface coro inet static
address 10.1.1.3
netmask 24
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=10
#pfSync
allow-vmbr0 pfsync
iface pfsync inet static
address 10.1.2.3
netmask 24
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=20
#GRE vmbr0
allow-vmbr0 vx2
iface vx2 inet static
address 10.1.10.3
netmask 24
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=30
#OVS Bridge administation
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports eth2 vx2
up ovs-vsctl set Bridge ${IFACE} rstp_enable=true
up ovs-vsctl --may-exist add-port vmbr0 gre2 -- set interface gre2 type=gre options:remote_ip='10.1.10.1'
down ovs-vsctl --if-exists del-port vmbr0 gre2
up ovs-vsctl --may-exist add-port vmbr0 gre3 -- set interface gre3 type=gre options:remote_ip='10.1.10.1'
up ovs-vsctl --may-exist add-port vmbr0 gre4 -- set interface gre4 type=gre options:remote_ip='10.1.10.2'
down ovs-vsctl --if-exists del-port vmbr0 gre3
down ovs-vsctl --if-exists del-port vmbr0 gre4
```