Skip to content

amirajoodani/HA-minio-nginx-keepalived

Repository files navigation

what is minio ?

MinIO is a high-performance, S3 compatible object store. It is built for large scale AI/ML, data lake and database workloads. It runs on-prem and
on any cloud (public or private) and from the data center to the edge. MinIO is software-defined and open source under GNU AGPL v3.
minio picture

technology that we use in this project ?

1-minio object storage
2-docker
3-nginx
4-keepalived

what we have done ?

we setup Ha for minio object storage with nginx and keepalievd service . as we can see in the picture :
diagram

so if any instance of minio goes down , we have another one up behind the our domain based on nginx confguration .

steps to setup :

1- install docker on both vm

2- bring up dockerize minio instance on two port 9001 and 8001 with docker-compose.yml file in this repository

docker-compose up -d

now you should be able to see minio web cosole with both ip on two port 8001 and 9001
minio1 minio2

3- install nginx and keepalived service

sudo apt install -y nginx keepalived htop
sudo systemctl enable nginx --now

enable http traffic on your firewalll

ufw allow http

allow vrrp protocol on your firewall or allow all traffic form another vm on your vm :
(on 1.63 vm)

ufw allow from 192.168.1.12
ufw allow to 192.168.1.12

4- config keepalived

firest get backup form keepalived service :

sudo cp /etc/keepalived/keepalived.conf /etc/keepalived/keepalived.conf.bck

minio5

on 1.12 vm we should config keepalived as master node and on 1.63 config it as slave mode . we set virtual ip address 192.168.1.100 on both config node . wet lower priroty on slave mode . use master and slave config in this repository . and then start keepalived serrvice on both node :

systemctl start keepalived

on master node you will see :
minio3

if your config was ok , your master node get message of slave node .

on slave node :
minio4

on slave node detect which one is master .

5 -config nginx:

for setup ha in level of minio service, use nginx config in this repo and restart nginx service .

6- finish

now you can see your ha minio cluster behind your domain :
minio6

Releases

No releases published

Packages

No packages published