A testing environment for rapid experimentation with tuning and verifying the fault tolerance of MinIO clusters. All implemented using Docker and Terraform.
This lab enables quick validation of MinIO cluster configurations through infrastructure-as-code provisioning. The Terraform-based setup allows simulating real-world failure scenarios to verify cluster resilience.
-
Create/modify
terraform.tfvars
to define cluster topology. cluster_scheme is the primary configuration map:cluster_scheme = [ { name = "minio1", volumes = 4 }, { name = "minio2" volumes = 4 }, ]
-
volumes_def
representMINIO_VOLUMES
variable:volumes_def = "http://minio{1...2}/mnt/data{1...4}"
-
Other variables typically require minimal adjustments. For example, you can use a specific version of MinIO.
minio_image = "minio/minio:RELEASE.2025-04-22T22-12-26Z"
Just run terraform init
and terraform apply
. These commands interact with the Docker daemon and create the necessary objects.
A typical output will indicate which ports to use to access the containers, along with passwords and instructions. After this, you can go to the web interface on the first node using the URL: http://localhost:9001.
The environment includes a MinIO Client (mc) container for cluster management:
# Access client container
docker exec -it mc sh
# Example commands
mc admin info myminio
mc ls -r -versions myminio
See the ready-made examples in the examples/ directory. The terraform.tfvars
file must be copied to the root directory of the project
docker stop minio2 # Stop specific node
In this situation, a different definition of cluster_scheme
is used.
cluster_scheme = [
{
name = "minio1",
online_volumes = ["data1","data2"]
offline_volumes = [ ]
}
]
Move volume to offline_volumes section:
cluster_scheme = [
{
name = "minio1",
online_volumes = ["data1"]
offline_volumes = ["data2"]
}
]
then run terraform apply
.