...
| Sv translation |
|---|
|
Beschreibung der RolleDie Rolle LB stellt den zentralen Zugangspunkt zum Portal und den SOAP Schnittstellen zur Verfügung. Hier erfolgt dann die Verteilung der Anfragen auf die zur Verfügung stehenden Web Application Server unter Berücksichtigung einer gleichmäßigen Lastverteilung, des möglichen Ausfalls einer oder mehrerer Web Server und der Dienst-Spezifischen Einschränkungen. Des Weiteren übernimmt diese Rolle auch das Bereitstellen der mittels TLS verschlüsselten Verbindung über HTTPS. Der Dienst kann sowohl auf HTTP (Port 80) und HTTPS (Port 443) angeboten werden. Eine automatische Umleitung zu HTTPS bzw. spezieller URLs kann hier auch realisiert werden (Beispiele: https://acd.example.com wird umgeleitet zuhttps://acd.example.com/CarrierPortal/login/reseller/client oder https://acd.exaple.com/admin wird umgeleitet zu https://acd.exaple.com/CarrierPortal/sysadmin/login). Da die Rolle in der Regel sehr wenig Ressourcen benötigt, wird sie in der Regel (und auch im hier aufgeführten Konfigurationsbeispiel) auf der gleichen Maschine installiert, in der auch die Rolle STORE installiert wurde. Installation der SoftwareDie Installation der benötigten Software haproxy erfolgt mittels folgenden Befehls: | Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | Installation of haproxy |
|---|
| yum -y install haproxy
mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.sample |
|
Die mitgelieferte Beispiels-Konfigurationsdatei wird mit dem zweiten Befehl umbenannt, damit sie auch zu einem späteren Zeitpunkt zu Referenzzwecken zur Verfügung steht. haproxy aktivierenDer haproxy Dienst wird mit folgendem Befehl in die Liste der automatisch startenden Dienste aufgenommen: | Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | haproxy service autostart |
|---|
| chkconfig haproxy on |
|
Firewall KonfigurationAls nächstes müssen in der Firewall die Port-Freigaben für den haproxy Dienst eingetragen und persistent gespeichert werden: | Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | Configure firewall |
|---|
| firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --zone=public --add-port=7777/tcp --permanent
firewall-cmd --reload |
|
SeLinux KonfigurationDamit haproxy beliebige Ports öffnen kann, muss eine SeLinux Konfiguration vorgenommen werden: | Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | SeLinux configuration |
|---|
| setsebool -P haproxy_connect_any=1
semanage permissive -a haproxy_t |
|
Log haproxyUm die Logausgaben des haproxy Dienstes über den zentralen Logging-Dienst in eine separate Log-Datei zu speichern, müssen folgende Befehle ausgeführt werden: | Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | Adjustments to the syslog service |
|---|
| sed -i -e 's/#$ModLoad *imudp/$ModLoad imudp/' -e 's/#$UDPServerRun *514/$UDPServerRun 514/' /etc/rsyslog.conf
cat <<EOFF>/etc/rsyslog.d/haproxy.conf
local2.* /var/log/haproxy.log
EOFF
service rsyslog restart |
|
|
| Sv translation |
|---|
|
Description du rôle
Le rôle LB fournit le point d'accès central au portail et aux interfaces SOAP. Les demandes sont alors distribuées aux serveurs d'application Web disponibles, en tenant compte d'une répartition égale de la charge, de la défaillance éventuelle d'un ou de plusieurs serveurs Web et des restrictions propres au service. En outre, ce rôle gère également la fourniture de la connexion cryptée TLS via HTTPS. Le service peut être offert à la fois sur HTTP (port 80) et HTTPS (port 443). Une redirection automatique vers HTTPS ou des URLs spéciales peut également être mise en œuvre ici (Exemples : https://acd.example.com is distributed to: https://acd.example.com/CarrierPortal/login/reseller/client or https://acd.exaple.com/admin est distribué à https://acd.exaple.com/CarrierPortal/sysadmin/login).
Comme le rôle nécessite généralement très peu de ressources, il est généralement (et dans l'exemple de configuration donné ici) installé sur la même machine sur laquelle le rôle STORE a été installé.
Installation du logiciel
L'installation des logiciels nécessaires haproxy se fait avec la commande suivante :
| Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | Installation de l'haproxy |
|---|
|
yum -y install haproxy mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.sample |
L'exemple de fichier de configuration fourni est renommé avec la deuxième commande afin qu'il soit également disponible à des fins de référence ultérieurement.
activer l'haproxy
Le service haproxy est ajouté à la liste des services démarrant automatiquement avec la commande suivante
| Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | haproxy service autostart |
|---|
|
chkconfig haproxy on |
Configuration du pare-feu
Ensuite, les parts de port pour le service haproxy doivent être saisies et stockées de façon permanente dans le pare-feu
| Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | Configurer le parefeu |
|---|
|
firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --zone=public --add-port=443/tcp --permanent firewall-cmd --zone=public --add-port=7777/tcp --permanent firewall-cmd --reload |
Configuration SeLinux
Pour permettre à l'haproxy d'ouvrir des ports arbitraires, une configuration SeLinux doit être effectuée :
| Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | Configuration SeLinux |
|---|
|
setsebool -P haproxy_connect_any=1 semanage permissive -a haproxy_t |
Journal haproxy
Pour enregistrer la sortie du journal du service haproxy via le service central de journalisation dans un fichier journal séparé, les commandes suivantes doivent être exécutées :
| Translations Ignore |
|---|
| Code Block |
|---|
| language | bash |
|---|
| title | Adaptation du service syslog |
|---|
|
sed -i -e 's/#$ModLoad *imudp/$ModLoad imudp/' -e 's/#$UDPServerRun *514/$UDPServerRun 514/' /etc/rsyslog.conf cat <<EOFF>/etc/rsyslog.d/haproxy.conf local2.* /var/log/haproxy.log EOFF service rsyslog restart |
|