Installing an S3 Cache Server from MinIO
Prerequisites
For downloading curl is needed.
Needed for setfacl the package acl is needed.
Download
Service
Check the releases at MinIO downloads and get the latest release url from there.
For example like:
curl --remote-name --remote-header-name --location --create-dirs -o ${HOME}/downloads\
https://dl.min.io/server/minio/release/linux-amd64/minio_20221129234049.0.0_amd64.deb
Client
Download the MinIO client call inconveniently mc like mc from Midnight Commander.
Installation
Service Installation
Create user minio-user for the service to run under.
Create a configuration file /etc/default/minio for the service.
# Volume to be used for MinIO server.
MINIO_VOLUMES="/mnt/data"
# Use if you want to run MinIO on a custom port.
MINIO_OPTS="--address :9199 --console-address :9001"
# Root user for the server.
MINIO_ROOT_USER=admin
# Root secret for the server.
MINIO_ROOT_PASSWORD=<the-admin-password>
# set this for MinIO to reload entries with 'mc admin service restart'
MINIO_CONFIG_ENV_FILE=/etc/default/minio
# Set redirection URL for the API on port 9199
MINIO_BROWSER_REDIRECT_URL="https://minio.scanframe.com"
Create the data directory and set the ownership so the service can access it.
In the LXC container which is used here no volume is mounted.
So directory/mnt/databeing used as regular directory.
Install the package (your version of course)
Client Installation
The client installation can be on any system.
In this case it is installed for the root user.
Create an alias called local to refer to since in this case the service is local.
And when the MinIO API is behind a proxy and the client is not on the same machine then create a remote alias.
Auto Updates with Cron
To make the service and client update automatically add this to you crontab.
The MAILTO is optional.
# Set the e-mail address.
MAILTO=log@scanframe.nl
# Check for update minio service every night a 01:10 for alias server called 'local'
10 1 * * * /root/minio-binaries/mc admin update local
# Check for update minio client every night a 01:20
20 1 * * * /root/minio-binaries/mc update
GitLab-Runner Configuration
Excerpt of the gitlab-runner config.
In this case the username is gitlab-runner and needs to be added.
As for the bucket gitlab it needs to be determined yet.
It is not working at the moment.
Maybe because the runner is not passing the hostname in the header
so the apache proxy does not route it properly.