MODOP Cluster SeaWeedFS – Partie 4 – Installation 4 nodes Filers

Constitution du cluster Filers

  • node-seaweed-f01
  • node-seaweed-f02
  • node-seaweed-f03
  • node-seaweed-f04

Spécification des 4 Volumes Filer

  • IP : 10.100.0.165 à 10.100.0.168
  • vCPU : 2
  • RAM : 2Go
  • Disque : 32Go (Système)
  • OS : RockyLinux

Installation des prérequis

[root@node-seaweed-f0x ~]# dnf update -y
[root@node-seaweed-f0x ~]# yum install git make wget -y
[root@node-seaweed-f0x ~]# dnf install tar dnf-utils

Installation paquet GO

[root@node-seaweed-f0x ~]# wget -c https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
[root@node-seaweed-f0x ~]# tar -C /usr/local/ -xzf go1.22.0.linux-amd64.tar.gz

[root@node-seaweed-f0x ~]# echo 'export GOROOT=/usr/local/go' | tee -a /etc/profile
export GOROOT=/usr/local/go

[root@node-seaweed-f0x ~]# echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a /etc/profile
export PATH=$PATH:/usr/local/go/bin

[root@node-seaweed-f0x ~]# source /etc/profile
[root@node-seaweed-f0x ~]# go version
go version go1.21.6 linux/amd64

Installation paquet seaweedfs

[root@node-seaweed-v0x ~]# git clone https://github.com/chrislusf/seaweedfs.git
[root@node-seaweed-v0x ~]# cd ~/seaweedfs
[root@node-seaweed-v0x seaweedfs]# make install
[root@node-seaweed-v0x seaweedfs]# cp ~/go/bin/weed /usr/local/bin/
[root@node-seaweed-v0x seaweedfs]# weed version
version 30GB 3.62 linux amd64

Ajout des Hosts « Filer » du Cluster au DNS de l’infra

[root@node-seaweed-f01 ~]# for i in {1..4};do nslookup node-seaweed-f0$i;done

Régles Firewall

[root@node-seaweed-v0x ~]#firewall-cmd --remove-service={cockpit,dhcpv6-client} --permanent
[root@node-seaweed-v0x ~]#firewall-cmd --add-port={8888,18888,8889,18889}/tcp --permanent
[root@node-seaweed-v0x ~]#firewall-cmd --reload

Création des services node-seaweed-f01

[root@node-seaweed-f01 ~]# vi /etc/systemd/system/seaweedfilers.service

[Unit]
Description=SeaweedFS filers
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=weed filer -port=8888 -port.readonly=8889 -master=node-seaweed-m01:9333,node-seaweed-m02:9333,node-seaweed-m03:9333 -defaultReplicaPlacement=110
WorkingDirectory=/usr/local/bin/
SyslogIdentifier=seaweedfs-filers

[Install]
WantedBy=multi-user.target

Démarrage du filers

[root@node-seaweed-f01 ~]# systemctl daemon-reload
[root@node-seaweed-f01 ~]# systemctl enable seaweedfilers
[root@node-seaweed-f01 ~]# systemctl start seaweedfilers

[root@node-seaweed-f01 ~]# systemctl status seaweedfilers

Création des services node-seaweed-f02

[root@node-seaweed-f02 ~]# vi /etc/systemd/system/seaweedfilers.service

[Unit]
Description=SeaweedFS filers
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=weed filer -port=8888 -port.readonly=8889 -master=node-seaweed-m01:9333,node-seaweed-m02:9333,node-seaweed-m03:9333 -defaultReplicaPlacement=110
WorkingDirectory=/usr/local/bin/
SyslogIdentifier=seaweedfs-filers

[Install]
WantedBy=multi-user.target

Démarrage du filers

[root@node-seaweed-f02 ~]# systemctl daemon-reload
[root@node-seaweed-f02 ~]# systemctl enable seaweedfilers
[root@node-seaweed-f02 ~]# systemctl start seaweedfilers

[root@node-seaweed-f02 ~]# systemctl status seaweedfilers

Création des services node-seaweed-f03

[root@node-seaweed-f03 ~]# vi /etc/systemd/system/seaweedfilers.service

[Unit]
Description=SeaweedFS filers
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=weed filer -port=8888 -port.readonly=8889 -master=node-seaweed-m01:9333,node-seaweed-m02:9333,node-seaweed-m03:9333 -defaultReplicaPlacement=110
WorkingDirectory=/usr/local/bin/
SyslogIdentifier=seaweedfs-filers

[Install]
WantedBy=multi-user.target

Démarrage du filers

[root@node-seaweed-f03 ~]# systemctl daemon-reload
[root@node-seaweed-f03 ~]# systemctl enable seaweedfilers
[root@node-seaweed-f03 ~]# systemctl start seaweedfilers

[root@node-seaweed-f03 ~]# systemctl status seaweedfilers

Création des services node-seaweed-f04

[root@node-seaweed-f04 ~]# vi /etc/systemd/system/seaweedfilers.service

[Unit]
Description=SeaweedFS filers
After=network.target

[Service]
Type=simple
User=root
Group=root
ExecStart=weed filer -port=8888 -port.readonly=8889 -master=node-seaweed-m01:9333,node-seaweed-m02:9333,node-seaweed-m03:9333 -defaultReplicaPlacement=110
WorkingDirectory=/usr/local/bin/
SyslogIdentifier=seaweedfs-filers

[Install]
WantedBy=multi-user.target

Démarrage du filers

[root@node-seaweed-f04 ~]# systemctl daemon-reload
[root@node-seaweed-f04 ~]# systemctl enable seaweedfilers
[root@node-seaweed-f04 ~]# systemctl start seaweedfilers

[root@node-seaweed-f04 ~]# systemctl status seaweedfilers

Coté Master leader– node-seaweed-m01

Views: 1

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *