MinIO object storage
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. :)
Step 1: Install MinIO to your gokrazy device
Add the minio program to your gokrazy instance:
Step 2: Configuring the environment variables and command-line flags
Then, open your instance’s config.json in your editor:
And configure Package config: Command-line flags and Package config: Environment variables:
Then, deploy as usual:
A few things can be noted here:
-
There are nice practical examples on the different options once you execute
minio server --helpif you have it installed locally or more advanced use cases in the official MinIO docs. -
The ports for the storage server and console do not have to be explicitly set, but for me the default port collided with another service (Port 9000). If no port is set the console just chooses an arbitrary free one.
-
For some reason the
HOMEvariable has to be set to the storage folder. See Issue #12641 on why that is the case. As default gokrazy setsHOMEtoHOME=/perm/<cmd>, so if you want to change your storage location to something different modify theEnvironmentfield accordingly.
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:
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.