<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archives des Cluster Apache - CoffeeBreak Info</title>
	<atom:link href="https://coffeebreak.en-images.info/tag/cluster-apache/feed/" rel="self" type="application/rss+xml" />
	<link>https://coffeebreak.en-images.info/tag/cluster-apache/</link>
	<description>Une petite pause :)</description>
	<lastBuildDate>Fri, 12 Nov 2021 16:13:19 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://coffeebreak.en-images.info/wp-content/uploads/2021/07/cropped-Tasse_Cafe-scaled-1-32x32.jpg</url>
	<title>Archives des Cluster Apache - CoffeeBreak Info</title>
	<link>https://coffeebreak.en-images.info/tag/cluster-apache/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>MODOP &#8211; PARTIE 4 &#8211; Installation WordPress en HA – Cluster Apache</title>
		<link>https://coffeebreak.en-images.info/modop-partie-4-installation-wordpress-en-ha-cluster-apache/</link>
					<comments>https://coffeebreak.en-images.info/modop-partie-4-installation-wordpress-en-ha-cluster-apache/#respond</comments>
		
		<dc:creator><![CDATA[chris]]></dc:creator>
		<pubDate>Mon, 28 Jun 2021 16:29:17 +0000</pubDate>
				<category><![CDATA[Cluster Apache]]></category>
		<category><![CDATA[RedHat/Centos Linux]]></category>
		<category><![CDATA[Système]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://coffeebreak.en-images.info/?p=2439</guid>

					<description><![CDATA[<p>Mise en place du Cluster Apache  , il sera en charge de gérer les services Apache et PHP5.6. Les fichiers de conf Site et Apache seront héberger par le Cluster de fichier distribués.</p>
<p>L’article <a href="https://coffeebreak.en-images.info/modop-partie-4-installation-wordpress-en-ha-cluster-apache/">MODOP &#8211; PARTIE 4 &#8211; Installation WordPress en HA – Cluster Apache</a> est apparu en premier sur <a href="https://coffeebreak.en-images.info">CoffeeBreak Info</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3><strong>3 machines Web Apache (centos7)</strong></h3>
<ul>
<li>node01-webw 172.16.186.30</li>
<li>node02-webw 172.16.186.31</li>
<li>node03-webw 172.16.186.32</li>
</ul>
<p>Spécification des machines</p>
<p><img fetchpriority="high" decoding="async" width="856" height="282" class="wp-image-2441" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-608.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-608.png 856w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-608-300x99.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-608-768x253.png 768w" sizes="(max-width: 856px) 100vw, 856px" /></p>
<p>Le Pool « Cluster_webw » va être composé de trois machines virtuelles</p>
<ul>
<li>Node01-webw -&gt; 172.16.186.30
<ul>
<li>2CPU, 2G RAM, 10Go Disk</li>
<li>30Go Disque GlusterFS node01.gfsw</li>
</ul>
</li>
<li>Node02-webw -&gt; 172.16.186.31
<ul>
<li>2CPU, 2G RAM, 10Go Disk</li>
<li>30Go Disque GlusterFS node02.gfsw</li>
</ul>
</li>
<li>Node03-webw -&gt; 172.16.186.32
<ul>
<li>2CPU, 2G RAM, 10Go Disk</li>
<li>30Go Disque GlusterFS node03.gfsw</li>
</ul>
</li>
</ul>
<p><img decoding="async" width="928" height="176" class="wp-image-2444" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-609.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-609.png 928w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-609-300x57.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-609-768x146.png 768w" sizes="(max-width: 928px) 100vw, 928px" /></p>
<p><img decoding="async" width="891" height="612" class="wp-image-2446" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-610.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-610.png 891w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-610-300x206.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-610-768x528.png 768w" sizes="(max-width: 891px) 100vw, 891px" /></p>
<p>Les Machines du Cluster vont partager les fichiers de conf du VirtualHost ainsi que les DATA du site. Les données du site seront hébergées sur le Cluster GlusterFS et pour les bases de données le Cluster Mysql/Percona.</p>
<p>Les machines web hébergeront simplement le service Apache/PHP.</p>
<h3>1°) Désactivation du SElinux (3 nœuds webw)</h3>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>vi /etc/selinux/config</strong></span>
<span style="color: #ff0000;"><em>SELINUX=</em><strong><em>disabled</em></strong></span></pre>
<p>Redémarrer la machine.</p>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;">reboot</span></pre>
<h3><strong>2°) Désactiver l’IPV6 </strong>(3 nœuds webw)</h3>
<pre>[root@node01-webw ~]# <strong><span style="color: #ff0000;">vi /etc/sysctl.conf</span></strong>
<span style="color: #ff0000;"><em>net.ipv6.conf.all.disable_ipv6 = 1</em></span>
<span style="color: #ff0000;"><em>net.ipv6.conf.all.autoconf = 0</em></span>
<span style="color: #ff0000;"><em>net.ipv6.conf.default.disable_ipv6 = 1</em></span>
<span style="color: #ff0000;"><em>net.ipv6.conf.default.autoconf = 0</em></span></pre>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>sysctl –p</strong></span></pre>
<h3>3°) Installation de paquets utiles(3 nœuds webw)</h3>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum _y update &amp;&amp; yum upgrade</strong></span>
[root@node01-webw ~]#] <span style="color: #ff0000;"><strong>yum -y install qemu-guest-agent</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum -y install htop nmap net-tools</strong></span></pre>
<h3>4°) Installation ntp (3 nœuds webw)</h3>
<pre>[root@node01-webw ~]# <strong><span style="color: #ff0000;">yum install ntp ntpdate ntp-doc</span></strong>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>ntpdate pool.ntp.org</strong></span>
[root@node01-webw ~]#<span style="color: #ff0000;"><strong> systemctl enable ntpd &amp;&amp; systemctl start ntpd</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>firewall-cmd --add-service=ntp --permanent &amp;&amp; firewall-cmd --reload</strong></span></pre>
<h3>5°) Installation du client Gluterfs (3 nœuds web) pour se connecter au Cluster GFS</h3>
<pre>[root@node01-webw ~]#<span style="color: #ff0000;"><strong> yum -y install glusterfs-fuse</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>mkdir -p /sharegfs</strong></span></pre>
<p>Montage de la ressource /gfs dans /etc/fstab via le réseau privé (3 nœuds web)</p>
<h4><strong>node01-web</strong></h4>
<pre>[root@node01-webw ~]#<span style="color: #ff0000;"><strong> vi /etc/fstab</strong></span>
<span style="color: #ff0000;"><strong>node01-gfsw</strong>:/gfsw /sharegfs glusterfs defaults,_netdev 0 0 </span>
[root@node01-webw ~]# <strong><span style="color: #ff0000;">mount -a</span></strong>
[root@node01-webw ~]#<strong><span style="color: #ff0000;"> df -Th /sharegfs/</span></strong></pre>
<p><img loading="lazy" decoding="async" width="591" height="72" class="wp-image-2447" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-611.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-611.png 591w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-611-300x37.png 300w" sizes="auto, (max-width: 591px) 100vw, 591px" /></p>
<h4>node02-web</h4>
<pre>[root@node02-web ~]# <strong><span style="color: #ff0000;">vi /etc/fstab</span></strong>
<span style="color: #ff0000;"><strong>node02-gfsw</strong>:/gfsw /sharegfs glusterfs defaults,_netdev 0 0</span>
[root@node02-web ~]# <span style="color: #ff0000;"><strong>mount -a</strong></span>
[root@node02-web ~]# <strong><span style="color: #ff0000;">df -Th /sharegfs/</span></strong></pre>
<p><img loading="lazy" decoding="async" width="588" height="66" class="wp-image-2449" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-612.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-612.png 588w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-612-300x34.png 300w" sizes="auto, (max-width: 588px) 100vw, 588px" /></p>
<h4>node03-web</h4>
<pre>[root@node03-web ~]# <strong><span style="color: #ff0000;">vi /etc/fstab</span></strong>
<span style="color: #ff0000;"><strong>node03-gfsw:</strong>/gfsw /sharegfs glusterfs defaults,_netdev 0 0 </span>
[root@node03-web ~]# <strong><span style="color: #ff0000;">mount -a</span></strong>
[root@node01-web ~]# <strong><span style="color: #ff0000;">df -Th /sharegfs/</span></strong></pre>
<p><img loading="lazy" decoding="async" width="612" height="80" class="wp-image-2452" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-613.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-613.png 612w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-613-300x39.png 300w" sizes="auto, (max-width: 612px) 100vw, 612px" /></p>
<h3>6°) des répertoires /etc et /www</h3>
<p>On va créer les deux répertoires qui vont héberger les datas communes entre les machines du Cluster web. La création se fera sur le node01 et on va vérifier que la réplication de la structure se fasse automatiquement sur les node02 et node03.</p>
<p><strong>Sur le Node01</strong></p>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>mkdir /sharegfs/etc</strong></span>
[root@node01-webw ~]# <strong><span style="color: #ff0000;">mkdir /sharegfs/www</span></strong></pre>
<p><strong>Sur les Node02 et Node03</strong><br />
<strong><img loading="lazy" decoding="async" width="875" height="260" class="wp-image-2454" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-614.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-614.png 875w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-614-300x89.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-614-768x228.png 768w" sizes="auto, (max-width: 875px) 100vw, 875px" /></strong></p>
<p>La réplication de données sur le Cluster est fonctionnelle. On vient de relier le Cluster GlusterGFS avec le Cluster Web apache/PHP</p>
<h3>7°) Installation Apache(3 nœuds web)</h3>
<pre>[root@node01-webw ~]# <strong><span style="color: #ff0000;">yum install -y httpd</span></strong>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>systemctl enable httpd &amp;&amp; systemctl start httpd</strong></span></pre>
<p><strong>Activer les rules Firewall pour Apache</strong></p>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>firewall-cmd --permanent <span style="color: #ff0000;">--zone=public</span> --add-service=http</strong></span>
[root@node01-webw ~]#<span style="color: #ff0000;"><strong> firewall-cmd --reload</strong></span></pre>
<h3>8°) Installation PHP5.6 et modules(3 nœuds web)</h3>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum install -y yum-utils</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum-config-manager –enable remi-php56</strong></span>

[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum install php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc</strong></span>

[root@node01-webw ~]# <span style="color: #ff0000;"><strong>php -v</strong></span></pre>
<p><img loading="lazy" decoding="async" width="577" height="92" class="wp-image-2455" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-615.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-615.png 577w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-615-300x48.png 300w" sizes="auto, (max-width: 577px) 100vw, 577px" /></p>
<h3>9° Installation site Test (sur node01-webw)</h3>
<p><strong>Fichier index.php</strong></p>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>yum install vim</strong></span>
[root@node01-webw ~]# <strong><span style="color: #ff0000;">mkdir /sharegfs/www/site1</span></strong>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>touch /sharegfs/www/site1/index.php</strong></span></pre>
<pre>[root@node01-webw ~]#<span style="color: #ff0000;"><strong> vim /sharegfs/www/site1/index.php</strong></span>
<span style="color: #ff0000;">&lt;?php</span>
<span style="color: #ff0000;">echo "&lt;/h2&gt; Site de TEST &lt;/h2&gt;";</span>
<strong><span style="color: #ff0000;">// afficher le nom du fichier de script éxécuté</span></strong>
<span style="color: #ff0000;">          echo $_SERVER['PHP_SELF'];</span>
<span style="color: #ff0000;">          echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher l’adresse IP du serveur où le script est éxécuté</span></strong>
<span style="color: #ff0000;">          echo $_SERVER['SERVER_ADDR'];</span>
<span style="color: #ff0000;">          echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher le nom d’hôte du serveur</span></strong>
<span style="color: #ff0000;">         echo $_SERVER['SERVER_NAME'];</span>
<span style="color: #ff0000;">         echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher la méthode de requête (‘GET’, ‘HEAD’, ‘POST’, ‘PUT’)</span></strong>
<span style="color: #ff0000;">         echo $_SERVER['REQUEST_METHOD'];</span>
<span style="color: #ff0000;">         echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher les paramètres de l’URL</span></strong>
<span style="color: #ff0000;">         echo $_SERVER['QUERY_STRING'];</span>
<span style="color: #ff0000;">         echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher le nom du répertoire racine du script</span></strong>
<span style="color: #ff0000;">         echo $_SERVER['DOCUMENT_ROOT'];</span>
<span style="color: #ff0000;">         echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher le nom d’hôte de la machine cliente</span></strong>
<span style="color: #ff0000;">         echo $_SERVER['HTTP_HOST'];</span>
<span style="color: #ff0000;">         echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher les informations sur le navigateur utilisé</span></strong>
<span style="color: #ff0000;">         echo $_SERVER['HTTP_USER_AGENT'];</span>
<span style="color: #ff0000;">         echo "&lt;br&gt;";</span>
<strong><span style="color: #ff0000;">// afficher l’adresse IP du client</span></strong>
<span style="color: #ff0000;">         echo $_SERVER['REMOTE_ADDR'];</span>
<span style="color: #ff0000;">         echo "&lt;br&gt;";</span>
<span style="color: #ff0000;">?&gt;</span></pre>
<pre>[root@node01-webw ~]# <strong><span style="color: #ff0000;">chown -R apache.apache /sharegfs/www</span></strong>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>chmod -R 755 /sharegfs/www</strong></span></pre>
<p><strong>Fichier de conf VirtualHost</strong></p>
<pre>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>mkdir -p /sharegfs/etc/httpd/conf.d</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>touch /sharegfs/etc/httpd/conf.d/site1.conf</strong></span>
[root@node01-webw ~]# <span style="color: #ff0000;"><strong>cp /etc/httpd/conf.d/php.conf /sharegfs/etc/httpd/conf.d/
</strong></span><strong>[root@node01-webw ~]# </strong><span style="color: #ff0000;"><strong>vim /sharegfs/etc/httpd/conf.d/site1.conf</strong></span></pre>
<pre><span style="color: #ff0000;"><em>&lt;VirtualHost *:80&gt;</em></span>
<span style="color: #ff0000;"><em>          ServerName site1.house.cpb</em></span>
<span style="color: #ff0000;"><em>          ServerAlias house.cpb</em></span>
<span style="color: #ff0000;"><em>          DocumentRoot /sharegfs/www/site1</em></span>
<span style="color: #ff0000;"><em>          DirectoryIndex index.php</em></span>

<span style="color: #ff0000;"><em>&lt;Directory /sharegfs/www/site1/&gt;</em></span>
<span style="color: #ff0000;"><em>          Options Indexes FollowSymLinks</em></span>
<span style="color: #ff0000;"><em>          AllowOverride All</em></span>
<span style="color: #ff0000;"><em>          Require all granted</em></span>
<span style="color: #ff0000;"><em>&lt;/Directory&gt;</em></span>

<span style="color: #ff0000;"><em>&lt;/VirtualHost&gt;</em></span></pre>
<p><strong>Modifier les conf Apache (3 nœuds web)</strong></p>
<pre>[root@node01-webw ~]# <strong><span style="color: #ff0000;">vim /etc/httpd/conf/httpd.conf</span></strong></pre>
<p><strong>Modifier</strong></p>
<pre><span style="color: #ff0000;"># Supplemental configuration</span>
<span style="color: #ff0000;">#</span>
<span style="color: #ff0000;"># Load config files in the "/etc/httpd/conf.d" directory, if any.</span>
<strong><span style="color: #ff0000;">#IncludeOptional conf.d/*.conf</span></strong>
<strong><span style="color: #ff0000;">IncludeOptional /sharegfs/etc/httpd/conf.d/*.conf</span></strong></pre>
<pre>[root@node01-webw ~]# <span style="color: #ff0000;"><strong>systemctl reload httpd</strong></span></pre>
<p><strong>Visualiser le fonctionnement des 3 machines du site1 localisé sur le Cluster de fichier distribué.</strong></p>
<ul>
<li>Il Faut pour cela prendre une machine du Subnet 172.16.186.0/24.</li>
<li>Ici une Machine Windows IP 172.16.186.100</li>
</ul>
<p><img loading="lazy" decoding="async" width="899" height="648" class="wp-image-2457" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-616.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-616.png 899w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-616-300x216.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-616-768x554.png 768w" sizes="auto, (max-width: 899px) 100vw, 899px" /></p>
<p>Views: 7</p><p>L’article <a href="https://coffeebreak.en-images.info/modop-partie-4-installation-wordpress-en-ha-cluster-apache/">MODOP &#8211; PARTIE 4 &#8211; Installation WordPress en HA – Cluster Apache</a> est apparu en premier sur <a href="https://coffeebreak.en-images.info">CoffeeBreak Info</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://coffeebreak.en-images.info/modop-partie-4-installation-wordpress-en-ha-cluster-apache/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MODOP – PARTIE 1 &#8211; Installation WordPress en HA – Présentation</title>
		<link>https://coffeebreak.en-images.info/modop-installation-wordpress-en-ha-presentation/</link>
					<comments>https://coffeebreak.en-images.info/modop-installation-wordpress-en-ha-presentation/#respond</comments>
		
		<dc:creator><![CDATA[chris]]></dc:creator>
		<pubDate>Sun, 27 Jun 2021 16:40:31 +0000</pubDate>
				<category><![CDATA[AlmaLinux]]></category>
		<category><![CDATA[Cluster Apache]]></category>
		<category><![CDATA[Cluster HAProxy]]></category>
		<category><![CDATA[Cluster Mysql/MariaDB]]></category>
		<category><![CDATA[RedHat/Centos Linux]]></category>
		<category><![CDATA[Système]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cluster GlusterFS]]></category>
		<category><![CDATA[Cluster HA]]></category>
		<category><![CDATA[Cluster MySQL]]></category>
		<category><![CDATA[RockyLinux]]></category>
		<guid isPermaLink="false">https://coffeebreak.en-images.info/?p=2270</guid>

					<description><![CDATA[<p>Mise en place d'une Infrastructure WEB haute disponibilité via des Clusters "Tiers" . Ici on aura  4 Clusters (HaProxy, Mysql , Apache , GLusterFS).<br />
Le site test sera un Wordpress.</p>
<p>L’article <a href="https://coffeebreak.en-images.info/modop-installation-wordpress-en-ha-presentation/">MODOP – PARTIE 1 &#8211; Installation WordPress en HA – Présentation</a> est apparu en premier sur <a href="https://coffeebreak.en-images.info">CoffeeBreak Info</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Le but est de rendre disponible une application web (ici WordPress) dans une infrastructure la plus solide possible.</p>
<h3><strong>Principe </strong></h3>
<p><img loading="lazy" decoding="async" width="1146" height="766" class="wp-image-2274" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-570.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-570.png 1146w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-570-300x201.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-570-1024x684.png 1024w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-570-768x513.png 768w" sizes="auto, (max-width: 1146px) 100vw, 1146px" /></p>
<h3><strong>Inventaire des Machines</strong></h3>
<p><img loading="lazy" decoding="async" width="1087" height="293" class="wp-image-2275" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-571.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-571.png 1087w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-571-300x81.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-571-1024x276.png 1024w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-571-768x207.png 768w" sizes="auto, (max-width: 1087px) 100vw, 1087px" /></p>
<h3><strong>Composition des Clusters </strong></h3>
<h3><strong>Cluster HaProxy + keepalive(RockyLinux 8 fork RHEL8)</strong></h3>
<p><a href="https://coffeebreak.en-images.info/?p=2580">MODOP – PARTIE 5 – Installation WordPress en HA – Cluster HaProxy</a></p>
<p><strong>3 machines HaProxy</strong></p>
<ul>
<li>node01-haw 172.16.186.20</li>
<li>node02-haw 172.16.186.21</li>
<li>node03-haw 172.16.186.22</li>
<li>node-haw 192.168.1.230/24(vIP)</li>
</ul>
<p><img loading="lazy" decoding="async" width="955" height="173" class="wp-image-2277" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-572.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-572.png 955w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-572-300x54.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-572-768x139.png 768w" sizes="auto, (max-width: 955px) 100vw, 955px" /></p>
<p>HaProxy va repartir la charge réseau en fonction de la disponibilité des machines du réseau.<br />
Si votre site possède une forte affluence, HaProxy répartira les différentes requêtes SQL, http sur les différents Cluster de machine.<br />
Ici on utilisera 3 machines HaProxy pour gérer la gestion « tiers » panne.<br />
En effet, il y aura un master et deux slaves.</p>
<ul>
<li>Si le master est down l’un des deux « slaves » passe en master et répondra aux requêtes.</li>
<li>Si le deuxième master tombe alors le troisième passera Master.</li>
</ul>
<p>Statistiquement la panne de 2 serveurs sur 3 est assez rare.</p>
<h3><strong>GlusterFS cluster (Centos7)</strong></h3>
<ul>
<li><a href="https://coffeebreak.en-images.info/?p=2310">MODOP – PARTIE 2 – Installation WordPress en HA – GlusterFS</a></li>
</ul>
<p><strong>3 machines GlusterFS</strong></p>
<ul>
<li>node01-gfsw 172.16.186.24</li>
<li>node02-gfsw 172.16.186.25</li>
<li>node03-gfsw 172.16.186.26</li>
</ul>
<p><img loading="lazy" decoding="async" width="965" height="174" class="wp-image-2280" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-573.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-573.png 965w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-573-300x54.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-573-768x138.png 768w" sizes="auto, (max-width: 965px) 100vw, 965px" /></p>
<p>GlusterFS est un service de fichiers distribués. Chaque fichier inscrit sur une machine est automatiquement répliqué sur les autres machines du cluster.<br />
Si une machine du cluster est down, les fichiers restent disponibles sur les deux autres nœuds du Cluster.<br />
Nous allons héberger les fichiers de conf (Apache, haProxy ) et le site de WordPress.<br />
Cela nous permettra de centraliser les fichiers nécessaires au fonctionnement des Clusters.</p>
<h3><strong>MySQL cluster (AlmaLinux 8 fork RHEL8)</strong></h3>
<p><a href="https://coffeebreak.en-images.info/?p=2359">MODOP &#8211; PARTIE 3 &#8211; Installation WordPress en HA – Cluster Mysql</a></p>
<p><strong>3 machines MySQL</strong></p>
<ul>
<li>node01-sqlw 172.16.186.27</li>
<li>node02-sqlw 172.16.186.28</li>
<li>node03-sqlw 172.16.186.29</li>
</ul>
<p><img loading="lazy" decoding="async" width="944" height="166" class="wp-image-2282" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-574.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-574.png 944w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-574-300x53.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-574-768x135.png 768w" sizes="auto, (max-width: 944px) 100vw, 944px" /></p>
<p>Le cluster MySQL est constitué de 3 nœuds MySQL en Master-Master-Master. Toutes données inscrites sur un des nœuds est répliquées automatiquement sur les autres nœuds du cluster.<br />
Si une machine est down, les autres machines répondront aux requêtes via le Cluster HaProxy.<br />
Quand la machine reviendra UP dans le Cluster, elle se resynchronisera automatiquement auprès des autres machines du cluster.</p>
<h3><strong>Web cluster apache/PHP</strong></h3>
<p><a href="https://coffeebreak.en-images.info/?p=2439">MODOP – PARTIE 4 – Installation WordPress en HA – Cluster Apache </a></p>
<p><strong>3 machines Apache/php</strong></p>
<ul>
<li>node01-webw 172.16.186.30</li>
<li>node02-webw 172.16.186.31</li>
<li>node03-webw 172.16.186.32</li>
</ul>
<p><img loading="lazy" decoding="async" width="933" height="166" class="wp-image-2283" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-575.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-575.png 933w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-575-300x53.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-575-768x137.png 768w" sizes="auto, (max-width: 933px) 100vw, 933px" /></p>
<p>Le Cluster Apache hébergera uniquement le service Apache/PHP pour le site WordPress, il répondra à toutes les requêtes de HaProxy.<br />
Nous sommes encore sous le mode « tiers ». Si une machine cesse de fonctionner les deux autres répondrons aux sollicitations de HaProxy via le LoadBalancing.</p>
<h3><strong>Conclusion </strong></h3>
<p>Dans notre infrastructure nous avons 4 clusters de service en mode « tiers » Haute disponibilité</p>
<ul>
<li>Cluster HaProxy + KeepAlived</li>
<li>Cluster GlusterFS</li>
<li>Cluster MySQL</li>
<li>Cluster Web</li>
</ul>
<p>Pour que ce mode soit le plus résilient, il faut impérativement provisionner chacun des services sur des machines hyperviseurs différentes (VMware, Proxmox ,HyperV ,etc) .</p>
<p><img loading="lazy" decoding="async" width="1136" height="502" class="wp-image-2285" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-576.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-576.png 1136w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-576-300x133.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-576-1024x453.png 1024w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-576-768x339.png 768w" sizes="auto, (max-width: 1136px) 100vw, 1136px" /></p>
<p>Bref si un Hyperviseur est down, les deux autres répondrons aux sollicitations des clients.</p>
<p>Si les hyperviseurs sont gérés par le mode HA, les machines virtuelles hébergées par l’hyperviseur en panne migreront automatiquement sur les autres hyperviseurs UP.</p>
<h3><strong>Prérequis </strong></h3>
<p>La première étape sera d’inscrire toutes les machines de notre infrastructure « WordPress » sur nos DNS primaire et secondaire afin que les machines se trouvent facilement par leur nom d’host.</p>
<ul>
<li><a href="https://coffeebreak.en-images.info/?p=1111">MODOP – Configurer un DNS Primaire et Secondaire – Centos7 – SysBreak Info (en-images.info)</a></li>
</ul>
<pre><em>[root@dns-pri ~]# vi /var/named/forward.house.cpb</em>
<em>; ### infrastructure WordPress ###</em>
<em>;</em>
<em>; Cluster HAproxy</em>
<em>node01-haw IN A 172.16.186.20</em>
<em>node02-haw IN A 172.16.186.21</em>
<em>node03-haw IN A 172.16.186.22</em>
<em>node-haw IN A 192.168.1.230</em>
<em>; Cluster GlusterFS</em>
<em>node01-gfsw IN A 172.16.186.24</em>
<em>node02-gfsw IN A 172.16.186.25</em>
<em>node03-gfsw IN A 172.16.186.26</em>
<em>; Cluster MySQL</em>
<em>node01-sqlw IN A 172.16.186.27</em>
<em>node02-sqlw IN A 172.16.186.28</em>
<em>node03-sqlw IN A 172.16.186.29</em>
<em>; Cluster Web Httpd/PHP</em>
<em>node01-webw IN A 172.16.186.30</em>
<em>node02-webw IN A 172.16.186.31</em>
<em>node03-webw IN A 172.16.186.32</em></pre>
<p><em><img loading="lazy" decoding="async" width="439" height="122" class="wp-image-2288" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-577.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-577.png 439w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-577-300x83.png 300w" sizes="auto, (max-width: 439px) 100vw, 439px" /></em></p>
<p>Modifier le numéro de série et redémarrer le service apache.</p>
<pre>[root@dns-pri ~]# systemctl reload named</pre>
<p>Côté DNS Primaire<br />
<img loading="lazy" decoding="async" width="1361" height="193" class="wp-image-2290" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-578.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-578.png 1361w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-578-300x43.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-578-1024x145.png 1024w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-578-768x109.png 768w" sizes="auto, (max-width: 1361px) 100vw, 1361px" /></p>
<p>Côté DNS Secondaire<br />
<img loading="lazy" decoding="async" width="1444" height="148" class="wp-image-2291" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-579.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-579.png 1444w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-579-300x31.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-579-1024x105.png 1024w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-579-768x79.png 768w" sizes="auto, (max-width: 1444px) 100vw, 1444px" /></p>
<p>Test sur un client<br />
<img loading="lazy" decoding="async" width="962" height="447" class="wp-image-2293" src="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-580.png" srcset="https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-580.png 962w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-580-300x139.png 300w, https://coffeebreak.en-images.info/wp-content/uploads/2021/06/word-image-580-768x357.png 768w" sizes="auto, (max-width: 962px) 100vw, 962px" /></p>
<p>Views: 25</p><p>L’article <a href="https://coffeebreak.en-images.info/modop-installation-wordpress-en-ha-presentation/">MODOP – PARTIE 1 &#8211; Installation WordPress en HA – Présentation</a> est apparu en premier sur <a href="https://coffeebreak.en-images.info">CoffeeBreak Info</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://coffeebreak.en-images.info/modop-installation-wordpress-en-ha-presentation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
