Setting up a Minio - S3 alternative for object storage on the edge

Published on March 23, 22

Hardware

Software

  • Synpse - provides app deployment, SSH and HTTPS access.
  • Minio - high-performance, S3 compatible object storage. MinIO is the only object storage suite available on every public cloud, every Kubernetes distribution, the private cloud and the edge.
  • Ubuntu 20.04.2 LTS image. Feel free to use Raspberry Pi OS (previously called Raspbian).
  • Docker - deploying containers on the edge devices prevents a lot of issues.

Intro

When developing applications on the edge you often ask yourself - where and how do I store my data? One option is to use the filesystem on the device itself but then once you need to have it shared with other applications you end up implementing an S3 like API. The good news is that you don’t really need to do that, with Minio being a lightweight service, it can power object storage anywhere from ARM SOCs, 5G POPs and edge caching devices to mini-datacenters.

Minio is written in Go (same as Synpse!) which enables it for simple cross-complication across multiple OS architectures. In this short article, we will deploy and connect to Minio on a Raspberry Pi.

Step 1: Register your device to Synpse

Head to the installation page and install the Synpse agent. It will allow you to deploy and manage applications on your device. While this guide was for a Raspberry Pi with an Ubuntu OS, it should work for all major Linux distributions and architectures (x86, arm64).

Step 2: Deploy Minio

First, create a secret minioPassword for our admin login (change it to something more secure):

Create secret and the app
Create secret and the app

The app yaml can be found below:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: minio
scheduling:
  type: Conditional
  selectors:
    type: rpi
spec:
  containers:
    - name: minio
      image: minio/minio:latest
      args:
        - server
        - /data
        - --console-address
        - :9001
      ports:
        - 9001:9001
        - 9000:9000
      volumes:
        - /data/minio:/data
      env:
        - name: MINIO_ROOT_USER
          value: minioadmin
        - name: MINIO_ROOT_PASSWORD
          fromSecret: minioPassword

Step 3: Open Minio console

Now, if you head to the device http://[DEVICE IP]:9001 you should be presented with the login screen to Minio console. Login and you can start using it:

Minio console
Minio console

Using Minio

For Minio docs you should visit their documentation at https://docs.min.io/minio/baremetal/introduction/minio-overview.html, however, we will demonstrate you few things to make your life easier.

Where does Minio store its files?

When working with file storage solutions it’s always good to know what’s the storage layout. It’s delightful to see that nothing insane has happened in this case and it’s completely predictable. Let’s create a bucket example and upload a random file:

Bucket with a file
Bucket with a file

Now, if we SSH into the device through the Synpse web terminal, we can see that the file can be found in the location corresponding to the bucket and file name!

Finding the same file on the disk
Finding the same file on the disk

How does auditing work?

Minio supports several backends for au

1
2
3
4
5
        ...
        - name: MINIO_AUDIT_WEBHOOK_ENABLE
          value: on
        - name: MINIO_AUDIT_WEBHOOK_ENDPOINT
          value: https://5y35kjdcvhxsv9j7zjei99.hooks.webhookrelay.com