侧边栏壁纸
博主头像
zyixin

当你觉得为时已晚的时候,恰恰是最早的时候

  • 累计撰写 66 篇文章
  • 累计创建 0 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

minio集群安装(docker版)

zyixin
2024-07-04 / 0 评论 / 0 点赞 / 93 阅读 / 875 字
温馨提示:
本文最后更新于 2024-07-04,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。

一、minio介绍

MinIO 是一种高性能、S3 兼容的对象存储。
它专为大规模 AI/ML、数据湖和数据库工作负载而构建,并且它是由软件定义的存储。
不需要购买任何专有硬件,就可以在云上和普通硬件上拥有分布式对象存储。
MinIO拥有开源 GNU AGPL v3 和商业企业许可证的双重许可。

二、安装步骤

1、安装docker

2、安装docker-compose

3、环境准备

3.1、 准备4台服务器:

10.130.77.23
10.130.77.32
10.130.77.33
10.130.77.39

3.2、准备一个高可用负载均衡的服务:

如Nginx,SLB等

3.3、整体部署拓扑图说明

逻辑图

4、部署说明

4.1、10.130.77.23服务器docker-compose文件

x-hostnames: &hostnames
  - minio1:10.130.77.23
  - minio2:10.130.77.32
  - minio3:10.130.77.33
  - minio4:10.130.77.39
  - qnt7.limto.cn:10.130.77.23

version: '3.7'

services:
  minio1:
    image: minio/minio:RELEASE.2023-08-23T10-07-06Z
    container_name: minio1
    hostname: minio1
    user: 1000:2004
    restart: always
    #network_mode: "host"
    extra_hosts: *hostnames
    ports:
      - "29090:29090"
      - "29091:29091"
    command: server --address ":29090" --console-address ":29091" http://minio{1...4}/data
    volumes:
      - ./data:/data
    environment:
      - MINIO_ROOT_USER=admin
      - MINIO_ROOT_PASSWORD=admin123456
      - MINIO_SERVER_URL=http://qnt7.limto.cn:29090
      - MINIO_BROWSER_REDIRECT_URL=http://10.130.41.177:29091
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:29090/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3  

4.2、10.130.77.32服务器docker-compose文件

x-hostnames: &hostnames
 - minio1:10.130.77.23
 - minio2:10.130.77.32
 - minio3:10.130.77.33
 - minio4:10.130.77.39
 - qnt7.limto.cn:10.130.77.23

version: '3.7'

services:
 minio2:
   image: minio/minio:RELEASE.2023-08-23T10-07-06Z
   container_name: minio2
   hostname: minio2
   user: 1000:2004
   restart: always
   #network_mode: "host"
   extra_hosts: *hostnames
   ports:
     - "29090:29090"
     - "29091:29091"
   command: server --address ":29090" --console-address ":29091" http://minio{1...4}/data
   volumes:
     - ./data:/data
   environment:
     - MINIO_ROOT_USER=admin
     - MINIO_ROOT_PASSWORD=admin123456
     - MINIO_SERVER_URL=http://qnt7.limto.cn:29090
     - MINIO_BROWSER_REDIRECT_URL=http://10.130.41.177:29091
   healthcheck:
     test: ["CMD", "curl", "-f", "http://localhost:29090/minio/health/live"]
     interval: 30s
     timeout: 20s
     retries: 3  

4.3、10.130.77.33服务器docker-compose文件

x-hostnames: &hostnames
 - minio1:10.130.77.23
 - minio2:10.130.77.32
 - minio3:10.130.77.33
 - minio4:10.130.77.39
 - qnt7.limto.cn:10.130.77.23

version: '3.7'

services:
 minio3:
   image: minio/minio:RELEASE.2023-08-23T10-07-06Z
   container_name: minio3
   hostname: minio3
   user: 1000:2004
   restart: always
   #network_mode: "host"
   extra_hosts: *hostnames
   ports:
     - "29090:29090"
     - "29091:29091"
   command: server --address ":29090" --console-address ":29091" http://minio{1...4}/data
   volumes:
     - ./data:/data
   environment:
     - MINIO_ROOT_USER=admin
     - MINIO_ROOT_PASSWORD=admin123456
     - MINIO_SERVER_URL=http://qnt7.limto.cn:29090
     - MINIO_BROWSER_REDIRECT_URL=http://10.130.41.177:29091
   healthcheck:
     test: ["CMD", "curl", "-f", "http://localhost:29090/minio/health/live"]
     interval: 30s
     timeout: 20s
     retries: 3  

4.4、10.130.77.39服务器docker-compose文件

x-hostnames: &hostnames
 - minio1:10.130.77.23
 - minio2:10.130.77.32
 - minio3:10.130.77.33
 - minio4:10.130.77.39
 - qnt7.limto.cn:10.130.77.23

version: '3.7'

services:
 minio4:
   image: minio/minio:RELEASE.2023-08-23T10-07-06Z
   container_name: minio4
   hostname: minio4
   user: 1000:2004
   restart: always
   #network_mode: "host"
   extra_hosts: *hostnames
   ports:
     - "29090:29090"
     - "29091:29091"
   command: server --address ":29090" --console-address ":29091" http://minio{1...4}/data
   volumes:
     - ./data:/data
   environment:
     - MINIO_ROOT_USER=admin
     - MINIO_ROOT_PASSWORD=admin123456
     - MINIO_SERVER_URL=http://qnt7.limto.cn:29090
     - MINIO_BROWSER_REDIRECT_URL=http://10.130.41.177:29091
   healthcheck:
     test: ["CMD", "curl", "-f", "http://localhost:29090/minio/health/live"]
     interval: 30s
     timeout: 20s
     retries: 3  

4.5、每台服务器导入docker镜像,并启动服务

mkdir -pv data/
docker load -i minio.tar
docker-compose up -d 
0

评论区