Today I gonna tell you about great cloud-ready objects storage solution, Minio.

To understand, what's a purpose of this software, one should know about Amazon's Simple Storage Service (which is S3). To be short, this is a storage and it stores objects. It's still possible to scale it and build tons of logic over the basic functionality, such as sending notifications when specific event occurs.

As a first step, we would deploy single-host storage instance from Docker image. Right now I'm using Portainer to manipulate containers and it's super cool, but here I will show you generic command-line steps.

Let's create a container:

mkdir minio
docker run -d \
    --name minio \
    -p 9000:9000 \
    -v ${PWD}/minio/data:/data \
    -v ${PWD}/minio/conf:/root/.minio \
    minio/minio server /data

Well, we ran it in the background now, let's check an output to obtain secret and access keys, which were generated:

# docker logs minio
Created minio configuration file successfully at /root/.minio
Endpoint:  http://172.17.0.2:9000  http://127.0.0.1:9000
AccessKey: 5VJZMQJO0JDY19MJ9GQ2
SecretKey: A5tWRdLwULOX6+xsqGDm18te9m0BcOcnfANyt+Qq
...

Then we could visit http://localhost:9000/ and see the UI:

preview

One could create a bucket (you've read about S3 terminology, right?) upload files and obtain share links here.

It's also possible to manipulate things with command-line client. Yes, it is called mc, just like midnight commander. :(

mc config host add myminio http://localhost:9000 5VJZMQJO0JDY19MJ9GQ2 A5tWRdLwULOX6+xsqGDm18te9m0BcOcnfANyt+Qq S3v4
mc ls myminio

# Create a bucket
mc mb myminio/test

# Upload a file and generate download link
mc copy some-file myminio/test/
mc share download myminio/test/some-file

# Cleanup
mc rm -r --force myminio/test

What else?

Definitely, a great tool if you want to partially implement your own AWS for some reason.


Comments

comments powered by Disqus