Use self-managed object storage with MinIO
Learn how to use self-managed object storage with MinIO.
Harness Self-Managed Enterprise Edition enables you to configure self-managed object storage with MinIO. MinIO is an object storage server designed for large-scale private cloud infrastructure. It aggregates persistent volumes into scalable distributed object storage using Amazon S3 REST APIs.
You can install MinIO on your preferred VMs and provide the endpoint in your Harness Helm charts. This topic describes how to set up 4 MinIO servers.
IMPORTANT NOTICE: RETENTION POLICY SUPPORT FOR MINIO BUCKETS
Retention policies for MinIO buckets are now supported and can be configured through bootstrap overrides to automatically delete older pipeline logs, helping manage storage costs and prevent disk space issues.
This feature is disabled by default and must be explicitly enabled. By default, enabling it will delete logs older than 1 year. You can customize the retention period as needed. Changes may take up to 24 hours to apply due to MinIO’s internal scheduling. Always ensure you have appropriate backups to avoid accidental data loss.
Enable Default 1-Year Deletion Policy
To enable with the default 1-year expiration, no need to specify the duration:
database:
minio:
provisioning:
enabled: trueCustomize the Retention Period
To extend the retention period (e.g., 2 years), update the override as follows:
database:
minio:
provisioning:
enabled: true
buckets:
- name: "logs"
lifecycle:
- id: LogServiceRetentionPolicy
expiry:
days: 720 # 2 yearsMinIO prerequisites
Make sure to meet the MinIO prerequisites before you set up self-managed object storage. For prerequisites, go to Object Storage for Linux in the MinIO documentation.
MinIO hardware requirements
4 VMs
4 cores per VM
8 GB memory per VM
100 GB disk per VM (SSD preferred)
1GB/s minimum network bandwidth
Ubuntu 20.04 LTS operating system
Nginx hardware requirements
1 VM
4 cores per VM
8 GB memory per VM
1GB/s minimum network bandwidth
Ubuntu 20.04 LTS operating system
Example passwords used in this tutorial are for instructional purposes only. Replace the examples with your own secure passwords. Harness recommends following your organization's standards for password security, including the use of strong passwords. Strong passwords are:
At least 12 characters long. Longer passwords are more secure.
Any combination of uppercase letters, lowercase letters, numbers, and symbols.
Not a word in the dictionary of any language or the name of a person, place, character, or organization.
Unique for each account.
Create an Nginx LoadBalancer VM
To set up MinIO, you must first create a VM for the Nginx LoadBalancer with the above hardware requirements.
To create a new VM instance for the Nginx load balancer, do the following:
Select the machine type based on the hardware requirements for Nginx.
Change the boot disk to Ubuntu 20.04 LTS.
Reserve an internal static IP address.
Reserve an external static IP address.
Create the MinIO server VMs
Next, you must create 4 VMs with the MinIO hardware requirements.
To create the MinIO server VMs, do the following:
Create a new VM instance with the following configuration.
Select the machine type based on the hardware requirements.
Change the boot disk to Ubuntu 20.04 LTS.
Reserve an internal static IP address.
Attach an additional disk to the VM.
Set up the Nginx load balancer
Next, set up the Nginx load balancer.
To set up the Nginx load balancer, do the following:
SSH into the Nginx VM, and install Nginx. For installation instructions, go to Linux packages in the Nginx documentation.
Add the sequential hostnames for your MinIO server instances to your
/etc/hostsfile (internal IPs should be MinIO instances).Add the following to the
/etc/nginx/sites-enabled/minio.conffile.Run the following to start Nginix.
Set up MinIO servers
Now you are ready to set up your MinIO servers.
To configure your MinIO servers, do the following:
SSH into one of your MinIO VMs.
Create a
minio-useruser and group.Attach the disk device name to the VM using
sudo lsblk. For example:
Run the following to format the disk.
Run the following to mount the disk.
Change the disk permissions and user.
Add hostnames in sequential order in your
/etc/hostsfile.Download and install MinIO.
Add the following to your
/etc/default/miniofile.Start the MinIO service.
Check the MinIO status.
Repeat the process for your other three VMs.
Test MinIO connectivity
To test your MinIO connectivity, do the following:
Go to
http://<NGINX_VM_EXTERNAL_IP>, and sign in using the username and password in your/etc/default/miniofile.Create a bucket and upload a test file.
SSH into one of your MinIO VMs.
Check the contents in the
/mnt/disks/disk1/disk.
Configure your Harness environment and Helm chart
Now you're ready to configure your Harness Self-Managed Enterprise Edition environment and Helm chart.
To configure your Harness environment and Helm chart, do the following:
Create a secret in the namespace where Harness is installed with the following data.
Set the following overrides for your installed MinIO with Harness.
Last updated
Was this helpful?