Deploying minio to sloppy.io

Minio is a s3 compatible, distributed object storage server written in go. It comes with a server, a CLI, and a neat UI:

browser

Like for all new cool projects, there is an official docker container for minio, so it takes just a few seconds to test it locally or to deploy it to sloppy.io. As it is very lightweight, you can start minio even within our 14-day trial and connect persistent storage to it. Let’s get started and click “Create a new project” in our dashboard.

Then:

  1. Name your project.
  2. Name your service
  3. Click on settings

Once in “Settings,” do the following:

  1. Give your app a name.
  2. Choose the official minio image “minio/minio  (While typing the official dockerhub is being searched)
  3. Choose a tag/version of that image. I will go with “RELEASE.2017-08-05T00-00-53Z”
  4. CMD is minio server /export to start minio as a server and use /export as the directory for our data. The same directory was added as a volume automatically.
  5. Choose a free *.sloppy.zone domain.
  6. The exposed port should already be filled as sloppy.io  is reading the manifest file from the docker image.

“/export” is the path where minio writes its data. Because the people from minio.io defined this path in the Dockerfile (well done ;)!), sloppy.io takes this info and adds this volume for you.

And that’s it! Click “Deploy project” and sloppy.io will start with the deployment. Now, click “Analytics” and check the “Live Logs.” Here you will find the access key and the secret key. You will need this info to login into you minio server.

Click the web link of your app to open the minio UI…

 

and use the secret keys to log in:

Now you can create a bucket for your files…

 

 

 

and upload something:

Now we have saved a file in our minio object store. Let’s check it via CLI. Get the right version for you at https://docs.minio.io/docs/minio-client-quickstart-guide.

I am on linux so;

curl -SLO https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod +x mc

did the trick for me. Next, we tell the minio CLI which minio server to connect to. The syntax is:

./mc config host add ALIAS URL ACCESS-KEY SECRET-KEY

This is what it does for me (change it to your uri and secret keys):

./mc config host add mystuff https://mimi.sloppy.zone F3N1RZ46DAFASZQIZYDK yJfso1x4Q5pyWHzas33VjoicKi5rWTMg1In/9yny

Check the folder we uploaded the file to:

./mc ls mystuff/yay

And you should be able to see the file you uploaded via the browser. Try uploading via CLI

./mc cp joomla.jpg mystuff/yay

where joomla.jpg can be any file on your PC.

minio comes with a lot of cool features like sharing links with an expiration date:

Docs are well written and there are a lot of examples on how to use it. Check it out in seconds at sloppy.io

Don’t have a sloppy.io account yet? Sign up now, it’s free.