Constitution du Cluster
- node-minio-s01
- node-minio-s02
- node-minio-s03
- node-minio-s04
- node-minio-s05
- node-minio-s06
Spécification des 6 nodes minIO
- IP : 10.100.0.41 à 10.100.46
- vCPU : 2
- RAM : 2Go
- Disque : 8Go (Système)
- Disque : 32Go (Data01)
- Disque : 32Go (Data02)
- Disque : 32Go (Data03)
- Disque : 32Go (Data04)
- OS : RockyLinux 8
1. Installation des prérequis (6 noeuds)
Mise à jour
[root@node-minio-s0x ~]# dnf -y update
Installation des middlewares
[root@node-minio-s0x ~]# dnf install dnf-utils epel-release net-tools nmap curl wget tar -y
Désactiver SELinux
[root@node-minio-s0x ~]# getenforce Enforcing [root@node-minio-s0x ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config [root@node-minio-s0x ~]# setenforce 0 [root@node-minio-s0x ~]# getenforce Permissive
Synchroniser DateTime sur le fuseau de PARIS
[root@node-minio-s0x ~]# timedatectl
[root@node-minio-s0x ~]# timedatectl set-timezone Europe/Paris [root@node-minio-s0x ~]# timedatectl
Intégration des Hosts au DNS
[root@node-minio-s0x ~]# for i in {1..6} ; do nslookup node-minio-s0${i} ; done
Règle de Firewall
[root@node-minio-s0x ~]# firewall-cmd --remove-service={dhcpv6-client,cockpit} --permanent && firewall-cmd --reload [root@node-minio-s0x ~]# firewall-cmd --add-port={9000,9001}/tcp --permanent && firewall-cmd --reload
2. Préparation des disques MinIO
[root@node-minio-s0x home]# lsblk
Partitionnement des disques
[root@node-minio-s0x ~]# parted -s /dev/sdb mklabel msdos [root@node-minio-s0x ~]# parted -s /dev/sdc mklabel msdos [root@node-minio-s0x ~]# parted -s /dev/sdd mklabel msdos [root@node-minio-s0x ~]# parted -s /dev/sde mklabel msdos [root@node-minio-s0x ~]# parted -s /dev/sdb mkpart primary 1MiB 100% [root@node-minio-s0x ~]# parted -s /dev/sdc mkpart primary 1MiB 100% [root@node-minio-s0x ~]# parted -s /dev/sdd mkpart primary 1MiB 100% [root@node-minio-s0x ~]# parted -s /dev/sde mkpart primary 1MiB 100% [root@node-minio-s0x home]# lsblk
Formatage des disques
[root@node-minio-s0x ~]# mkfs.xfs -f /dev/sdb1 [root@node-minio-s0x ~]# mkfs.xfs -f /dev/sdc1 [root@node-minio-s0x ~]# mkfs.xfs -f /dev/sdd1 [root@node-minio-s0x ~]# mkfs.xfs -f /dev/sde1
Montage des disques
[root@node-minio-s0x ~]# for i in {1..4} ;do mkdir -p /minio/minio_0${i};done [root@node-minio-s0x ~]# ls -al /minio/
[root@node-minio-s0x ~]# echo "/dev/sdb1 /minio/minio_01 xfs defaults 0 0" >> /etc/fstab [root@node-minio-s0x ~]# echo "/dev/sdc1 /minio/minio_02 xfs defaults 0 0" >> /etc/fstab [root@node-minio-s0x ~]# echo "/dev/sdd1 /minio/minio_03 xfs defaults 0 0" >> /etc/fstab [root@node-minio-s0x ~]# echo "/dev/sde1 /minio/minio_04 xfs defaults 0 0" >> /etc/fstab [root@node-minio-s0x ~]# systemctl daemon-reload
[root@node-minio-s0x ~]# for i in {1..4} ;do mount /minio/minio_0${i};done [root@node-minio-s0x ~]# df -h |grep mini
3. Création des comptes (6 nœuds)
[root@node-minio-s0x ~]# groupadd -r minio-user [root@node-minio-s0x ~]# useradd -M -r -g minio-user minio-user [root@node-minio-s0x ~]# chown -R minio-user:minio-user /minio [root@node-minio-s0x ~]# ls -al /minio
4. Installation MinIO (6 nœuds)
Installation des binaires
Téléchargement des binaires
[root@node-minio-s0x ~]# cd /home/ [root@node-minio-s0x home]# wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20240406052602.0.0-1.x86_64.rpm [root@node-minio-s0x home]# wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20240406052602.0.0-1.x86_64.rpm.sha256sum
Check l’intégrité du fichier
[root@node-minio-s0x home]# sha256sum minio-20240406052602.0.0-1.x86_64.rpm 87e08df00a8725bfe9637fade415e307797d200539f107627daafef767e3d942 minio-20240406052602.0.0-1.x86_64.rpm [root@node-minio-s0x home]# cat minio-20240406052602.0.0-1.x86_64.rpm.sha256sum 87e08df00a8725bfe9637fade415e307797d200539f107627daafef767e3d942 minio-20240406052602.0.0-1.x86_64.rpm
[root@node-minio-s0x home]# dnf install minio-20240406052602.0.0-1.x86_64.rpm
5. Création du service minIO (6 nœuds)
[root@node-minio-s0x ~]# vi /usr/lib/systemd/system/minio.service [Unit] Description=MinIO Documentation=https://docs.min.io Wants=network-online.target After=network-online.target AssertFileIsExecutable=/usr/local/bin/minio [Service] Type=notify WorkingDirectory=/usr/local User=minio-user Group=minio-user ProtectProc=invisible EnvironmentFile=-/etc/default/minio ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi" ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES # Let systemd restart this service always Restart=always # Specifies the maximum file descriptor number that can be opened by this process LimitNOFILE=1048576 # Turn-off memory accounting by systemd, which is buggy. MemoryAccounting=no # Specifies the maximum number of threads this process can create TasksMax=infinity # Disable timeout logic and wait until process is stopped TimeoutSec=infinity SendSIGKILL=no [Install] WantedBy=multi-user.target
6. Variable environnement des ressources minIO (6 nœuds)
Les Hosts minIO
- node-minio-s01
- node-minio-s02
- node-minio-s03
- node-minio-s04
- node-minio-s05
- node-minio-s06
Les disques minIO
- /minio/minio_01
- /minio/minio_02
- /minio/minio_03
- /minio/minio_04
[root@node-minio-s0x ~]# mkdir /etc/minio [root@node-minio-s0x ~]# chown minio-user:minio-user /etc/minio
Fichier d’environnement
[root@node-minio-s0x ~]# vi /etc/default/minio # Variable spécifiant les hosts et les volumes par hosts MINIO_VOLUMES="http://node-minio-s0{1...6}.house.cpb:9000/minio/minio_0{1...4}" #Paramètre du port de la console MINIO_OPTS="--console-address :9001" #Credentials MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin #Adresse VIP du LoadBalancer #MINIO_SERVER_URL=http://minio.house.cpb:9000
7. Démarrage du cluster
Démarrage du service
[root@node-minio-s0x ~]# systemctl start minio.service [root@node-minio-s0x ~]# systemctl enable minio.service
Check des statuts
[root@node-minio-s01 ~]# systemctl status minio.service
[root@node-minio-s02 home]# systemctl status minio.service
[root@node-minio-s03 home]# systemctl status minio.service
[root@node-minio-s04 home]# systemctl status minio.service
[root@node-minio-s05 home]# systemctl status minio.service
[root@node-minio-s06 home]# systemctl status minio.service
Connexion au service
Pour rappel
- Login : minioadmin
- Password : minioadmin
- http://node-minio-s01.house.cpb:9000
Création d’un « bucket »
Précisez un nom de « bucket » et « Create Bucket »
Check des metrics
On retrouve notre cluster
- 6 serveurs minIO
- 24 Disques – 4/Serveurs
- 1 Bucket
Views: 1