Ceci est une ancienne révision du document !
Table des matières
Version : 2020.01
Dernière mise-à-jour : 2020/09/15 17:20
BD100 - Hortonworks Data Platform Administration - Mise en Place de l'Infrastructure
Contenu du Module
BGF100 - Hortonworks Data Platform Administration - Mise en Place de l'Infrastructure
- Contenu du Module
- Pré-requis
- Matériel
- Logiciels
- Internet
- Mise en Place de l'Infrastructure
- Connexion au Serveur Cloud
- Linux, MacOS et Windows 10 muni du client ssh
- Windows 7 et Windows 10 sans client ssh
- Configuration de Votre Serveur
- Téléchargement de la VM de base
- Importer la VM CentOS_7_8.ova
- Configurer le transfert de port pour la VM sur nic1
- Créer le Réseau Privé Hôte 192.168.56.0/24
- Configurer nic2 en Réseau Privé Hôte
- Augmenter le nombre de vcpus sur la VM
- Augmenter la RAM de la VM
- Désactiver EHCI sur la VM
- Démarrer la VM
- Editer le fichier /etc/hosts
- Se connecter à la VM
- Devenir root
- Editer le fichier /etc/hosts
- Augmenter le nombre de fichiers qui peuvent être ouverts en même temps
- Désactiver et arrêter le pare-feu
- Désactiver SELinux
- Changer la valeur de VM Swappiness à 10
- Installer NTP puis Activer et démarrer le serveur NTP
- Désactiver Transparent Huge Page
- Configurer le réseau
- Arreter la VM
- Supprimer la redirection de port de la VM
- Se placer dans le répertoire /home/desktop/VirtualBox\ VMs/
- Cloner 6 fois la VM CentOS_7_8
- Déplacer les VMs dans /home/desktop/Downloads
- Importer les VMs
- Modifier les noms de clones
- Configurer la redirection de ports sur chaque VM
- Configurer la VM master1
- Configurer la VM master2
- Configurer la VM master3
- Configurer la VM worker1
- Configurer la VM worker2
- Configurer la VM worker3
- Prendre des Snapshots
- Démarrer les Machines Virtuelles
- Se Connecter aux Machines Virtuelles
- Se connecter en mode graphique au serverXX.ittraining.network
- Utiliser la console Ambari
- Get Started
- Install Options
- Confirm Hosts
- Choose Services
- Assign Masters
- Assign Slaves and Clients
- Customize Services
- Review
- Install, Start and Test
Prérequis
Matériel
- Un poste (MacOS, Linux, Windows™ ou Solaris™),
- Clavier AZERTY FR ou QWERTY US,
- 4 Go de RAM minimum,
- Processeur 2 cœurs minimum,
- Un casque ou des écouteurs,
- Un micro (optionnel).
Logiciels
- Si Windows™ - Putty et WinSCP,
- Navigateur Web Chrome ou Firefox.
Internet
- Un accès à Internet rapide (4G minimum) sans passer par un proxy,
- Accès débloqué aux domaines suivants : https://my-short.link, https://itraining.center, https://ittraining.io, https://ittraining.institute, https://ittraining.support.
Mise en Place de l'Infrastructure
Connexion au Serveur Cloud
Pendant la durée de la formation, vous disposez d'un serveur dédié XEON-SATA-2-64 Server - 8c/16t - Intel Xeon D-1540 - 64GB DDR4 ECC 2133MHz - 4x 2To HDD SATA Soft RAID, pré-installé, pré-configuré et hébergé dans le cloud. Ce serveur est muni de VirtualBox.
Vous allez commencer par créer six machines virtuelles CentOS 7 et les configurer selon le tableau ci-dessous :
Machine Virtuelle | Nom d'hôte | Interface 1 | Interface 2 |
---|---|---|---|
master1 | master1.ittraining.loc | 10.0.2.15 | 192.168.56.2 |
master2 | master2.ittraining.loc | 10.0.2.15 | 192.168.56.3 |
master3 | master3.ittraining.loc | 10.0.2.15 | 192.168.56.4 |
worker1 | worker1.ittraining.loc | 10.0.2.15 | 192.168.56.5 |
worker2 | worker2.ittraining.loc | 10.0.2.15 | 192.168.56.6 |
worker3 | worker3.ittraining.loc | 10.0.2.15 | 192.168.56.7 |
Les noms d'utilisateurs et les mots de passe seront :
Utilisateur | Mot de Passe |
---|---|
trainee | trainee |
root | fenestros |
Linux, MacOS et Windows 10 muni du client ssh
Ouvrez un terminal ou CMD et tapez la commande suivante :
$ ssh -l desktop serverXX.ittraining.network
> ssh -l desktop serverXX.ittraining.network
où XX représente le numéro de votre serveur dédié. Entrez ensuite le mot de passe qui vous a été fourni.
Windows 7 et Windows 10 sans client ssh
Ouvrez putty et utilisez les informations suivantes pour vous connecter à votre serveur dédié :
- Host Name –> serverXX.ittraining.network
- Port –> 22
Au prompt, connectez-vous en tant que desktop avec le mot de passe qui vous a été fourni.
Configuration de Votre Serveur
Téléchargement de la VM de base
Téléchargez la VM CentOS_7_8.ova :
desktop@serverXX:~$ cd Downloads desktop@serverXX:~/Downloads$ scp desktop@server40.ittraining.network:/home/desktop/Downloads/CentOS_7_8.ova .
Le mot de passe est Tk9ARhq48RQN
Importer la VM CentOS_7_8.ova
desktop@serverXX:~/Downloads$ VBoxManage import CentOS_7_8.ova --vsys 0 --eula accept desktop@serverXX:~/Downloads$ cd ~
Configurer le transfert de port pour la VM sur nic1
desktop@serverXX:~$ VBoxManage modifyvm "CentOS_7_8" --natpf1 "centos_7_8,tcp,,3022,,22"
Créer le Réseau Privé Hôte 192.168.56.0/24
Créez le Réseau Privé Hôte 192.168.56.0/24 qui permettra la communication entre les machines virtuelles :
desktop@serverXX:~$ VBoxManage hostonlyif create 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interface 'vboxnet0' was successfully created
Configurer nic2 en Réseau Privé Hôte
desktop@serverXX:~$ VBoxManage modifyvm CentOS_7_8 --nic2 hostonly --hostonlyadapter2 vboxnet0
Augmenter le nombre de vcpus sur la VM
desktop@serverXX:~$ VBoxManage modifyvm CentOS_7_8 --cpus 2
Augmenter la RAM de la VM
desktop@serverXX:~$ VBoxManage modifyvm CentOS_7_8 --memory 8192
Désactiver EHCI sur la VM
desktop@serverXX:~$ VBoxManage modifyvm CentOS_7_8 --usbehci off
Démarrer la VM
desktop@serverXX:~$ VBoxManage startvm CentOS_7_8 --type headless
Editer le fichier /etc/hosts
desktop@serverXX:~$ sudo su - [sudo] password for desktop: root@serverXX:~# vi /etc/hosts root@serverXX:~# cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 serverXX.ittraining.network serverXX # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters XXX.XXX.XXX.XXX serverXX.ittraining.network serverXX 192.168.56.2 master1.ittraining.loc master1 192.168.56.3 master2.ittraining.loc master2 192.168.56.4 master3.ittraining.loc master3 192.168.56.5 worker1.ittraining.loc worker1 192.168.56.6 worker2.ittraining.loc worker2 192.168.56.7 worker3.ittraining.loc worker3 root@serverXX:~# exit logout
Se connecter à la VM
desktop@serverXX:~$ ssh -l trainee localhost -p 3022 The authenticity of host '[localhost]:3022 ([127.0.0.1]:3022)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[localhost]:3022' (ECDSA) to the list of known hosts. trainee@localhost's password: trainee [trainee@centos7 ~]$
Devenir root
[trainee@centos7 ~]$ su - Password: fenestros Last login: Wed Sep 9 17:36:25 CEST 2020 on tty1
Editer le fichier /etc/hosts
[root@centos7 ~]# vi /etc/hosts [root@centos7 ~]# cat /etc/hosts 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.56.2 master1.ittraining.loc master1 192.168.56.3 master2.ittraining.loc master2 192.168.56.4 master3.ittraining.loc master3 192.168.56.5 worker1.ittraining.loc worker1 192.168.56.6 worker2.ittraining.loc worker2 192.168.56.7 worker3.ittraining.loc worker3
Augmenter le nombre de fichiers qui peuvent être ouverts en même temps
[root@centos7 ~]# ulimit -n 10000
Désactiver et arrêter le pare-feu
[root@centos7 ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service. [root@centos7 ~]# systemctl stop firewalld
Désactiver SELinux
[root@centos7 ~]# setenforce 0 [root@centos7 ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Changer la valeur de VM Swappiness à 10
[root@centos7 ~]# echo "vm.swappiness = 10" >> /etc/sysctl.conf
Installer NTP puis Activer et démarrer le serveur NTP
[root@centos7 ~]# yum clean all [root@centos7 ~]# yum makecache [root@centos7 ~]# yum -y install ntp [root@centos7 ~]# systemctl enable ntpd Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service. [root@centos7 ~]# systemctl start ntpd
Désactiver Transparent Huge Page
[root@centos7 ~]# echo "echo \"never\" > /sys/kernel/mm/transparent_hugepage/enabled " >> /etc/rc.local [root@centos7 ~]# echo "echo \"never\" > /sys/kernel/mm/transparent_hugepage/defrag" >> /etc/rc.local
Configurer le réseau
Configurez enp0s8 en IP fixe :
[root@centos7 ~]# nmcli connection add con-name ip_enp0s8 ifname enp0s8 type ethernet ip4 192.168.56.2/24 gw4 10.0.2.2 Connection 'ip_fixe' (0e8456ba-23c9-4fb4-a6fd-58d2f7af5048) successfully added. [root@centos7 ~]# nmcli connection up ip_enp0s8
Fermez le terminal. Ouvrez un nouveau terminal et connectez-vous à votre serveur :
$ ssh desktop@serverXX.ittraining.network desktop@serverX.ittraining.network's password:
Reconnectez-vous à la VM en utilisant l'adresse 192.168.56.2 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.2 The authenticity of host '192.168.56.2 (192.168.56.2)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.56.2' (ECDSA) to the list of known hosts. trainee@192.168.56.2's password: trainee Last login: Tue Sep 15 06:49:40 2020 from gateway [trainee@centos7 ~]$
Configurez enp0s3 en IP fixe :
[trainee@centos7 ~]$ su - Password: fenestros Last login: Sat Sep 12 09:18:12 CEST 2020 on pts/0 [root@centos7 ~]# nmcli connection add con-name ip_enp0s3 ifname enp0s3 type ethernet ip4 10.0.2.15/24 gw4 10.0.2.2 Connection 'ip_enp0s3' (e709246c-417a-4be1-8194-64824d6e7d09) successfully added. [root@centos7 ~]# nmcli connection mod ip_enp0s3 ipv4.dns 8.8.8.8 [root@centos7 ~]# nmcli connection up ip_enp0s3 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4)
Arreter la VM
[root@centos7 ~]# exit logout [trainee@centos7 ~]$ exit logout Connection to localhost closed. desktop@serverXX:~$ VBoxManage controlvm CentOS_7_8 poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Supprimer la redirection de port de la VM
desktop@serverXX:~$ VBoxManage modifyvm CentOS_7_8 --natpf1 delete centos_7_8
Se placer dans le répertoire /home/desktop/VirtualBox\ VMs/
desktop@serverXX:~$ cd /home/desktop/VirtualBox\ VMs/
Cloner 6 fois la VM CentOS_7_8
desktop@serverXX:~/VirtualBox VMs$ VBoxManage export CentOS_7_8 --output master1.ova desktop@serverXX:~/VirtualBox VMs$ VBoxManage export CentOS_7_8 --output master2.ova desktop@serverXX:~/VirtualBox VMs$ VBoxManage export CentOS_7_8 --output master3.ova desktop@serverXX:~/VirtualBox VMs$ VBoxManage export CentOS_7_8 --output worker1.ova desktop@serverXX:~/VirtualBox VMs$ VBoxManage export CentOS_7_8 --output worker2.ova desktop@serverXX:~/VirtualBox VMs$ VBoxManage export CentOS_7_8 --output worker3.ova
Déplacer les VMs dans /home/desktop/Downloads
desktop@serverXX:~/VirtualBox VMs$ mv *.ova ../Downloads/ desktop@serverXX:~/VirtualBox VMs$ cd ../Downloads
Importer les VMs
desktop@serverXX:~/Downloads$ VBoxManage import master1.ova --vsys 0 --eula accept desktop@serverXX:~/Downloads$ VBoxManage import master2.ova --vsys 0 --eula accept desktop@serverXX:~/Downloads$ VBoxManage import master3.ova --vsys 0 --eula accept desktop@serverXX:~/Downloads$ VBoxManage import worker1.ova --vsys 0 --eula accept desktop@serverXX:~/Downloads$ VBoxManage import worker2.ova --vsys 0 --eula accept desktop@serverXX:~/Downloads$ VBoxManage import worker3.ova --vsys 0 --eula accept
Modifier les noms de clones
desktop@serverXX:~/Downloads$ VBoxManage modifyvm "CentOS_7_8 1" --name master1 desktop@serverXX:~/Downloads$ VBoxManage modifyvm "CentOS_7_8 2" --name master2 desktop@serverXX:~/Downloads$ VBoxManage modifyvm "CentOS_7_8 3" --name master3 desktop@serverXX:~/Downloads$ VBoxManage modifyvm "CentOS_7_8 4" --name worker1 desktop@serverXX:~/Downloads$ VBoxManage modifyvm "CentOS_7_8 5" --name worker2 desktop@serverXX:~/Downloads$ VBoxManage modifyvm "CentOS_7_8 6" --name worker3
Configurer la redirection de ports sur chaque VM
desktop@serverXX:~/Downloads$ VBoxManage modifyvm "master1" --natpf1 "master1,tcp,,2222,,22" desktop@serverXX:~/Downloads$ VBoxManage modifyvm "master2" --natpf1 "master2,tcp,,2322,,22" desktop@serverXX:~/Downloads$ VBoxManage modifyvm "master3" --natpf1 "master3,tcp,,2422,,22" desktop@serverXX:~/Downloads$ VBoxManage modifyvm "worker1" --natpf1 "worker1,tcp,,2522,,22" desktop@serverXX:~/Downloads$ VBoxManage modifyvm "worker2" --natpf1 "worker2,tcp,,2622,,22" desktop@serverXX:~/Downloads$ VBoxManage modifyvm "worker3" --natpf1 "worker3,tcp,,2722,,22"
Configurer la VM master1
Ouvrez un autre terminal et connectez-vous au serverXX.ittraining.network :
$ ssh desktop@serverXX.ittraining.network desktop@serverXX.ittraining.network's password:
Démarrer la VM master1 :
desktop@serverXX:~$ VBoxManage startvm master1 --type headless
Connectez-vous à la VM master1 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.2 trainee@192.168.56.2's password: Last login: Tue Sep 15 06:53:32 2020 from 192.168.56.1
Changer le hostname de la machine :
[root@centos7 ~]# su - Password: fenestros [root@centos7 ~]# nmcli general hostname master1.ittraining.loc [root@centos7 ~]# exit logout [trainee@centos7 ~]$ exit logout Connection to localhost closed.
Connectez-vous à la VM master1 :
desktop@serverXX:~$ ssh -l trainee master1.ittraining.loc The authenticity of host 'master1.ittraining.loc (192.168.56.2)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'master1.ittraining.loc' (ECDSA) to the list of known hosts. trainee@master1.ittraining.loc's password: trainee Last login: Tue Sep 15 07:47:21 2020 from 192.168.56.1 [trainee@master1 ~]$
Devenez root :
[trainee@master1 ~]$ su - Password: fenestros Last login: Thu Sep 10 08:20:53 CEST 2020 on tty1
Editer /etc/sysconfig/network :
[root@master1 ~]# vi /etc/sysconfig/network [root@master1 ~]# cat /etc/sysconfig/network # Created by anaconda NETWORKING=yes HOSTNAME=master1.ittraining.loc
Installez, activez et démarrez le serveur Apache :
[root@master1 ~]# yum clean all [root@master1 ~]# yum -y install httpd wget [root@master1 ~]# systemctl enable httpd Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. [root@master1 ~]# systemctl start httpd
Téléchargez Ambari, HDP, HDP-UTILS et HDP-GPL :
[root@master1 ~]# wget https://www.dropbox.com/s/ze6iv91jnkti0o6/ambari-2.7.4.0-centos7.tar.gz [root@master1 ~]# wget https://www.dropbox.com/s/a64kmict0ptmjd3/HDP-3.1.4.0-centos7-rpm.tar.gz [root@master1 ~]# wget https://www.dropbox.com/s/v1c3mhigwalv54c/HDP-UTILS-1.1.0.22-centos7.tar.gz [root@master1 ~]# wget https://www.dropbox.com/s/u5pisvh3va4l9ms/HDP-GPL-3.1.4.0-centos7-gpl.tar.gz
Installez les dépôts locaux des RPM :
[root@master1 ~]# tar zxvf ambari-2.7.4.0-centos7.tar.gz -C /var/www/html [root@master1 ~]# tar zxvf HDP-3.1.4.0-centos7-rpm.tar.gz -C /var/www/html [root@master1 ~]# tar zxvf HDP-UTILS-1.1.0.22-centos7.tar.gz -C /var/www/html [root@master1 ~]# tar zxvf HDP-GPL-3.1.4.0-centos7-gpl.tar.gz -C /var/www/html
Créez le fichier repositories :
[root@master1 ~]# vi repositories [root@master1 ~]# cat repositories http://master1.ittraining.loc/HDP/centos7/3.1.4.0-315/ http://master1.ittraining.loc/HDP-GPL/centos7/3.1.4.0-315/ http://master1.ittraining.loc/HDP-UTILS/centos7/1.1.0.22/ http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118 <--------------PAS de / à la fin
Créez le repository ambari dans yum :
[root@master1 ~]# vi /etc/yum.repos.d/ambari.repo [root@master1 ~]# cat /etc/yum.repos.d/ambari.repo [ambari] name = Ambari Repo baseurl = http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118 gpgcheck = 0
Mettez à jour la base de données des dépôts dans yum :
[root@master1 ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: ambari base extras updates Cleaning up list of fastest mirrors [root@master1 ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors * base: mirrors.ircam.fr * extras: centos.mirrors.proxad.net * updates: mirrors.ircam.fr ambari | 2.9 kB 00:00:00 base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/13): ambari/filelists_db | 104 kB 00:00:00 (2/13): ambari/other_db | 1.4 kB 00:00:00 (3/13): ambari/primary_db | 25 kB 00:00:00 (4/13): base/7/x86_64/group_gz | 153 kB 00:00:00 (5/13): base/7/x86_64/filelists_db | 7.1 MB 00:00:00 (6/13): base/7/x86_64/other_db | 2.6 MB 00:00:00 (7/13): extras/7/x86_64/filelists_db | 217 kB 00:00:00 (8/13): extras/7/x86_64/other_db | 124 kB 00:00:00 (9/13): updates/7/x86_64/filelists_db | 2.4 MB 00:00:00 (10/13): updates/7/x86_64/primary_db | 4.5 MB 00:00:00 (11/13): base/7/x86_64/primary_db | 6.1 MB 00:00:02 (12/13): updates/7/x86_64/other_db | 316 kB 00:00:01 (13/13): extras/7/x86_64/primary_db | 206 kB 00:00:03 Metadata Cache Created
Installez ambari server et agent :
[root@master1 ~]# yum -y install ambari-server ambari-agent
Configurez le serveur ambari :
[root@master1 ~]# ambari-server setup Using python /usr/bin/python Setup ambari-server Checking SELinux... SELinux status is 'disabled' Customize user account for ambari-server daemon [y/n] (n)? Adjusting ambari-server permissions and ownership... Checking firewall status... Checking JDK... [1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8 [2] Custom JDK ============================================================================== Enter choice (1): To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually. Do you accept the Oracle Binary Code License Agreement [y/n] (y)? y Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz jdk-8u112-linux-x64.tar.gz... 100% (174.7 MB of 174.7 MB) Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz Installing JDK to /usr/jdk64/ Successfully installed JDK to /usr/jdk64/ Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jce_policy-8.zip Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip Installing JCE policy... Check JDK version for Ambari Server... JDK version found: 8 Minimum JDK version is 8 for Ambari. Skipping to setup different JDK for Ambari Server. Checking GPL software agreement... GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? y Completing setup... Configuring database... Enter advanced database configuration [y/n] (n)? n Configuring database... Default properties detected. Using built-in database. Configuring ambari database... Checking PostgreSQL... Running initdb: This may take up to a minute. Initializing database ... OK About to start PostgreSQL Configuring local database... Configuring PostgreSQL... Restarting PostgreSQL Creating schema and user... done. Creating tables... done. Extracting system views... ambari-admin-2.7.4.0.118.jar .... Ambari repo file doesn't contain latest json url, skipping repoinfos modification Adjusting ambari-server permissions and ownership... Ambari Server 'setup' completed successfully.
Démarrez le serveur ambari :
[root@master1 ~]# ambari-server start ... [root@master1 ~]# ambari-server status Using python /usr/bin/python Ambari-server status Ambari Server running Found Ambari Server PID: 1494 at: /var/run/ambari-server/ambari-server.pid
Modifiez le fichier /etc/ambari-agent/conf/ambari-agent.ini :
[root@master1 ~]# vi /etc/ambari-agent/conf/ambari-agent.ini [root@master1 ~]# cat /etc/ambari-agent/conf/ambari-agent.ini # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific [server] hostname=master1.ittraining.loc <-----------------------modifier de localhost à master1.ittraining.loc url_port=8440 secured_url_port=8441 connect_retry_delay=10 max_reconnect_retry_delay=30
Démarrez le service ambari-agent :
[root@master1 ~]# ambari-agent start Verifying Python version compatibility... Using python /usr/bin/python Checking for previously running Ambari Agent... Checking ambari-common dir... Starting ambari-agent Verifying ambari-agent process status... Ambari Agent successfully started Agent PID at: /run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log
Arrêtez la VM master1 :
[root@master1 ~]# shutdown -h now Connection to 192.168.56.2 closed by remote host. Connection to 192.168.56.2 closed.
Configurer la VM master2
Démarrer la VM master2 :
desktop@serverXX:~$ VBoxManage startvm master2 --type headless
Connectez-vous à la VM master2 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.2 trainee@192.168.56.2's password: trainee Last login: Sat Sep 12 09:36:26 2020 from 192.168.56.1
Changer le hostname de la machine et modifiez l'adresse IP fixe de l'interface enp0s8 :
[trainee@centos7 ~]$ su - Password: fenestros Last login: Thu Sep 10 16:53:17 CEST 2020 on pts/0 [root@centos7 ~]# nmcli general hostname master2.ittraining.loc [root@centos7 ~]# nmcli con mod ip_enp0s8 ipv4.addresses 192.168.56.3/24
Editer /etc/sysconfig/network :
[root@centos7 ~]# vi /etc/sysconfig/network [root@centos7 ~]# cat /etc/sysconfig/network # Created by anaconda NETWORKING=yes HOSTNAME=master2.ittraining.loc
Activez l'adresse IP 192.168.56.3 :
[root@centos7 ~]# nmcli connection up ip_enp0s8
Fermez le terminal courant et ouvrez un autre terminal. Connectez-vous au serverXX :
$ ssh desktop@serverXX.ittraining.network desktop@serverXX.ittraining.network's password:
Démarrez la VM master1 :
desktop@serverXX:~$ VBoxManage startvm master1 --type headless
Connectez-vous à la VM master2 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.3 The authenticity of host '192.168.56.3 (192.168.56.3)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.56.3' (ECDSA) to the list of known hosts. trainee@192.168.56.3's password: Last login: Tue Sep 15 08:35:43 2020 from 192.168.56.1 [trainee@master2 ~]$
Créez le repository ambari dans yum :
[trainee@master2 ~]$ su - Password: fenestros Last login: Tue Sep 15 08:36:04 CEST 2020 on pts/0 [root@master2 ~]# vi /etc/yum.repos.d/ambari.repo [root@master2 ~]# cat /etc/yum.repos.d/ambari.repo [ambari] name = Ambari Repo baseurl = http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118 gpgcheck = 0
Mettez à jour la base de données des dépôts dans yum :
[root@master2 ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: ambari base extras updates Cleaning up list of fastest mirrors [root@master2 ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors * base: mirroir.wptheme.fr * extras: ftp.rezopole.net * updates: mirroir.wptheme.fr ambari | 2.9 kB 00:00:00 base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/13): ambari/filelists_db | 104 kB 00:00:00 (2/13): ambari/primary_db | 25 kB 00:00:00 (3/13): ambari/other_db | 1.4 kB 00:00:00 (4/13): base/7/x86_64/group_gz | 153 kB 00:00:00 (5/13): base/7/x86_64/filelists_db | 7.1 MB 00:00:01 (6/13): extras/7/x86_64/filelists_db | 217 kB 00:00:00 (7/13): extras/7/x86_64/primary_db | 206 kB 00:00:00 (8/13): extras/7/x86_64/other_db | 124 kB 00:00:00 (9/13): updates/7/x86_64/other_db | 316 kB 00:00:00 (10/13): base/7/x86_64/other_db | 2.6 MB 00:00:01 (11/13): updates/7/x86_64/filelists_db | 2.4 MB 00:00:01 (12/13): base/7/x86_64/primary_db | 6.1 MB 00:00:03 (13/13): updates/7/x86_64/primary_db | 4.5 MB 00:00:07 Metadata Cache Created
Installez ambari agent :
[root@master2 ~]# yum -y install ambari-agent
Modifiez le fichier /etc/ambari-agent/conf/ambari-agent.ini :
[root@master2 ~]# vi /etc/ambari-agent/conf/ambari-agent.ini ... [server] hostname=master1.ittraining.loc <-----------------------modifier de localhost à master1.ittraining.loc ...
Démarrez le service ambari-agent :
[root@master2 ~]# ambari-agent start Verifying Python version compatibility... Using python /usr/bin/python Checking for previously running Ambari Agent... Checking ambari-common dir... Starting ambari-agent Verifying ambari-agent process status... Ambari Agent successfully started Agent PID at: /run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log
Arrêtez la VM master2 :
[root@master2 ~]# shutdown -h now Connection to 192.168.56.3 closed by remote host. Connection to 192.168.56.3 closed.
Arrêtez la VM master1 :
desktop@serverXX:~$ VBoxManage controlvm master1 poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Configurer la VM master3
Démarrer la VM master3 :
desktop@serverXX:~$ VBoxManage startvm master3 --type headless
Connectez-vous à la VM master3 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.2 trainee@192.168.56.2's password: fenestros Last login: Tue Sep 15 06:53:32 2020 from 192.168.56.1
Changer le hostname de la machine et modifiez l'adresse IP fixe de l'interface enp0s8 :
[trainee@centos7 ~]$ su - Password: fenestros Last login: Thu Sep 10 16:53:17 CEST 2020 on pts/0 [root@centos7 ~]# nmcli general hostname master3.ittraining.loc [root@centos7 ~]# nmcli con mod ip_enp0s8 ipv4.addresses 192.168.56.4/24
Editer /etc/sysconfig/network :
[root@centos7 ~]# vi /etc/sysconfig/network [root@centos7 ~]# cat /etc/sysconfig/network # Created by anaconda NETWORKING=yes HOSTNAME=master3.ittraining.loc
Activez l'adresse IP 192.168.56.4 :
[root@centos7 ~]# nmcli connection up ip_enp0s8
Fermez le terminal courant et ouvrez un autre terminal. Connectez-vous au serverXX :
$ ssh desktop@serverXX.ittraining.network desktop@serverXX.ittraining.network's password:
Démarrez la VM master1 :
desktop@serverXX:~$ VBoxManage startvm master1 --type headless
Connectez-vous à la VM master3 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.4 The authenticity of host '192.168.56.4 (192.168.56.4)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.56.4' (ECDSA) to the list of known hosts. trainee@192.168.56.4's password: trainee Last login: Tue Sep 15 09:20:09 2020 from 192.168.56.1 [trainee@master3 ~]$
Créez le repository ambari dans yum :
[trainee@master3 ~]$ su - Password: fenestros Last login: Tue Sep 15 09:20:43 CEST 2020 on pts/0 [root@master3 ~]# vi /etc/yum.repos.d/ambari.repo [root@master3 ~]# cat /etc/yum.repos.d/ambari.repo [ambari] name = Ambari Repo baseurl = http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118 gpgcheck = 0
Mettez à jour la base de données des dépôts dans yum :
[root@master3 ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: ambari base extras updates Cleaning up list of fastest mirrors [root@master3 ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors * base: mirroir.wptheme.fr * extras: ftp.rezopole.net * updates: mirroir.wptheme.fr ambari | 2.9 kB 00:00:00 base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/13): ambari/filelists_db | 104 kB 00:00:00 (2/13): ambari/primary_db | 25 kB 00:00:00 (3/13): ambari/other_db | 1.4 kB 00:00:00 (4/13): base/7/x86_64/group_gz | 153 kB 00:00:00 (5/13): base/7/x86_64/filelists_db | 7.1 MB 00:00:01 (6/13): extras/7/x86_64/filelists_db | 217 kB 00:00:00 (7/13): extras/7/x86_64/primary_db | 206 kB 00:00:00 (8/13): extras/7/x86_64/other_db | 124 kB 00:00:00 (9/13): updates/7/x86_64/other_db | 316 kB 00:00:00 (10/13): base/7/x86_64/other_db | 2.6 MB 00:00:01 (11/13): updates/7/x86_64/filelists_db | 2.4 MB 00:00:01 (12/13): base/7/x86_64/primary_db | 6.1 MB 00:00:03 (13/13): updates/7/x86_64/primary_db | 4.5 MB 00:00:07 Metadata Cache Created
Installez ambari agent :
[root@master3 ~]# yum -y install ambari-agent
Modifiez le fichier /etc/ambari-agent/conf/ambari-agent.ini :
[root@master3 ~]# vi /etc/ambari-agent/conf/ambari-agent.ini ... [server] hostname=master1.ittraining.loc <-----------------------modifier de localhost à master1.ittraining.loc ...
Démarrez le service ambari-agent :
[root@master3 ~]# ambari-agent start Verifying Python version compatibility... Using python /usr/bin/python Checking for previously running Ambari Agent... Checking ambari-common dir... Starting ambari-agent Verifying ambari-agent process status... Ambari Agent successfully started Agent PID at: /run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log
Arrêtez la VM master3 :
[root@master3 ~]# shutdown -h now Connection to 192.168.56.4 closed by remote host. Connection to 192.168.56.4 closed.
Arrêtez la VM master1 :
desktop@serverXX:~$ VBoxManage controlvm master1 poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Configurer la VM worker1
Démarrer la VM worker1 :
desktop@serverXX:~$ VBoxManage startvm worker1 --type headless
Connectez-vous à la VM worker1 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.2 trainee@192.168.56.2's password: trainee Last login: Tue Sep 15 06:53:32 2020 from 192.168.56.1
Changer le hostname de la machine et modifiez l'adresse IP fixe de l'interface enp0s8 :
[trainee@centos7 ~]$ su - Password: fenestros Last login: Thu Sep 10 16:53:17 CEST 2020 on pts/0 [root@centos7 ~]# nmcli general hostname worker1.ittraining.loc [root@centos7 ~]# nmcli con mod ip_enp0s8 ipv4.addresses 192.168.56.5/24
Editer /etc/sysconfig/network :
[root@centos7 ~]# vi /etc/sysconfig/network [root@centos7 ~]# cat /etc/sysconfig/network # Created by anaconda NETWORKING=yes HOSTNAME=worker1.ittraining.loc
Activez l'adresse IP 192.168.56.5 :
[root@centos7 ~]# nmcli connection up ip_enp0s8
Fermez le terminal courant et ouvrez un autre terminal. Connectez-vous au serverXX :
$ ssh desktop@serverXX.ittraining.network desktop@serverXX.ittraining.network's password:
Démarrez la VM master1 :
desktop@serverXX:~$ VBoxManage startvm master1 --type headless
Connectez-vous à la VM worker1 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.5 The authenticity of host '192.168.56.5 (192.168.56.5)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.56.5' (ECDSA) to the list of known hosts. trainee@192.168.56.5's password: trainee Last login: Tue Sep 15 09:32:41 2020 from 192.168.56.1 [trainee@worker1 ~]$
Créez le repository ambari dans yum :
[trainee@worker1 ~]$ su - Password: fenestros [root@worker1 ~]# vi /etc/yum.repos.d/ambari.repo [root@worker1 ~]# cat /etc/yum.repos.d/ambari.repo [ambari] name = Ambari Repo baseurl = http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118 gpgcheck = 0
Mettez à jour la base de données des dépôts dans yum :
[root@worker1 ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: ambari base extras updates Cleaning up list of fastest mirrors [root@worker1 ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors * base: mirroir.wptheme.fr * extras: ftp.rezopole.net * updates: mirroir.wptheme.fr ambari | 2.9 kB 00:00:00 base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/13): ambari/filelists_db | 104 kB 00:00:00 (2/13): ambari/primary_db | 25 kB 00:00:00 (3/13): ambari/other_db | 1.4 kB 00:00:00 (4/13): base/7/x86_64/group_gz | 153 kB 00:00:00 (5/13): base/7/x86_64/filelists_db | 7.1 MB 00:00:01 (6/13): extras/7/x86_64/filelists_db | 217 kB 00:00:00 (7/13): extras/7/x86_64/primary_db | 206 kB 00:00:00 (8/13): extras/7/x86_64/other_db | 124 kB 00:00:00 (9/13): updates/7/x86_64/other_db | 316 kB 00:00:00 (10/13): base/7/x86_64/other_db | 2.6 MB 00:00:01 (11/13): updates/7/x86_64/filelists_db | 2.4 MB 00:00:01 (12/13): base/7/x86_64/primary_db | 6.1 MB 00:00:03 (13/13): updates/7/x86_64/primary_db | 4.5 MB 00:00:07 Metadata Cache Created
Installez ambari agent :
[root@worker1 ~]# yum -y install ambari-agent
Modifiez le fichier /etc/ambari-agent/conf/ambari-agent.ini :
[root@worker1 ~]# vi /etc/ambari-agent/conf/ambari-agent.ini ... [server] hostname=master1.ittraining.loc <-----------------------modifier de localhost à master1.ittraining.loc ...
Démarrez le service ambari-agent :
[root@worker1 ~]# ambari-agent start Verifying Python version compatibility... Using python /usr/bin/python Checking for previously running Ambari Agent... Checking ambari-common dir... Starting ambari-agent Verifying ambari-agent process status... Ambari Agent successfully started Agent PID at: /run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log
Arrêtez la VM worker1 :
[root@worker1 ~]# shutdown -h now Connection to 192.168.56.5 closed by remote host. Connection to 192.168.56.5 closed.
Arrêtez la VM master1 :
desktop@serverXX:~$ VBoxManage controlvm master1 poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Configurer la VM worker2
Démarrer la VM worker2 :
desktop@serverXX:~$ VBoxManage startvm worker2 --type headless
Connectez-vous à la VM worker2 :
desktop@server40:~$ ssh -l trainee 192.168.56.2 trainee@192.168.56.2's password: trainee Last login: Tue Sep 15 06:53:32 2020 from 192.168.56.1
Changer le hostname de la machine et modifiez l'adresse IP fixe de l'interface enp0s8 :
[trainee@centos7 ~]$ su - Password: fenestros Last login: Thu Sep 10 16:53:17 CEST 2020 on pts/0 [root@centos7 ~]# nmcli general hostname worker2.ittraining.loc [root@centos7 ~]# nmcli con mod ip_enp0s8 ipv4.addresses 192.168.56.6/24
Editer /etc/sysconfig/network :
[root@centos7 ~]# vi /etc/sysconfig/network [root@centos7 ~]# cat /etc/sysconfig/network # Created by anaconda NETWORKING=yes HOSTNAME=worker2.ittraining.loc
Activez l'adresse IP 192.168.56.6 :
[root@centos7 ~]# nmcli connection up ip_enp0s8
Fermez le terminal courant et ouvrez un autre terminal. Connectez-vous au serverXX :
$ ssh desktop@serverXX.ittraining.network desktop@serverXX.ittraining.network's password:
Démarrez la VM master1 :
desktop@serverXX:~$ VBoxManage startvm master1 --type headless
Connectez-vous à la VM worker2 :
desktop@server40:~$ ssh -l trainee 192.168.56.6 The authenticity of host '192.168.56.6 (192.168.56.6)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.56.6' (ECDSA) to the list of known hosts. trainee@192.168.56.6's password: trainee Last login: Tue Sep 15 09:44:25 2020 from 192.168.56.1
Créez le repository ambari dans yum :
[trainee@worker2 ~]$ su - Password: fenestros [root@worker2 ~]# vi /etc/yum.repos.d/ambari.repo [root@worker2 ~]# cat /etc/yum.repos.d/ambari.repo [ambari] name = Ambari Repo baseurl = http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118 gpgcheck = 0
Mettez à jour la base de données des dépôts dans yum :
[root@worker2 ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: ambari base extras updates Cleaning up list of fastest mirrors [root@worker2 ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors * base: mirroir.wptheme.fr * extras: ftp.rezopole.net * updates: mirroir.wptheme.fr ambari | 2.9 kB 00:00:00 base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/13): ambari/filelists_db | 104 kB 00:00:00 (2/13): ambari/primary_db | 25 kB 00:00:00 (3/13): ambari/other_db | 1.4 kB 00:00:00 (4/13): base/7/x86_64/group_gz | 153 kB 00:00:00 (5/13): base/7/x86_64/filelists_db | 7.1 MB 00:00:01 (6/13): extras/7/x86_64/filelists_db | 217 kB 00:00:00 (7/13): extras/7/x86_64/primary_db | 206 kB 00:00:00 (8/13): extras/7/x86_64/other_db | 124 kB 00:00:00 (9/13): updates/7/x86_64/other_db | 316 kB 00:00:00 (10/13): base/7/x86_64/other_db | 2.6 MB 00:00:01 (11/13): updates/7/x86_64/filelists_db | 2.4 MB 00:00:01 (12/13): base/7/x86_64/primary_db | 6.1 MB 00:00:03 (13/13): updates/7/x86_64/primary_db | 4.5 MB 00:00:07 Metadata Cache Created
Installez ambari agent :
[root@worker2 ~]# yum -y install ambari-agent
Modifiez le fichier /etc/ambari-agent/conf/ambari-agent.ini :
[root@worker2 ~]# vi /etc/ambari-agent/conf/ambari-agent.ini ... [server] hostname=master1.ittraining.loc <-----------------------modifier de localhost à master1.ittraining.loc ...
Démarrez le service ambari-agent :
[root@worker2 ~]# ambari-agent start Verifying Python version compatibility... Using python /usr/bin/python Checking for previously running Ambari Agent... Checking ambari-common dir... Starting ambari-agent Verifying ambari-agent process status... Ambari Agent successfully started Agent PID at: /run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log
Arrêtez la VM worker2 :
[root@worker2 ~]# shutdown -h now Connection to 192.168.56.6 closed by remote host. Connection to 192.168.56.6 closed.
Arrêtez la VM master1 :
desktop@serverXX:~$ VBoxManage controlvm master1 poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Configurer la VM worker3
Démarrer la VM worker3 :
desktop@serverXX:~$ VBoxManage startvm worker3 --type headless
Connectez-vous à la VM worker3 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.2 trainee@192.168.56.2's password: trainee Last login: Tue Sep 15 06:53:32 2020 from 192.168.56.1
Changer le hostname de la machine et modifiez l'adresse IP fixe de l'interface enp0s8 :
[trainee@centos7 ~]$ su - Password: fenestros Last login: Thu Sep 10 16:53:17 CEST 2020 on pts/0 [root@centos7 ~]# nmcli general hostname worker3.ittraining.loc [root@centos7 ~]# nmcli con mod ip_enp0s8 ipv4.addresses 192.168.56.7/24
Editer /etc/sysconfig/network :
[root@centos7 ~]# vi /etc/sysconfig/network [root@centos7 ~]# cat /etc/sysconfig/network # Created by anaconda NETWORKING=yes HOSTNAME=worker3.ittraining.loc
Activez l'adresse IP 192.168.56.7 :
[root@centos7 ~]# nmcli connection up ip_enp0s8
Fermez le terminal courant et ouvrez un autre terminal. Connectez-vous au serverXX :
$ ssh desktop@serverXX.ittraining.network desktop@serverXX.ittraining.network's password:
Démarrez la VM master1 :
desktop@serverXX:~$ VBoxManage startvm master1 --type headless
Connectez-vous à la VM worker3 :
desktop@serverXX:~$ ssh -l trainee 192.168.56.7 The authenticity of host '192.168.56.7 (192.168.56.7)' can't be established. ECDSA key fingerprint is SHA256:p5z2DKHnUDZcE3RKKo5AbZiVHEe4MPj0qMRug9tAq7M. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.56.7' (ECDSA) to the list of known hosts. trainee@192.168.56.7's password: trainee Last login: Tue Sep 15 10:42:01 2020 from 192.168.56.1 [trainee@worker3 ~]$
Créez le repository ambari dans yum :
[trainee@worker3 ~]$ su - Password: fenestros [root@worker3 ~]# vi /etc/yum.repos.d/ambari.repo [root@worker3 ~]# cat /etc/yum.repos.d/ambari.repo [ambari] name = Ambari Repo baseurl = http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118 gpgcheck = 0
Mettez à jour la base de données des dépôts dans yum :
[root@worker3 ~]# yum clean all Loaded plugins: fastestmirror Cleaning repos: ambari base extras updates Cleaning up list of fastest mirrors [root@worker3 ~]# yum makecache Loaded plugins: fastestmirror Determining fastest mirrors * base: mirroir.wptheme.fr * extras: ftp.rezopole.net * updates: mirroir.wptheme.fr ambari | 2.9 kB 00:00:00 base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/13): ambari/filelists_db | 104 kB 00:00:00 (2/13): ambari/primary_db | 25 kB 00:00:00 (3/13): ambari/other_db | 1.4 kB 00:00:00 (4/13): base/7/x86_64/group_gz | 153 kB 00:00:00 (5/13): base/7/x86_64/filelists_db | 7.1 MB 00:00:01 (6/13): extras/7/x86_64/filelists_db | 217 kB 00:00:00 (7/13): extras/7/x86_64/primary_db | 206 kB 00:00:00 (8/13): extras/7/x86_64/other_db | 124 kB 00:00:00 (9/13): updates/7/x86_64/other_db | 316 kB 00:00:00 (10/13): base/7/x86_64/other_db | 2.6 MB 00:00:01 (11/13): updates/7/x86_64/filelists_db | 2.4 MB 00:00:01 (12/13): base/7/x86_64/primary_db | 6.1 MB 00:00:03 (13/13): updates/7/x86_64/primary_db | 4.5 MB 00:00:07 Metadata Cache Created
Installez ambari agent :
[root@worker3 ~]# yum -y install ambari-agent
Modifiez le fichier /etc/ambari-agent/conf/ambari-agent.ini :
[root@worker3 ~]# vi /etc/ambari-agent/conf/ambari-agent.ini ... [server] hostname=master1.ittraining.loc <-----------------------modifier de localhost à master1.ittraining.loc ...
Démarrez le service ambari-agent :
[root@worker3 ~]# ambari-agent start Verifying Python version compatibility... Using python /usr/bin/python Checking for previously running Ambari Agent... Checking ambari-common dir... Starting ambari-agent Verifying ambari-agent process status... Ambari Agent successfully started Agent PID at: /run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.log
Arrêtez la VM worker3 :
[root@worker3 ~]# shutdown -h now Connection to 192.168.56.7 closed by remote host. Connection to 192.168.56.7 closed.
Arrêtez la VM master1 :
desktop@serverXX:~$ VBoxManage controlvm master1 poweroff 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Prendre des Snapshots
Avant de poursuivre, prenez une instantanée de chaque VM :
desktop@serverXX:~$ VBoxManage snapshot master1 take "snapshot1" --description "Fresh install" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Snapshot taken. UUID: 24bcd65c-b648-4e30-a46a-7f41e47a33e3 desktop@serverXX:~$ VBoxManage snapshot master2 take "snapshot1" --description "Fresh install" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Snapshot taken. UUID: a6442d0e-828f-4db4-9a99-42819e131271 desktop@serverXX:~$ VBoxManage snapshot master3 take "snapshot1" --description "Fresh install" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Snapshot taken. UUID: a4370cc7-96db-478a-b46f-ebf8e86d22b9 desktop@serverXX:~$ VBoxManage snapshot worker1 take "snapshot1" --description "Fresh install" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Snapshot taken. UUID: 13b665ff-d808-4c7c-9f1d-11dbe0df61bc desktop@serverXX:~$ VBoxManage snapshot worker2 take "snapshot1" --description "Fresh install" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Snapshot taken. UUID: 832b0513-48c9-449f-845d-facd9b1b2298 desktop@serverXX:~$ VBoxManage snapshot worker3 take "snapshot1" --description "Fresh install" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Snapshot taken. UUID: b219559d-ecc9-4938-815e-6da06d762b7a
Démarrer les Machines Virtuelles
Démarrez les VMs :
desktop@serverXX:~$ VBoxManage startvm master1 --type headless desktop@serverXX:~$ VBoxManage startvm master2 --type headless desktop@serverXX:~$ VBoxManage startvm master3 --type headless desktop@serverXX:~$ VBoxManage startvm worker1 --type headless desktop@serverXX:~$ VBoxManage startvm worker2 --type headless desktop@serverXX:~$ VBoxManage startvm worker3 --type headless
Se Connecter aux Machines Virtuelles
En utilisant une première connexion SSH, tapez la commande suivante pour vous connecter à la machine master1 :
desktop@serverXX:~$ ssh -l trainee master1.ittraining.loc
En utilisant une deuxième connexion SSH, tapez la commande suivante pour vous connecter à la machine master2 :
desktop@serverXX:~$ ssh -l trainee master2.ittraining.loc
En utilisant une troisième connexion SSH, tapez la commande suivante pour vous connecter à la machine master3 :
desktop@serverXX:~$ ssh -l trainee master3.ittraining.loc
En utilisant une quatrième connexion SSH, tapez la commande suivante pour vous connecter à la machine worker1 :
desktop@serverXX:~$ ssh -l trainee worker1.ittraining.loc
En utilisant une cinquième connexion SSH, tapez la commande suivante pour vous connecter à la machine worker2 :
desktop@serverXX:~$ ssh -l trainee worker2.ittraining.loc
En utilisant une sixième connexion SSH, tapez la commande suivante pour vous connecter à la machine worker3 :
desktop@serverXX:~$ ssh -l trainee worker3.ittraining.loc
Se connecter en mode graphique au serverXX.ittraining.network
Téléchargez le client X2Go ( https://wiki.x2go.org/doku.php/download:start ) et installez-le. Créez une nouvelle connexion XFCE pour votre serveur :
Connectez-vous au serverXX :
Ouvrez le navigateur Firefox et saisissez l'URL http://master1.ittraining.loc:8080. Entrez l'utilisateur admin et le mot de passe admin et cliquez sur le bouton SIGN IN :
Vous êtes maintenant dans la console d'Ambari :
Utiliser la console Ambari
Get Started
Saisissez le nom HDP_ittraining en tant que CLUSTER NAME et cliquez sur le bouton NEXT :
Dans la liste des systèmes d'exploitation, supprimez tous les OS sauf redhat7 :
Ouvrez ensuite le fichier /root/repositories dans la VM master1 :
[root@master1 ~]# cat repositories http://master1.ittraining.loc/HDP/centos7/3.1.4.0-315/ http://master1.ittraining.loc/HDP-GPL/centos7/3.1.4.0-315/ http://master1.ittraining.loc/HDP-UTILS/centos7/1.1.0.22/ http://master1.ittraining.loc/ambari/centos7/2.7.4.0-118
Copiez ensuite les URLs à partir du fichier repositories et collez-les aux emplacements prévus dans la console puis cliquez sur le bouton NEXT:
Install Options
Entrez la liste des serveurs dans l'emplacement prévu. Notez ici l'utilisation d'une expression régulière [1-3] :
Choisissez l'option Perform manual registration and do not use SSH :
Confirm Hosts
Validez la boîte d'avertissement et cliquez sur le bouton REGISTER AND CONFIRM. L'assistant résoud les expressions régulières dans les nom d'hôtes et vous damande de confirmer. Cliquez donc sur le bouton OK :
Cliquez sur le bouton OK de la boîte d'avertissement Before You Proceed :
L'assistant initialise chaque noeud du cluster puis vérifie que les pré-requis pour continuer sont satisfaits :
Pour consulter la liste des pré-requis en cas de problème, cliquez sur le lien Click here to see the check results :
Choose Services
Fermez la fenêtre Host checks et cliquez sur le bouton NEXT. Choisissez maintenant les services que vous souhaitez ajouter. Pour effectuer une installation minimaliste dans un premier temps, ne cochez que HDFS, YARN + MapReduce2 et ZooKeeper puis cliquez sur le bouton NEXT :
Notez qu'en cas de dépendance manquante, l'assistant vous le rappelle :
Cliquez sur le bouton OK. L'assistant vous affiche une fenêtre Limited Functionality Warning pour vous avertir des fonctionalités limitées dues au fait qu'Apache Ranger et Apache Atlas n'ont pas été sélectionnés. Cliquez simplement sur le bouton PROCEED ANYWAY chaque fois :
Assign Masters
L'assistant vous propose maintenant la possibilité d'équilibrer la charge sur les serveurs dont il a connaissance. Modifiez la valeur du Metrics Collector à master3.ittraining.loc puis cliquez sur le bouton NEXT :
Assign Slaves and Clients
L'assistant vous propose maintenant d'assigner des composants à chaque hôte. Les hôtes ayant des composants maître sont marqués avec une étoile. Cochez Client pour chaque hôte puis cliquez sur le bouton NEXT :
Customize Services
Ensuite l'assistant vous demande de spécifier les mots de passe que souhaitez utiliser pour Grafana et Activity Explorer. Saisissez le mot de passe fenestros dans chaque cas puis cliquez sur le bouton NEXT :
L'assistant vous permet ensuite de modifier les emplacements par défaut des répertoires pour chacune des applications à installer. Cliquez simplement sur le bouton NEXT :
L'assistant vous permet ensuite de modifier les noms des comptes par défaut pour chacune des applications à installer. Cliquez simplement sur le bouton NEXT :
L'assistant vous permet ensuite de modifier les configurations par défaut pour chacune des applications à installer. Notez ici qu'il y a un avertissement en rouge pour la configuration avancée :
Cliquez donc sur la cloche en rouge :
Puis sur le bouton EDIT. entrez le mot de passe fenestros puis cliquez sur le bouton NEXT :
Review
L'assitant vous propose maintenant un résumé de vos choix ainsi que la possibilité de télécharger un fichier de template à utiliser pour re-créer un cluster identique par la suite en cliquant sur le bouton GENERATE BLUEPRINT :
Install, Start and Test
Téléchargez le template puis cliquez sur le bouton DEPLOY :
A l'issu du déploiement, un résumé de la situation vous informe d'éventuelles erreurs :
En cas d'erreurs, il vous est possible de consulter les détails de celles-ci :
Une fois les erreurs corrigées, il convient de déployer de nouveau le cluster :
Cette fois, le résumé ne doit pas montrer d'erreurs :
En validant le déploiement, vous arrivez sur le console de gestion :
<html>
Copyright © 2020 Hugh Norris
</html>