精华内容
参与话题
问答
  • Minio

    2020-12-26 14:13:33
    <div><p>Anyone tried using the S3 provider to talk to minio ? In theory it should work.</p><p>该提问来源于开源项目:graymeta/stow</p></div>
  • MINIO

    2020-08-31 10:41:06
    MINIO 1. 单机版本 docker run -p 9000:9000 --name minio1 \ -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \ -e "MINIO_SECRET_KEY=wJalrXUtnFEMIGK7MDENGFFbPxRfiCYEXAMPLEKEY" \ -v /mnt/data:/data \ -v /...

    MINIO

    1. 单机版本

    docker run -p 9000:9000 --name minio1 \
      -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
      -e "MINIO_SECRET_KEY=wJalrXUtnFEMIGK7MDENGFFbPxRfiCYEXAMPLEKEY" \
      -v /mnt/data:/data \
      -v /mnt/config:/root/.minio \
      minio/minio server /data
    
    docker run -d -p 29000:9000 --restart=always \
    	--name minio-gpu116 \
    	-e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE"  \
    	-e "MINIO_SECRET_KEY=wJalrXUtnFEMIGK7MDENGFFbPxRfiCYEXAMPLEKEY"  \
    	-v /data/minio-data:/data \
    	-v /data/minio-config:/root/.minio \
    	minio/minio server /data
    

    2.swarm集群版本

    ​ 为MinIO创建Docker secret

    echo "AKIAIOSFODNN7EXAMPLE" | docker secret create access_key -
    echo "wJalrXUtnFEMIGK7MDENGFFbPxRfiCYEXAMPLEKEY" | docker secret create secret_key -
    
    docker network create --driver overlay --attachable minio_distributed
    
    docker stack deploy --compose-file=docker-compose-secrets.yaml minio_stack
    
    docker stack rm minio_stack
    

    docker-compose.yml

    version: '3.7'
    
    services:
      minio1:
        image: minio/minio:RELEASE.2020-07-14T19-14-30Z
        hostname: minio1
        volumes:
          - minio1-data:/export
        ports:
          - "9001:9000"
        networks:
          - minio_distributed
        deploy:
          restart_policy:
            delay: 10s
            max_attempts: 10
            window: 60s
          placement:
            constraints:
              - node.labels.minio1==true
        command: server http://minio{1...4}/export
        secrets:
          - secret_key
          - access_key
        healthcheck:
          test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
          interval: 30s
          timeout: 20s
          retries: 3
    
      minio2:
        image: minio/minio:RELEASE.2020-07-14T19-14-30Z
        hostname: minio2
        volumes:
          - minio2-data:/export
        ports:
          - "9002:9000"
        networks:
          - minio_distributed
        deploy:
          restart_policy:
            delay: 10s
            max_attempts: 10
            window: 60s
          placement:
            constraints:
              - node.labels.minio2==true
        command: server http://minio{1...4}/export
        secrets:
          - secret_key
          - access_key
        healthcheck:
          test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
          interval: 30s
          timeout: 20s
          retries: 3
    
      minio3:
        image: minio/minio:RELEASE.2020-07-14T19-14-30Z
        hostname: minio3
        volumes:
          - minio3-data:/export
        ports:
          - "9003:9000"
        networks:
          - minio_distributed
        deploy:
          restart_policy:
            delay: 10s
            max_attempts: 10
            window: 60s
          placement:
            constraints:
              - node.labels.minio3==true
        command: server http://minio{1...4}/export
        secrets:
          - secret_key
          - access_key
        healthcheck:
          test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
          interval: 30s
          timeout: 20s
          retries: 3
    
    volumes:
      minio1-data:
    
      minio2-data:
    
      minio3-data:
    
    
    networks:
      minio_distributed:
        driver: overlay
    
    secrets:
      secret_key:
        external: true
      access_key:
        external: true
    
    
    展开全文
  • minio

    2020-01-27 16:15:30
    MinIO 搭建使用 MinIO简介 MinIO 是一款基于Go语言的高性能对象存储服务,在Github上已有19K+Star。它采用了Apache License v2.0开源协议,非常适合于存储大容量非结构化的数据,例如图片、视频、日志文件、备份数据...

    MinIO 搭建使用

    MinIO简介

    MinIO 是一款基于Go语言的高性能对象存储服务,在Github上已有19K+Star。它采用了Apache License v2.0开源协议,非常适合于存储大容量非结构化的数据,例如图片、视频、日志文件、备份数据和容器/虚拟机镜像等。 本文将使用 MinIO 来自建一个对象存储服务用于存储图片。

    安装及部署

    MinIO的安装方式有很多,这里我们使用它在Docker环境下的安装方式。

    • 下载MinIO的Docker镜像:
    docker pull minio/minio
    • 在Docker容器中运行MinIO,这里我们将MiniIO的数据和配置文件夹挂在到宿主机上:
    docker run -p 9000:9000 --name minio \
      --restart=always \
      -v /etc/localtime:/etc/localtime \
      -v /data/minio/data:/data \
      -v /data/minio/config:/root/.minio \
      -d minio/minio server /data
    • 运行成功后,访问该地址来登录并使用MinIO,默认Access Key和Secret都是minioadmin:http://localhost:9000

    minio

    上传文件及使用

    通过使用MinIO的网页端即可完成文件的上传下载功能,下面我们以图片上传下载为例来演示下该功能。

    • 在存储文件之前,我们需要新建一个存储桶:

    minio

    • 存储桶创建完成后,通过上传按钮可以上传文件,这里我们上传一张图片:

    minio

    • 图片上传完成后,我们可以通过拷贝链接按钮来获取图片访问路径,但是这只是个临时的访问路径:

    minio

    • 要想获取一个永久的访问路径,需要修改存储桶的访问策略,我们可以点击存储桶右上角的编辑策略按钮来修改访问策略;

    minio

    • 这里有三种访问策略可以选择,一种只读、一种只写、一种可读可写,这里我们选择只读即可,但是需要注意的是,访问前缀需要设置为*.*,否则会无法访问;

    minio

    • 设置完成后,我们只需要通过拷贝链接中的前一串路径即可永久访问该文件;

    MinIO客户端的使用

    虽然MinIO的网页端管理已经很方便了,但是官网还是给我们提供了基于命令行的客户端MinIO Client(简称mc),下面我们来讲讲它的使用方法。

    常用命令

    下面我们先来熟悉下mc的命令,这些命令和Linux中的命令有很多相似之处。

    命令 作用
    ls 列出文件和文件夹
    mb 创建一个存储桶或一个文件夹
    cat 显示文件和对象内容
    pipe 将一个STDIN重定向到一个对象或者文件或者STDOUT
    share 生成用于共享的URL
    cp 拷贝文件和对象
    mirror 给存储桶和文件夹做镜像
    find 基于参数查找文件
    diff 对两个文件夹或者存储桶比较差异
    rm 删除文件和对象
    events 管理对象通知
    watch 监听文件和对象的事件
    policy 管理访问策略
    session 为cp命令管理保存的会话
    config 管理mc配置文件
    update 检查软件更新
    version 输出版本信息

    安装及配置

    由于MinIO服务端中并没有自带客户端,所以我们需要安装配置完客户端后才能使用,这里以Docker环境下的安装为例。

    • 下载MinIO Client 的Docker镜像:
    docker pull minio/mc
    • 在Docker容器中运行mc:
    docker run -it --entrypoint=/bin/sh minio/mc
    • 运行完成后我们需要进行配置,将我们自己的MinIO服务配置到客户端上去,配置的格式如下:
    mc config host add <ALIAS> <YOUR-S3-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY> <API-SIGNATURE>
    • 对于我们的MinIO服务可以这样配置:
    mc config host add minio http://localhost:9000 minioadmin minioadmin S3v4

    常用操作

    • 查看存储桶和查看存储桶中存在的文件:
    # 查看存储桶
    mc ls minio
    # 查看存储桶中存在的文件
    mc ls minio/blog

    minio

    • 创建一个名为test的存储桶:
    mc mb minio/test
    • 共享avatar.png文件的下载路径:
    mc share download minio/blog/avatar.png
    • 查找blog存储桶中的png文件:
    mc find minio/blog --name "*.png"
    • 设置test存储桶的访问权限为只读
    # 目前可以设置这四种权限:none, download, upload, public
    mc policy set download minio/test/
    # 查看存储桶当前权限
    mc policy list minio/test/

    参考资料

    详细了解MinIO可以参考官方文档:https://docs.min.io/cn/minio-quickstart-guide.html

    展开全文
  • minio Linux

    2020-12-27 21:01:10
    minio Linux
  • MinIO Quickstart Guide MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance ...
  • minio/minio

    2020-09-16 15:41:58
    MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine...

    MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads.

    Docker Container
    Stable
    docker run -p 9000:9000
    -e “MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE”
    -e “MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY”
    minio/minio server /data
    Edge
    docker run -p 9000:9000
    -e “MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE”
    -e “MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY”
    minio/minio:edge server /data
    NOTE: Docker will not display the default keys unless you start the container with the -it(interactive TTY) argument. Generally, it is not recommended to use default keys with containers. Please visit MinIO Docker quickstart guide for more information here

    macOS
    Homebrew (recommended)
    Install minio packages using Homebrew

    brew install minio/stable/minio
    minio server /data
    NOTE: If you previously installed minio using brew install minio then it is recommended that you reinstall minio from minio/stable/minio official repo instead.

    brew uninstall minio
    brew install minio/stable/minio
    Binary Download
    Platform Architecture URL
    Apple macOS 64-bit Intel https://dl.min.io/server/minio/release/darwin-amd64/minio
    chmod 755 minio
    ./minio server /data
    GNU/Linux
    Binary Download
    Platform Architecture URL
    GNU/Linux 64-bit Intel https://dl.min.io/server/minio/release/linux-amd64/minio
    wget https://dl.min.io/server/minio/release/linux-amd64/minio
    chmod +x minio
    ./minio server /data
    Platform Architecture URL
    GNU/Linux ppc64le https://dl.min.io/server/minio/release/linux-ppc64le/minio
    wget https://dl.min.io/server/minio/release/linux-ppc64le/minio
    chmod +x minio
    ./minio server /data
    Microsoft Windows
    Binary Download
    Platform Architecture URL
    Microsoft Windows 64-bit https://dl.min.io/server/minio/release/windows-amd64/minio.exe
    minio.exe server D:\Photos
    FreeBSD
    Port
    Install minio packages using pkg, MinIO doesn’t officially build FreeBSD binaries but is maintained by FreeBSD upstream here.

    pkg install minio
    sysrc minio_enable=yes
    sysrc minio_disks=/home/user/Photos
    service minio start
    Install from Source
    Source installation is only intended for developers and advanced users. If you do not have a working Golang environment, please follow How to install Golang. Minimum version required is go1.14

    GO111MODULE=on go get github.com/minio/minio
    Allow port access for Firewalls
    By default MinIO uses the port 9000 to listen for incoming connections. If your platform blocks the port by default, you may need to enable access to the port.

    ufw
    For hosts with ufw enabled (Debian based distros), you can use ufw command to allow traffic to specific ports. Use below command to allow access to port 9000

    ufw allow 9000
    Below command enables all incoming traffic to ports ranging from 9000 to 9010.

    ufw allow 9000:9010/tcp
    firewall-cmd
    For hosts with firewall-cmd enabled (CentOS), you can use firewall-cmd command to allow traffic to specific ports. Use below commands to allow access to port 9000

    firewall-cmd --get-active-zones
    This command gets the active zone(s). Now, apply port rules to the relevant zones returned above. For example if the zone is public, use

    firewall-cmd --zone=public --add-port=9000/tcp --permanent
    Note that permanent makes sure the rules are persistent across firewall start, restart or reload. Finally reload the firewall for changes to take effect.

    firewall-cmd --reload
    iptables
    For hosts with iptables enabled (RHEL, CentOS, etc), you can use iptables command to enable all traffic coming to specific ports. Use below command to allow access to port 9000

    iptables -A INPUT -p tcp --dport 9000 -j ACCEPT
    service iptables restart
    Below command enables all incoming traffic to ports ranging from 9000 to 9010.

    iptables -A INPUT -p tcp --dport 9000:9010 -j ACCEPT
    service iptables restart
    Test using MinIO Browser
    MinIO Server comes with an embedded web based object browser. Point your web browser to http://127.0.0.1:9000 ensure your server has started successfully.

    Screenshot

    Test using MinIO Client mc
    mc provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff etc. It supports filesystems and Amazon S3 compatible cloud storage services. Follow the MinIO Client Quickstart Guide for further instructions.

    Pre-existing data
    When deployed on a single drive, MinIO server lets clients access any pre-existing data in the data directory. For example, if MinIO is started with the command minio server /mnt/data, any pre-existing data in the /mnt/data directory would be accessible to the clients.

    The above statement is also valid for all gateway backends.

    Upgrading MinIO
    MinIO server supports rolling upgrades, i.e. you can update one MinIO instance at a time in a distributed cluster. This allows upgrades with no downtime. Upgrades can be done manually by replacing the binary with the latest release and restarting all servers in a rolling fashion. However, we recommend all our users to use mc admin update from the client. This will update all the nodes in the cluster simultaneously and restart them, as shown in the following command from the MinIO client (mc):

    mc admin update <minio alias, e.g., myminio>
    NOTE: some releases might not allow rolling upgrades, this is always called out in the release notes and it is generally advised to read release notes before upgrading. In such a situation mc admin update is the recommended upgrading mechanism to upgrade all servers at once.

    Important things to remember during MinIO upgrades
    mc admin update will only work if the user running MinIO has write access to the parent directory where the binary is located, for example if the current binary is at /usr/local/bin/minio, you would need write access to /usr/local/bin.
    mc admin update updates and restarts all servers simultaneously, applications would retry and continue their respective operations upon upgrade.
    mc admin update is disabled in kubernetes/container environments, container environments provide their own mechanisms to rollout of updates.
    In the case of federated setups mc admin update should be run against each cluster individually. Avoid updating mc to any new releases until all clusters have been successfully updated.
    If using kes as KMS with MinIO, just replace the binary and restart kes more information about kes can be found here
    If using Vault as KMS with MinIO, ensure you have followed the Vault upgrade procedure outlined here: https://www.vaultproject.io/docs/upgrading/index.html
    If using etcd with MinIO for the federation, ensure you have followed the etcd upgrade procedure outlined here: https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrading-etcd.md
    Explore Further
    MinIO Erasure Code QuickStart Guide
    Use mc with MinIO Server
    Use aws-cli with MinIO Server
    Use s3cmd with MinIO Server
    Use minio-go SDK with MinIO Server
    The MinIO documentation website
    Contribute to MinIO Project
    Please follow MinIO Contributor’s Guide

    License
    Use of MinIO is governed by the Apache 2.0 License found at LICENSE.

    展开全文
  • minio.zip minio.zip

    2020-11-19 10:41:57
    minio 自用版,windows版本。比fastDFS更轻量,支持集群部署。minio 自用版,windows版本。比fastDFS更轻量,支持集群部署。
  • <ul><li>Minio</li><li>Minio.NetCore</li></ul> <p>The <a href="https://minio.io/downloads....
  • 包含minio 安装步骤、springboot 如何集成minio,封装的minio 操作工具类,增加方法设置桶的权限
  • minio分布式存储

    2020-12-18 17:38:11
    minio分布式存储
  • minio support

    2021-01-08 15:14:35
    <div><p>is minio support planned? I noticed a test case for minio endpoint, but I checked and goofys requests buckets using subdomains which minio doesnt support.</p><p>该提问来源于开源项目:...
  • Minio分布式集群搭建

    万次阅读 热门讨论 2018-09-04 15:58:57
    /minio/data1 /minio/data2 192.168.0.102 /minio/data1 /minio/data2 本集群由2台服务器构成(官方推荐集群最小4台服务器),每个服务器上挂载两个磁盘目录 2.2、创建相关目录(所有节点) 数据...

    一、分布式Minio快速入门

    分布式Minio可以让你将多块硬盘(甚至在不同的机器上)组成一个对象存储服务。由于硬盘分布在不同的节点上,分布式Minio避免了单点故障。

    1、分布式Minio有什么好处?

    在大数据领域,通常的设计理念都是无中心和分布式。Minio分布式模式可以帮助你搭建一个高可用的对象存储服务,你可以使用这些存储设备,而不用考虑其真实物理位置。

    数据保护

    分布式Minio采用 erasure code(纠删码)来防范多个节点宕机和位衰减bit rot。

    分布式Minio至少需要4个节点,使用分布式Minio自动引入了纠删码功能。

    高可用

    单机Minio服务存在单点故障,相反,如果是一个N节点的分布式Minio,只要有N/2节点在线,你的数据就是安全的。不过你需要至少有N/2+1个节点 Quorum 来创建新的对象。

    例如,一个8节点的Minio集群,每个节点一块盘,就算4个节点宕机,这个集群仍然是可读的,不过你需要5个节点才能写数据。

    限制

    分布式Minio单租户存在最少4个盘最多16个盘的限制(受限于纠删码)。这种限制确保了Minio的简洁,同时仍拥有伸缩性。如果你需要搭建一个多租户环境,你可以轻松的使用编排工具(Kubernetes)来管理多个Minio实例。

    注意,只要遵守分布式Minio的限制,你可以组合不同的节点和每个节点几块盘。比如,你可以使用2个节点,每个节点4块盘,也可以使用4个节点,每个节点两块盘,诸如此类。

    一致性

    Minio在分布式和单机模式下,所有读写操作都严格遵守read-after-write一致性模型。

    二、Minio分布式集群搭建

    生产环境建议最少4节点

    节点 IP data
    minio1 10.10.0.1 /data/minio/data
    minio2 10.10.0.2 /data/minio/data
    minio3 10.10.0.3 /data/minio/data
    minio4 10.10.0.4 /data/minio/data

    1、获取Minio

    https://dl.min.io/server/minio/release/linux-amd64/minio

    2、修改主机名及hosts

    hostnamectl set-hostname minio1
    hostnamectl set-hostname minio2
    hostnamectl set-hostname minio3
    hostnamectl set-hostname minio4
    ...
    
    cat >> /etc/hosts <<EOF
    10.10.0.1 minio1
    10.10.0.2 minio2
    10.10.0.3 minio3
    10.10.0.4 minio4
    EOF
    

    3、系统最大文件数修改

    echo "*   soft    nofile  65535" >> /etc/security/limits.conf
    echo "*   hard    nofile  65535" >> /etc/security/limits.conf
    

    4、目录创建

    • 启动脚本及二进制文件目录 run
    • 数据存储目录 data
    • 配置文件目录/etc/minio
    mkdir -p /data/minio/{run,data} && mkdir -p /etc/minio
    

    5、集群启动文件

    vim /data/minio/run/run.sh
    
    • MINIO_ACCESS_KEY:用户名,长度最小是5个字符
    • MINIO_SECRET_KEY:密码,密码不能设置过于简单,不然minio会启动失败,长度最小是8个字符
    • –config-dir:指定集群配置文件目录
    #!/bin/bash
    export MINIO_ACCESS_KEY=Minio
    export MINIO_SECRET_KEY=Test1234!
    
    /data/minio/run/minio server --config-dir /etc/minio \
    http://10.10.0.1/data/minio/data \
    http://10.10.0.2/data/minio/data \
    http://10.10.0.3/data/minio/data \
    http://10.10.0.4/data/minio/data \
    

    6、minio.service

    • WorkingDirectory:二进制文件目录
    • ExecStart:指定集群启动脚本
    cat > /usr/lib/systemd/system/minio.service <<EOF
    [Unit]
    Description=Minio service
    Documentation=https://docs.minio.io/
    
    [Service]
    WorkingDirectory=/data/minio/run/
    ExecStart=/data/minio/run/run.sh
    
    Restart=on-failure
    RestartSec=5
    
    [Install]
    WantedBy=multi-user.target
    EOF
    

    7、二进制文件

    将minio二进制文件上传到/data/minio/run目录

    8、权限修改

    给所有涉及到的文件或目录添加权限

    • service文件
    • 二进制文件
    • 集群启动脚本
    chmod +x /usr/lib/systemd/system/minio.service && chmod +x /data/minio/run/minio && chmod +x /data/minio/run/run.sh
    

    9、启动集群

    systemctl daemon-reload
    systemctl enable minio && systemctl start minio
    

    10、代理集群

    生产环境需要使用Nginx将集群地址进行代理,对外统一入口

    upstream minio{
            server 10.10.0.1:9000;
            server 10.10.0.2:9000;
            server 10.10.0.3:9000;
            server 10.10.0.4:9000;
    }
    server {
            listen 9000;
            server_name minio;
            location / {
                    proxy_pass http://minio;
                    proxy_set_header Host $http_host;
                    client_max_body_size 1000m;
            }
    }
    

    11、测试

    浏览器访问minio集群代理地址+9000端口,用户名密码为上文中启动文件run.sh中我们设置的

    在这里插入图片描述

    展开全文
  • 开源项目-minio-minio-go.zip,Minio Go Library for Amazon S3 Compatible Cloud Storage.
  • Minio Snapshotter

    2020-12-09 09:34:55
    <div><p>Adds support for an S3 snapshotter via Minio. Replaces local storage in the compose example as a solution for https://github.com/autopilotpattern/mysql/issues/35.</p> <p>There was also the ...

空空如也

1 2 3 4 5 ... 20
收藏数 4,997
精华内容 1,998
关键字:

minio