Setting up MinIO on gokrazy

MinIO is high-performance object storage that is API compatible to Amazons Simple Storage Service (S3), but is open source and written in Go. It can be used as a building block for applications involving file storage and file transmission and while its native to the cloud, it turns out one can also use it on gokrazy. :)

Since MinIO is a storage solution, you need to enable permanent storage on your gokrazy installation by running the mkfs command that gokr-packer prints. For more details, see Quickstart.

This article also assumes that you have an instance directory (with a go.mod) set up.

Step 1: Configuring the environment variables and command-line flags

You can find a detailed description on how to set the flags and environment vars in the article per-package configuration.





A few things can be noted here:

Step 2: Install MinIO to your gokrazy device

In your gokr-packer invocation (see Quickstart if you don’t have one yet), include the MinIO package:

gokr-packer \
  -update=yes \
  github.com/gokrazy/hello \
  github.com/gokrazy/breakglass \
  github.com/gokrazy/serial-busybox \

Step 3: Test whether the setup was successful

If you have the mc command installed you can check out whether your installation of MinIO really works:

$ mc alias set gokrazy http://gokrazy:3001 minio minio-on-gokrazy
Added `gokrazy` successfully.
$ mc ls gokrazy
$ mc mb gokrazy/testbucket
Bucket created successfully `gokrazy/testbucket`.
$ mc ls gokrazy
[2021-09-15 16:40:16 CEST]     0B testbucket/

Also check out the output in the logs on the gokrazy webinterface and login into the MinIO management console (http://gokrazy:3002 in this guide) to create service accounts view logs, bucket contents and more.