Minio is a distributed object storage server built for cloud applications, which is similar to Amazon’s S3 Service.
Today, we will create the server on docker swarm, as I don’t currently have a external data store like GlusterFS / NFS etc, I will host the data on the manager node, and set a constraint for the service so that the service can only run on the manager node.
Prepare the Data Directory:
I will only rely on the manager node for my data, so on my manager node:
1
|
|
Create the Service:
If you have a Replicated Gluster Volume or NFS which is mounted throughout your docker swarm, you can create the directory path for it, and the update your --mount
source path to your external data store. In my case, I will just point it to my manager node’s /mnt/data
path as I have setup the service to only run on the one manager node in my swarm:
1 2 3 4 5 6 7 8 9 10 |
|
Install the AWS CLI Tools:
We will use the awscli tools to interact with our Minio Server:
1
|
|
Configure the Client:
Configure the awscli client with the access details that we passed in our docker service:
1 2 3 4 5 |
|
Create the Bucket:
Create a New Bucket, in this case news3bucket
1 2 |
|
List Buckets:
List our endpoint, to see the buckets on our server:
1 2 |
|
Upload an Object to your Bucket:
We will upload an image awsddb-1.png
to our new bucket:
1 2 |
|
List Bucket:
List your bucket, to see the uploaded object:
1 2 |
|
Download Object:
Download the image from your Bucket, and set the local file to file.png
:
1 2 |
|
Web Access:
You can also access Minio’s Web Interface on the port that you have exposed, in my case: http://MINIO-IP:9000/minio/
Resources:
- https://www.minio.io/
- https://docs.minio.io/docs/minio-docker-quickstart-guide
- https://github.com/minio/minio/blob/master/README.md
- https://github.com/arschles/minio-howto/blob/master/aws-cli-with-minio-server.md