From b561acc8d13e401972e9e6a00fd57c4e01836504 Mon Sep 17 00:00:00 2001
From: Matthieu Kermagoret <mkermagoret@centreon.com>
Date: Tue, 29 May 2018 12:13:23 +0200
Subject: [PATCH] chore(install): drop support for CentOS 6.

---
 Jenkinsfile                                   | 67 ++-----------------
 doc/en/administration_guide/02e.rst           | 12 ++--
 doc/en/installation/from_packages.rst         |  8 ---
 doc/en/installation/from_sources.rst          |  9 +--
 doc/en/upgrade/from_packages.rst              | 20 ++----
 doc/fr/administration_guide/02e.rst           | 12 ++--
 doc/fr/installation/from_packages.rst         | 12 +---
 doc/fr/installation/from_sources.rst          |  9 +--
 doc/fr/upgrade/from_packages.rst              | 20 ++----
 .../steps/process/installConfigurationDb.php  |  8 +--
 10 files changed, 35 insertions(+), 142 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 8be1af74e1..adb7eb8aad 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -13,21 +13,7 @@ stage('Source') {
 
 try {
   stage('Unit tests') {
-    parallel 'centos6': {
-      node {
-        sh 'cd /opt/centreon-build && git pull && cd -'
-        sh '/opt/centreon-build/jobs/web/3.5/mon-web-unittest.sh centos6'
-        step([
-          $class: 'XUnitBuilder',
-          thresholds: [
-            [$class: 'FailedThreshold', failureThreshold: '0'],
-            [$class: 'SkippedThreshold', failureThreshold: '0']
-          ],
-          tools: [[$class: 'PHPUnitJunitHudsonTestType', pattern: 'ut.xml']]
-        ])
-      }
-    },
-    'centos7': {
+    parallel 'centos7': {
       node {
         sh 'cd /opt/centreon-build && git pull && cd -'
         sh '/opt/centreon-build/jobs/web/3.5/mon-web-unittest.sh centos7'
@@ -73,13 +59,7 @@ try {
   }
 
   stage('Package') {
-    parallel 'centos6': {
-      node {
-        sh 'cd /opt/centreon-build && git pull && cd -'
-        sh '/opt/centreon-build/jobs/web/3.5/mon-web-package.sh centos6'
-      }
-    },
-    'centos7': {
+    parallel 'centos7': {
       node {
         sh 'cd /opt/centreon-build && git pull && cd -'
         sh '/opt/centreon-build/jobs/web/3.5/mon-web-package.sh centos7'
@@ -97,13 +77,7 @@ try {
   }
 
   stage('Bundle') {
-    parallel 'centos6': {
-      node {
-        sh 'cd /opt/centreon-build && git pull && cd -'
-        sh '/opt/centreon-build/jobs/web/3.5/mon-web-bundle.sh centos6'
-      }
-    },
-    'centos7': {
+    parallel 'centos7': {
       node {
         sh 'cd /opt/centreon-build && git pull && cd -'
         sh '/opt/centreon-build/jobs/web/3.5/mon-web-bundle.sh centos7'
@@ -115,22 +89,7 @@ try {
   }
 
   stage('Critical tests') {
-    parallel 'centos6': {
-      node {
-        sh 'cd /opt/centreon-build && git pull && cd -'
-        sh '/opt/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos6 @critical'
-        step([
-          $class: 'XUnitBuilder',
-          thresholds: [
-            [$class: 'FailedThreshold', failureThreshold: '0'],
-            [$class: 'SkippedThreshold', failureThreshold: '0']
-          ],
-          tools: [[$class: 'JUnitType', pattern: 'xunit-reports/**/*.xml']]
-        ])
-        archiveArtifacts allowEmptyArchive: true, artifacts: 'acceptance-logs/*.txt, acceptance-logs/*.png'
-      }
-    },
-    'centos7': {
+    parallel 'centos7': {
       node {
         sh 'cd /opt/centreon-build && git pull && cd -'
         sh '/opt/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos7 @critical'
@@ -152,22 +111,7 @@ try {
 
   if (env.BRANCH_NAME == 'master') {
     stage('Acceptance tests') {
-      parallel 'centos6': {
-        node {
-          sh 'cd /opt/centreon-build && git pull && cd -'
-          sh '/opt/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos6 ~@critical'
-          step([
-            $class: 'XUnitBuilder',
-            thresholds: [
-              [$class: 'FailedThreshold', failureThreshold: '0'],
-              [$class: 'SkippedThreshold', failureThreshold: '0']
-            ],
-            tools: [[$class: 'JUnitType', pattern: 'xunit-reports/**/*.xml']]
-          ])
-          archiveArtifacts allowEmptyArchive: true, artifacts: 'acceptance-logs/*.txt, acceptance-logs/*.png'
-        }
-      },
-      'centos7': {
+      parallel 'centos7': {
         node {
           sh 'cd /opt/centreon-build && git pull && cd -'
           sh '/opt/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos7 ~@critical'
@@ -200,7 +144,6 @@ try {
     build job: 'centreon-poller-display/master', wait: false
     build job: 'centreon-pp-manager/master', wait: false
     build job: 'centreon-bam/master', wait: false
-    build job: 'des-mbi-bundle-centos6', wait: false
     build job: 'des-mbi-bundle-centos7', wait: false
   }
 } catch(e) {
diff --git a/doc/en/administration_guide/02e.rst b/doc/en/administration_guide/02e.rst
index e97d891575..21668667dd 100644
--- a/doc/en/administration_guide/02e.rst
+++ b/doc/en/administration_guide/02e.rst
@@ -20,7 +20,7 @@ The following window is displayed:
    :align: center
 
 * **Directory** indicates the directory where Centreon is installed
-* **Centreon Web Directory** field indicates the web directory on which Centreon is installed 
+* **Centreon Web Directory** field indicates the web directory on which Centreon is installed
 * **Limit per page (default)** field defines the number of objects displayed per **Configuration** page
 * **Limit per page for Monitoring** field defines the number of objects displayed per page in the **Monitoring** menu
 * **Graph per page for Performances** field defines the maximum number of displayed charts on **Performance** page
@@ -70,7 +70,7 @@ This part covers the general options of the real time monitoring interface.
 * **Centreon Broker socket path** Centreon Broker socket path for send external command
 * **Directory + Mailer Binary** field contains the path to the executable file for sending  e-mails
 * **Maximum number of hosts to show** and **Maximum number of services to show** lists contain the maximum number of hosts or services to be displayed in the overall view (menu: **Home** ==> **Home**)
-* **Page refresh interval** field defines the data refreshment interval in the overall view 
+* **Page refresh interval** field defines the data refreshment interval in the overall view
 * The boxes in the **Default acknowledgement settings** and **Default downtime settings** categories define the options by default that will be checked or not during definition of an acknowledgement or of a downtime
 
 
@@ -139,7 +139,7 @@ The table below summarises the settings to add an LDAP server:
 .. note::
    Before any import, check the default settings proposed. If you have not selected a Model, you will need to define the search filters manually by filling in the fields.
 
-With Centos 6, it's possible to not check server certificate, follow procedure :
+With CentOS 7, it's possible to not check server certificate, follow procedure :
 
 Add the following line in file "/etc/openldap/ldap.conf" :
 
@@ -151,7 +151,7 @@ Then restart Apache :
 
 ::
 
- /etc/init.d/httpd restart
+  service httpd restart
 
 
 *******
@@ -169,7 +169,7 @@ This part can be used to configure the RRDTool graphs generation engine and the
 * The fields belonging to the categories **Title Properties**, **Unit Properties**, **Axis Properties**, **Legend Properties** and **Watermark Properties** are used to define the typeface and character size for the property selected
 * **Enable RRDCached** field serves to enable the RRDcached process (only works with the Centreon Broker)
 * **TCP Port** field defines the port on which RRDcached listens (don’t enable the TCP connection)
-* **UNIX Socket path** field defines the path to the Unix socket 
+* **UNIX Socket path** field defines the path to the Unix socket
 
 .. warning::
    Don’t enable RRDCacheD unless your monitoring platform encounters too many disk accesses concerning the writing of data in RRD files.
@@ -187,7 +187,7 @@ This part can be used to configure the enabling of the logging of activity on Ce
 
 * **Logs Directory** field defines the path where event logs will be recorded
 * **Authentication debug** box can be used to log authentications to the Centreon interface
-* **Monitoring Engine Import debug** box enables logging of the scheduler debugging 
+* **Monitoring Engine Import debug** box enables logging of the scheduler debugging
 * **RRDTool debug** box enables logging of the RRDTool graph engine debugging
 * **LDAP User Import debug** box enables logging of debugging of the import of LDAP users
 * **SQL debug** box enables the logging of SQL requests executed by the Centreon interface
diff --git a/doc/en/installation/from_packages.rst b/doc/en/installation/from_packages.rst
index 1f19b5e727..03ca4768b0 100644
--- a/doc/en/installation/from_packages.rst
+++ b/doc/en/installation/from_packages.rst
@@ -32,14 +32,6 @@ Perform the following command from a user with sufficient rights.
 Centreon Repository
 -------------------
 
-For CentOS 6.
-
-::
-
-   $ wget http://yum.centreon.com/standard/3.4/el6/stable/noarch/RPMS/centreon-release-3.4-4.el6.noarch.rpm
-   $ yum install --nogpgcheck centreon-release-3.4-4.el6.noarch.rpm
-
-
 For CentOS 7.
 
 ::
diff --git a/doc/en/installation/from_sources.rst b/doc/en/installation/from_sources.rst
index 2ebad55b6a..ff0302ac04 100644
--- a/doc/en/installation/from_sources.rst
+++ b/doc/en/installation/from_sources.rst
@@ -16,13 +16,6 @@ Most CentOS users will find easier to install Centreon Web by using
 
 CentOS and RHEL environments do not possess as standard on archives all the dependencies necessary for the installation of Centreon. You should add the *RPM Forge* archive
 
-el6 system:
-
- ::
-
-    $ wget http://repository.it4i.cz/mirrors/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
-    $ wget https://repository.it4i.cz/mirrors/repoforge/RPM-GPG-KEY.dag.txt
-
 el7 system:
 
  ::
@@ -42,7 +35,7 @@ Then perform the following commands:
  ::
 
   $ rpm --import RPM-GPG-KEY.dag.txt
-  $ rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm (you can adapt for el7 system)
+  $ rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
 
 You can now install the necessary prerequisites::
 
diff --git a/doc/en/upgrade/from_packages.rst b/doc/en/upgrade/from_packages.rst
index 1b4c53fd2e..191b0fc0ee 100644
--- a/doc/en/upgrade/from_packages.rst
+++ b/doc/en/upgrade/from_packages.rst
@@ -5,7 +5,7 @@ From Packages
 =============
 
 Centreon 3.4 includes Centreon Web 2.8, Centreon Engine 1.8, Centreon Broker 3.0.
-It comes in two operating system flavors, either CentOS 6 or CentOS 7.
+It is supported only on CentOS 7.
 
 .. warning::
    If your centreon contains the centreon knowlegdebase module (AKA Centreon KB),
@@ -70,16 +70,6 @@ If you are already a Centreon ISO user, you need to update your Centreon .repo f
 get software that is part of Centreon 3.4 (namely Centreon Web 2.8 and
 associated components). Run the commands for your operating system.
 
-CentOS 6
-********
-
-::
-
-   $ rm -f /etc/yum.repos.d/ces-standard.repo /etc/yum.repos.d/centreon-stable.repo
-   $ wget http://yum.centreon.com/standard/3.4/el6/stable/noarch/RPMS/centreon-release-3.4-4.el6.noarch.rpm
-   $ yum install --nogpgcheck centreon-release-3.4-4.el6.noarch.rpm
-
-
 CentOS 7
 ********
 
@@ -88,10 +78,10 @@ CentOS 7
    $ rm -f /etc/yum.repos.d/ces-standard.repo /etc/yum.repos.d/centreon-stable.repo
    $ wget http://yum.centreon.com/standard/3.4/el7/stable/noarch/RPMS/centreon-release-3.4-4.el7.centos.noarch.rpm
    $ yum install --nogpgcheck centreon-release-3.4-4.el7.centos.noarch.rpm
-   
+
 .. warning::
    If you're using Centreon modules Centreon BAM, Centreon MAP4, CentreonMBI or Centreon EPP please contact our Support to have the new repo of each module.
-   
+
 Core components upgrade
 =======================
 
@@ -135,7 +125,7 @@ to load new extension.
  ::
 
    # service httpd restart
-   
+
 Update poller
 *************
 
@@ -143,7 +133,7 @@ Repeat this procedure on all your poller :
 
  * Update repo
  * Update packets
- 
+
 .. warning::
    You must have on all your environment (Central and Poller) the same version of Centreon Engine 1.7 and Centreon Broker 3.0.
 
diff --git a/doc/fr/administration_guide/02e.rst b/doc/fr/administration_guide/02e.rst
index f5b0c6417d..9c0731df5d 100644
--- a/doc/fr/administration_guide/02e.rst
+++ b/doc/fr/administration_guide/02e.rst
@@ -27,7 +27,7 @@ La fenêtre suivante s'affiche :
 * Le champ **Limite par page pour les pages de supervision** définit le nombre d'objet affiché par page au sein du menu **Supervision**
 * Le champ **Nombre de graphiques par page** définit le nombre maximum de graphiques affichés sur la page de *Performances**
 * Le champ **Nombre d'éléments dans les boîtes de sélection** définit le nombre maximum d'éléments affichés dans chaque boîte de sélection
-* Le champ **Durée d'expiration de la session**, exprimé en minutes, indique la durée maximale d'une session 
+* Le champ **Durée d'expiration de la session**, exprimé en minutes, indique la durée maximale d'une session
 * Le champ **Intervalle de rafraîchissement pour la page des statistiques**, exprimé en secondes, indique l'intervalle de rafraîchissement pour les objets de la page des statistiques
 * Le champ **Intervalle de rafraîchissement pour la page de supervision**, exprimé en secondes, indique l'intervalle de rafraîchissement pour les objets de la page supervision
 * Le champ **Trier les problèmes par** permet de choisir comment trier les différents incidents dans le menu **Supervision**
@@ -71,7 +71,7 @@ Cette partie traite des options générales de l'interface de supervision temps
 * La liste **Broker utilisé par Centreon** décrit le broker utilisé par la plate-forme Centreon
 * Le champ **Script de démarrage du broker** contient le chemin vers le script de démarrage du broker
 * Le champ **Chemin complet de l'exécutable** contient le chemin vers l'exécutable permettant d'envoyer des mails
-* Les listes **Nombre maximum d'hôtes à afficher** et **Nombre maximum de services à afficher** contiennent le nombre maximal d'hôte ou de services à afficher dans la vue d'ensemble (menu **Accueil** ==> **Accueil**) 
+* Les listes **Nombre maximum d'hôtes à afficher** et **Nombre maximum de services à afficher** contiennent le nombre maximal d'hôte ou de services à afficher dans la vue d'ensemble (menu **Accueil** ==> **Accueil**)
 * Le champ **Intervalle de rafraîchissement de la page** définit l'intervalle de rafraîchissement des données dans la vue d'ensemble
 * Les cases contenues dans les catégories **Options d'acquittement par défaut** et **Options de temps d'arrêt par défaut** définissent les options par défaut qui seront cochées ou non lors de la définition d'un acquittement ou d'un temps d'arrêt
 * Le champ **Durée** permet de définir la durée par défaut d'un temps d'arrêt
@@ -125,7 +125,7 @@ Pour ajouter un nouvel annuaire :
 Le tableau ci-dessous résume les différents paramètres à insérer pour ajouter un serveur LDAP :
 
 +-------------------------+------------------------------------------------------------------------------------------------------------+
-|   Colonne               |  Description                                                                                               | 
+|   Colonne               |  Description                                                                                               |
 +=========================+============================================================================================================+
 | Adresse du serveur      | Contient l'adresse IP ou nom DNS du serveur LDAP                                                           |
 +-------------------------+------------------------------------------------------------------------------------------------------------+
@@ -144,7 +144,7 @@ Le tableau ci-dessous résume les différents paramètres à insérer pour ajout
     Avant tout import, vérifiez les paramètres par défaut proposés. Si vous n'avez sélectionné aucun modèle, vous devez définir manuellement les filtres de recherches en complétant les champs.
 
 
-Sous centos 6, on peut définir de ne pas vérifier le certificat serveur avec la procédure suivante:
+Sous CentOS 7, on peut définir de ne pas vérifier le certificat serveur avec la procédure suivante:
 
 Ajouter la ligne suivante dans le fichier "/etc/openldap/ldap.conf":
 
@@ -152,11 +152,11 @@ Ajouter la ligne suivante dans le fichier "/etc/openldap/ldap.conf":
 
   TLS_REQCERT never
 
-Puis redémarrez le serveur Apache : 
+Puis redémarrez le serveur Apache :
 
 ::
 
- /etcInit.d/httpd restart
+  service httpd restart
 
 
 *******
diff --git a/doc/fr/installation/from_packages.rst b/doc/fr/installation/from_packages.rst
index 3a0f7b9467..f6f87954ce 100644
--- a/doc/fr/installation/from_packages.rst
+++ b/doc/fr/installation/from_packages.rst
@@ -31,14 +31,6 @@ Afin d'installer les logiciels Centreon à partir des dépôts, vous devez au pr
 le fichier lié au dépôt. Exécutez la commande suivante à partir d'un utilisateur possédant les
 droits suffisants.
 
-Pour CentOS 6.
-
-::
-
-   $ wget http://yum.centreon.com/standard/3.4/el6/stable/noarch/RPMS/centreon-release-3.4-4.el6.noarch.rpm
-   $ yum install --nogpgcheck centreon-release-3.4-4.el6.noarch.rpm
-
-
 Pour CentOS 7.
 
 ::
@@ -146,7 +138,7 @@ Changer cette option dans /etc/my.cnf NE fonctionnera PAS.
    # echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mariadb.service.d/limits.conf
    # systemctl daemon-reload
    # service mysqld restart
-   
+
 Lancer les services au démarrage
 --------------------------------
 
@@ -165,7 +157,7 @@ Lancer les commandes suivantes sur le serveur Central.
     # systemctl enable httpd.service
     # systemctl enable snmpd.service
     # systemctl enable mysql.service
-    
+
 .. note::
     Si la base de données MySQL est sur un serveur dédié, lancer la commande d'activation mysql sur ce dernier.
 
diff --git a/doc/fr/installation/from_sources.rst b/doc/fr/installation/from_sources.rst
index b2f4632a2b..aaa3a79a10 100644
--- a/doc/fr/installation/from_sources.rst
+++ b/doc/fr/installation/from_sources.rst
@@ -18,13 +18,6 @@ Les environnements CentOS et RHEL ne possèdent pas en standard sur
 dépôts l'intégralité des dépendances nécessaires à l'installation
 de Centreon. Vous devez ajouter le dépôt *RPM Forge*
 
-Système el6 :
-
-  ::
-
-    $ wget http://repository.it4i.cz/mirrors/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
-    $ wget https://repository.it4i.cz/mirrors/repoforge/RPM-GPG-KEY.dag.txt
-
 Système el7 :
 
  ::
@@ -46,7 +39,7 @@ Puis exécutez les commandes suivantes :
   ::
 
     $ rpm --import RPM-GPG-KEY.dag.txt
-    $ rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm (vous pouvez adapter la commande pour les systèmes el7)
+    $ rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
 
 Vous pouvez maintenant installer les dépendances nécessaires :
 
diff --git a/doc/fr/upgrade/from_packages.rst b/doc/fr/upgrade/from_packages.rst
index 97337132d5..16812dddc0 100644
--- a/doc/fr/upgrade/from_packages.rst
+++ b/doc/fr/upgrade/from_packages.rst
@@ -5,7 +5,7 @@ Mise à jour RPM
 ===============
 
 La version 3.4 de Centreon ISO est l'ensemble Centreon Web 2.8, Centreon Engine 1.8, Centreon Broker 3.0.
-Deux versions de Centreon 3.4 sont disponibles, en fonction du système d'exploitation d'origine : CentOS 6 ou CentOS 7.
+Centreon est seulement supporté sur CentOS 7.
 
 .. warning::
    Avant d'installer la mise à jour, vérifiez que votre plateforme n'utilise
@@ -66,7 +66,7 @@ Avant toute chose, il est préfèrable de s'assurer de l'état et de la consista
  * Serveur(s) Centreon central(aux) ;
  * Serveur(s) de gestion de base de données ;
  * Serveur déporté de reporting Centreon MBI ;
- 
+
 
 **************
 Dépôt Centreon
@@ -77,16 +77,6 @@ fichier .repo pour utiliser les logiciels faisant partie de Centreon 3.4
 (essentiellement Centreon Web 2.8 et les composants associés). Entrez
 les commandes suivantes en fonction de votre système d'exploitation.
 
-CentOS 6
-========
-
-::
-
-   $ rm -f /etc/yum.repos.d/ces-standard.repo /etc/yum.repos.d/centreon-stable.repo
-   $ wget http://yum.centreon.com/standard/3.4/el6/stable/noarch/RPMS/centreon-release-3.4-4.el6.noarch.rpm
-   $ yum install --nogpgcheck centreon-release-3.4-4.el6.noarch.rpm
-
-
 CentOS 7
 ========
 
@@ -145,7 +135,7 @@ Suite à l’installation de PHP-intl, il est nécessaire de redémarrer le serv
    ::
 
    # service httpd restart
-   
+
 4. Mise à jour des poller
 =========================
 
@@ -153,7 +143,7 @@ Executer la même procedure sur vos différent poller :
 
  * Changement des repo
  * Mise à jour des paquets
- 
+
 .. warning::
    Il est impératif que tout vos serveurs (Central et Poller) soient dans les mêmes versions Centreon Engine 1.7, Centreon Broker 3.0
 
@@ -232,7 +222,7 @@ de EMS/EPP.
    Dans ce cas merci de vous rapprocher de votre support afin qu'ils vous fournissent les liens nécessaires à l'installation des nouveaux repo.
    Il est impératif d'avoir la dernière version de Centreon BAM pour que la mise à jour fonctionne correctement. L'utilisation de l'option suivante est à proscrire :
    # --skip-broken
-   
+
 Mise à jour du dépôt
 ====================
 
diff --git a/www/install/steps/process/installConfigurationDb.php b/www/install/steps/process/installConfigurationDb.php
index c8a02339b7..7c18376a79 100644
--- a/www/install/steps/process/installConfigurationDb.php
+++ b/www/install/steps/process/installConfigurationDb.php
@@ -73,10 +73,10 @@ if (is_null($open_files_limit)) {
     $open_files_limit = 0;
 }
 if ($open_files_limit < 32000) {
-    $return['msg'] = 'If your operating system is based on SystemV (CentOS 6), ' .
-        'add open_files_limit=32000 in my.cnf file under the [mysqld] section and restart MySQL Server.<br/>' .
-        'If your operating system is based on systemd (CentOS 7, Debian Jessie), add LimitNOFILE=32000 value on the ' .
-        'service file /etc/systemd/system/mariadb.service and reload systemd (systemctl daemon-reload).';
+    $return['msg'] = 'If your operating system is based on systemd (CentOS 7, Debian Jessie), add LimitNOFILE=32000 value on the ' .
+        'service file /etc/systemd/system/mariadb.service and reload systemd (systemctl daemon-reload).<br/>' .
+        'If your operating system is based on SystemV, ' .
+        'add open_files_limit=32000 in my.cnf file under the [mysqld] section and restart MySQL Server.';
     echo json_encode($return);
     exit;
 }
-- 
GitLab