Constitution du Cluster
- node-minio-r01
- node-minio-r02
- node-minio-r03
Spécification des 3 nodes minIO
- IP : 10.10.0.51 à 10.10.53
- 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 (3 nœuds réplicas)
Mise à jour
[root@node-minio-r0x ~]# dnf -y update
Installation des middlewares
[root@node-minio-r0x ~]# dnf install dnf-utils epel-release net-tools nmap curl wget tar -y
Désactiver SELinux
[root@node-minio-r0x ~]# getenforce Enforcing [root@node-minio-r0x ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config [root@node-minio-r0x ~]# setenforce 0 [root@node-minio-r0x ~]# getenforce Permissive
Synchroniser DateTime sur le fuseau de PARIS
[root@node-minio-r0x ~]# timedatectl set-timezone Europe/Paris [root@node-minio-r0x ~]# timedatectl
Intégration des Hosts au DNS
[root@node-minio-r0x ~]# for i in {1..3} ; do nslookup node-minio-r0${i} ; done
Règle de Firewall
[root@node-minio-r0x ~]# firewall-cmd --remove-service={dhcpv6-client,cockpit} --permanent && firewall-cmd –reload [root@node-minio-r0x ~]# firewall-cmd --add-port={9000,9001}/tcp --permanent && firewall-cmd --reload
2. Préparation des disques MinIO (3 nœuds réplicas)
[root@node-minio-r0x home]# lsblk
Partitionnement des disques
[root@node-minio-r0x ~]# parted -s /dev/sdb mklabel msdos [root@node-minio-r0x ~]# parted -s /dev/sdc mklabel msdos [root@node-minio-r0x ~]# parted -s /dev/sdd mklabel msdos [root@node-minio-r0x ~]# parted -s /dev/sde mklabel msdos [root@node-minio-r0x ~]# parted -s /dev/sdb mkpart primary 1MiB 100% [root@node-minio-r0x ~]# parted -s /dev/sdc mkpart primary 1MiB 100% [root@node-minio-r0x ~]# parted -s /dev/sdd mkpart primary 1MiB 100% [root@node-minio-r0x ~]# parted -s /dev/sde mkpart primary 1MiB 100%
[root@node-minio-r0x home]# lsblk
Formatage des disques
[root@node-minio-r0x ~]# mkfs.xfs -f /dev/sdb1 [root@node-minio-r0x ~]# mkfs.xfs -f /dev/sdc1 [root@node-minio-r0x ~]# mkfs.xfs -f /dev/sdd1 [root@node-minio-r0x ~]# mkfs.xfs -f /dev/sde1
Montage des disques
[root@node-minio-r0x ~]# for i in {1..4} ;do mkdir -p /minio/replicat_0${i};done [root@node-minio-r0x ~]# ls -al /minio/
[root@node-minio-r0x ~]# echo "/dev/sdb1 /minio/replicat_01 xfs defaults 0 0" >> /etc/fstab [root@node-minio-r0x ~]# echo "/dev/sdc1 /minio/replicat_02 xfs defaults 0 0" >> /etc/fstab [root@node-minio-r0x ~]# echo "/dev/sdd1 /minio/replicat_03 xfs defaults 0 0" >> /etc/fstab [root@node-minio-r0x ~]# echo "/dev/sde1 /minio/replicat_04 xfs defaults 0 0" >> /etc/fstab [root@node-minio-r0x ~]# systemctl daemon-reload
[root@node-minio-r0x ~]# for i in {1..4} ;do mount /minio/replicat_0${i};done [root@node-minio-r0x ~]# df -h |grep mini
3. Création des comptes (3 nœuds réplicas)
[root@node-minio-r0x ~]# groupadd -r minio-user [root@node-minio-r0x ~]# useradd -M -r -g minio-user minio-user [root@node-minio-r0x ~]# chown -R minio-user:minio-user /minio [root@node-minio-r0x ~]# ls -al /minio
4. Installation MinIO (3 nœuds réplicas)
Installation des binaires
Téléchargement des binaires
[root@node-minio-r0x ~]# cd /home/ [root@node-minio-r0x home]# wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20240406052602.0.0-1.x86_64.rpm [root@node-minio-r0x home]# dnf install minio-20240406052602.0.0-1.x86_64.rpm
5. Création du service minIO (3 nœuds réplicas)
[root@node-minio-r0x ~]# 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 minIO (3 nœuds réplicas)
Les Hosts minIO
- node-minio-r01
- node-minio-r02
- node-minio-r03
Les disques minIO
- /minio/replicat_01
- /minio/replicat_02
- /minio/replicat_03
- /minio/replicat_04
[root@node-minio-r0x ~]# mkdir /etc/minio [root@node-minio-r0x ~]# chown minio-user:minio-user /etc/minio
Fichier d’environnement
[root@node-minio-r0x ~]# vi /etc/default/minio # Variable spécifiant les hosts et les volumes par hosts MINIO_VOLUMES="http://node-minio-r0{1...3}.house.cpb:9000/minio/replicat_0{1...4}" #Paramètre du port de la console MINIO_OPTS="--console-address :9001" #Credentials , tous les nœuds entre sites doivent avoir les mêmes crdentials 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 (3 nœuds réplicas)
Démarrage du service (les 3 parallèlements )
[root@node-minio-r0x ~]# systemctl start minio.service [root@node-minio-r0x ~]# systemctl enable minio.service
Check des statuts
[root@node-minio-r01 ~]# systemctl status minio.service
[root@node-minio-r02 ~]# systemctl status minio.service
[root@node-minio-r03 ~]# systemctl status minio.service
Connexion au service
Pour rappel
- Login : replicatadmin
- Password : replicatadmin
- http://node-minio-r01.house.cpb:9000
Views: 0