Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Content imported from a Scroll Translations translation file.

...

Sv translation
languagede

Table of Contents
maxLevel3
printablefalse

PCS Cluster Installation

Als nächstes, wird PCS Cluster installiert, siehe Redundancy - Installing PCS Cluster.

Virtuelle IP Adresse konfigurieren (Nur auf einem Node!)

Anschließend, wird die virtuelle IP Adresse des Clusters als Ressource konfiguriert:

Translations Ignore


Code Block
titleConfigure virtual IP address
pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=10.4.8.12 cidr_netmask=32 op monitor interval=30s



Prüfen, ob die Adresse gestartet wird:

Translations Ignore


Code Block
titleCheck virtual IP address
pcs status
 
# It may take a few seconds before the resource is started. Run this command more than once...
 
-->
 
Cluster name: portal
Stack: corosync
Current DC: uk-acd-lb1 (version 1.1.16-12.el7_4.8-94ff4df) - partition with quorum
Last updated: Tue Mar 20 11:57:43 2018
Last change: Tue Mar 20 11:57:33 2018 by root via cibadmin on uk-acd-lb1

2 nodes configured
1 resource configured

Online: [ uk-acd-lb1 uk-acd-lb2 ]

Full list of resources:

 ClusterIP      (ocf::heartbeat:IPaddr2):       Started uk-acd-lb1

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled



Firewall Konfiguration

Als nächstes müssen in der Firewall die Port-Freigaben für die mySQL Weiterleitungen eingetragen und persistent gespeichert werden:

Translations Ignore


Code Block
languagebash
titleConfigure firewall
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=3307/tcp --permanent
firewall-cmd --zone=public --add-port=3308/tcp --permanent
firewall-cmd --reload



haproxy Konfiguration für Redundanz (beide Nodes)

Der Aufbau der Konfigurationsdatei des haproxy Dienstes ist recht komplex. Aus diesem Grunde empfiehlt es sich eine entsprechende Vorlage aus dem zentralen jtel Download-Verzeichnis anzuwenden, um die Konfigurationsarbeiten zu beschleunigen. Dort befinden sich zwei Vorlagen, die sich darin unterscheiden, ob die Dienste über HTTP oder über HTTPS angeboten werden. Ist die Bereitstellung über HTTPS gewünscht, muss zusätzlich zu der Konfigurationsdatei auch eine Datei mit einem gültigen Zertifikat und dem dazugehörigen Private Key im PEM-base64--Format zur Verfügung gestellt werden.

Das Herunterladen der folgenden Konfigurationsvorlage ist ein guter Startpunkt für ein System welches über HTTP erreichbar sein soll:

Translations Ignore


Code Block
languagebash
titleDownload the HTTP configuration template
curl https://cdn.jtel.de/downloads/configs/haproxy.redundant.http.cfg > /etc/haproxy/haproxy.cfg



Ist hingegen gewünscht, dass HTTP Zugriffe automatisch auf HTTPS umgeleitet werden und alle Zugriffe über HTTPS erfolgen sollen, so ist folgende Konfigurationsvorlage herunterzuladen:

Translations Ignore


Code Block
languagebash
titleDownload the HTTPS configuration template
curl https://cdn.jtel.de/downloads/configs/haproxy.redundant.https.cfg > /etc/haproxy/haproxy.cfg



Im Falle einer Konfiguration die HTTPS Unterstützt, muss zusätzlich die Datei /etc/haproxy/haproxy.pem angelegt werden, in der sich sowohl das Zertifikat, eventuelle Zwischenzertifikate und der Private Schlüssel befindet. Diese Datei muss außerdem eine spezielle Berechtigung erhalten, damit nur der Benutzer root darauf lesen zugreifen kann, ansonsten wird der haproxy Dienst nicht starten.

Für selbstgenerierte Zertifikate siehe Role LB - Self-signed certificate.

Translations Ignore


Code Block
languagebash
titleSave the certificate file
chmod 400 /etc/haproxy/haproxy.pem





Sv translation
languagefr

Table of Contents
maxLevel3
printablefalse

Translations Ignore


Code Block
title
pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=10.4.8.12 cidr_netmask=32 op monitor interval=30s


Translations Ignore


Code Block
title
pcs status   # It may take a few seconds before the resource is started. Run this command more than once...   -->   Cluster name: portal Stack: corosync Current DC: uk-acd-lb1 (version 1.1.16-12.el7_4.8-94ff4df) - partition with quorum Last updated: Tue Mar 20 11:57:43 2018 Last change: Tue Mar 20 11:57:33 2018 by root via cibadmin on uk-acd-lb1 2 nodes configured 1 resource configured Online: [ uk-acd-lb1 uk-acd-lb2 ] Full list of resources: ClusterIP (ocf::heartbeat:IPaddr2): Started uk-acd-lb1 Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled


Translations Ignore


Code Block
languagebash
title
firewall-cmd --zone=public --add-port=3306/tcp --permanent firewall-cmd --zone=public --add-port=3307/tcp --permanent firewall-cmd --zone=public --add-port=3308/tcp --permanent firewall-cmd --reload


Translations Ignore


Code Block
languagebash
title
curl https://cdn.jtel.de/downloads/configs/haproxy.redundant.http.cfg > /etc/haproxy/haproxy.cfg


Translations Ignore


Code Block
languagebash
title
curl https://cdn.jtel.de/downloads/configs/haproxy.redundant.https.cfg > /etc/haproxy/haproxy.cfg


Translations Ignore


Code Block
languagebash
title
chmod 400 /etc/haproxy/haproxy.pem