Small knowledge, big challenge! This paper is participating in theEssentials for programmers”Creative activities

Introduce MinIO

MinIO is a high-performance and distributed object storage system. It is a software product that runs 100% on standard hardware. Even low-cost machines such as X86 can run MinIO well.

Object storage server released under Apache License V2.0. It is compatible with Amazon S3 cloud storage service. It is best for storing unstructured data such as photos, videos, log files, backups and container /VM images. Objects can range in size from a few KB to a maximum of 5TB.

MinIO differs from traditional storage and other object storage in that its software architecture was designed from the outset to meet the higher performance requirements of private cloud standards. MinIO was originally designed for object storage only. So he designed it in a way that was easier to use. It was able to achieve all the functions required for object storage, but it was also more powerful in terms of performance. It did not compromise the ease of use and efficiency of MinIO for more business functions. The advantages of this result are that it is easier to implement the native object storage service with flexible scalability.

MinIO does a great job with traditional object storage use cases such as secondary storage, disaster recovery, and archiving. At the same time, it is unique in the storage technology of machine learning, big data, private cloud, hybrid cloud and so on. Of course, data analytics, high-performance application loads, and native cloud support are not excluded.

Recently miniO has been upgraded, and the upgraded version distinguishes API port and management port. For the convenience of demonstration, we use the previous version to explain, and the features of the new version are explained separately.

Storage architecture

Minio also provides storage architectures for different application scenarios:

Example 1: Single host, single disk

The following example hosts three tenants on a disk.

minio --config-dir ~/tenant1 server --address :9001 /data/tenant1
minio --config-dir ~/tenant2 server --address :9002 /data/tenant2
minio --config-dir ~/tenant3 server --address :9003 /data/tenant3
Copy the code

Example 2: Single Host, Multiple Disks (Erasure Code)

The following example hosts three tenants on multiple disks.

Distributed deployment

To host multiple tenants in a distributed environment, run multiple distributed MinIO instances simultaneously.

Example 3: Multiple Hosts, Multiple Disks (Erasure Code)

The following example hosts three tenants in a 4-node cluster. Execute the following command on all four nodes:

export MINIO_ACCESS_KEY=<TENANT1_ACCESS_KEY> export MINIO_SECRET_KEY=<TENANT1_SECRET_KEY> minio --config-dir ~/tenant1 Server - address: 9001 http://192.168.10.11/data/tenant1 http://192.168.10.12/data/tenant1 http://192.168.10.13/data/tenant1 http://192.168.10.14/data/tenant1 export MINIO_ACCESS_KEY = < TENANT2_ACCESS_KEY > export MINIO_SECRET_KEY=<TENANT2_SECRET_KEY> minio --config-dir ~/tenant2 server --address :9002 http://192.168.10.11/data/tenant2 http://192.168.10.12/data/tenant2 http://192.168.10.13/data/tenant2 http://192.168.10.14/data/tenant2 export MINIO_ACCESS_KEY = < TENANT3_ACCESS_KEY > export MINIO_SECRET_KEY=<TENANT3_SECRET_KEY> minio --config-dir ~/tenant3 server --address :9003 http://192.168.10.11/data/tenant3 http://192.168.10.12/data/tenant3 http://192.168.10.13/data/tenant3 http://192.168.10.14/data/tenant3Copy the code

Quick start

Run MinIO single point mode in Docker.

docker run -p 9000:9000 -d\
  -e "MINIO_ACCESS_KEY=ProEXEC" \
  -e "MINIO_SECRET_KEY=ONRPROEXEC" \
  -v /data/minio1:/data1 \
  minio/minio:RELEASE.2020-12-12T08-39-07Z server /data1
Copy the code

In the preceding example, MINIO_ACCESS_KEY and MINIO_SECRET_KEY are customized. If the following information is displayed on the console, the system is successfully started.

Interface function

Visit http://127.0.0.1:9000/ and enter your account password to enter:

The + button in the lower right corner of the page allows you to create a bucket and upload a file for simple management operations.

The simple file storage server is set up successfully. If you want to run in the background, add -d parameter when docker starts.

That’s enough for today, isn’t it? The next article will cover client tools and how to use the command line for administration.