Corosync cluster resource manager: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
David (Diskussion | Beiträge) |
David (Diskussion | Beiträge) |
||
| Zeile 57: | Zeile 57: | ||
=corosync kofigurieren= | =corosync kofigurieren= | ||
*jetzt müssen wir die notes zu einem Cluster verbinden | *jetzt müssen wir die notes zu einem Cluster verbinden | ||
| + | ==corosync.conf== | ||
| + | *die corosync.conf anpassen | ||
| + | vi /etc/corosync/corosync.conf | ||
| + | |||
| + | <pre> | ||
| + | totem { | ||
| + | version: 2 | ||
| + | cluster_name: debian | ||
| + | secauth: off | ||
| + | transport:udpu | ||
| + | interface { | ||
| + | ringnumber: 0 | ||
| + | bindnetaddr: 192.168.155.0 | ||
| + | broadcast: yes | ||
| + | mcastport: 5405 | ||
| + | } | ||
| + | } | ||
| + | |||
| + | nodelist { | ||
| + | node { | ||
| + | ring0_addr: 192.168.155.250 | ||
| + | name: worf | ||
| + | nodeid: 1 | ||
| + | } | ||
| + | |||
| + | node { | ||
| + | ring0_addr: 192.168.155.251 | ||
| + | name: kurn | ||
| + | nodeid: 2 | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | quorum { | ||
| + | provider: corosync_votequorum | ||
| + | two_node: 1 | ||
| + | wait_for_all: 1 | ||
| + | last_man_standing: 1 | ||
| + | auto_tie_breaker: 0 | ||
| + | } | ||
| + | </pre> | ||
Version vom 19. Oktober 2016, 08:17 Uhr
Ziel
Eine Ha Firewall & VPN-Gateway
Voraussetzungen
- 3 frisch aufgesetzte Systeme
- Gleiches Betriebsystem
- Jeweils 2 Netzwerkschnittstellen
- Eine im LAN
- Eine direktverbindung zwischen beiden Nodes
- Eine ins Internet
Nodes
Node: worf
eth0 = LAN = 192.168.255.250/24 eth1 = PPPoE = 87.128.42.65 eth2 = HA-Port = 10.11.154.1/24
Node: kurn
eth0 = LAN = 192.168.255.251/24 eth1 = PPPoE = 87.128.42.65 eth2 = HA-Port = 10.11.154.1/24
Konfiguration der Nodes
Netzwerk
- die interfaces konfigurieren
- auf beiden seiten ähnlich lediglich die ip für lan und Ha muss angepasst werden
vi /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.255.251 netmask 255.255.255.0 up ip route add 192.168.240.0/24 via 192.168.255.1 iface dsl-provider inet ppp pre-up /bin/ip link set eth1 up # line maintained by pppoeconf pre-up /sbin/ifconfig eth1 up provider dsl-provider auto eth2 iface eth2 inet static address 192.168.155.251 netmask 255.255.255.0 auto eth1 iface eth1 inet manual
Namensauflösung
die datei ist auf beiden seiten gleich vi /etc/hosts 127.0.0.1 localhost 192.168.155.250 worf.xinux.org worf 192.168.155.251 kurn.xinux.org kurn
Software installiern
- auf beiden seiten die benötigten packete installieren
apt-get update apt-get upgrade apt-get install -y corosync pacemaker strongswan pppoe
corosync kofigurieren
- jetzt müssen wir die notes zu einem Cluster verbinden
corosync.conf
- die corosync.conf anpassen
vi /etc/corosync/corosync.conf
totem {
version: 2
cluster_name: debian
secauth: off
transport:udpu
interface {
ringnumber: 0
bindnetaddr: 192.168.155.0
broadcast: yes
mcastport: 5405
}
}
nodelist {
node {
ring0_addr: 192.168.155.250
name: worf
nodeid: 1
}
node {
ring0_addr: 192.168.155.251
name: kurn
nodeid: 2
}
}
quorum {
provider: corosync_votequorum
two_node: 1
wait_for_all: 1
last_man_standing: 1
auto_tie_breaker: 0
}