Skip to content

MinIO Role

Overview

MinIO provides S3-compatible object storage for testing backup workflows and object storage integrations without incurring AWS costs. This role deploys MinIO as a rootless Podman container, offering a web-based management console, versioning, and policy-based access control.

Requirements

  • Podman 4.x or later
  • Systemd
  • A user with sudo access

Installation / Quick Start

Orchestrator

# Prepare
./manage-svc.sh minio prepare

# Deploy
./manage-svc.sh minio deploy

# Verify
./svc-exec.sh minio verify

Role Variables / Configuration

Key Variables

Name Description Default
minio_state present to install, absent to remove. present
minio_data_dir The directory to store MinIO data. "~/minio-data"
minio_api_port The port for the S3 API. 9000
minio_console_port The port for the web console. 9001
minio_root_user The root access key for MinIO. minioadmin
minio_root_password The root secret key for MinIO. your_secure_password

Usage

After deployment, MinIO is accessible via: - S3 API: http://localhost:9000 - Web Console: http://localhost:9001

Web Console

  1. Open http://localhost:9001 in your browser.
  2. Log in with the configured root credentials (minio_root_user and minio_root_password).
  3. Create buckets, manage users and policies, and upload/download files.

AWS CLI Integration

You can configure AWS CLI to interact with MinIO:

# Configure AWS CLI (profile name: minio)
aws configure --profile minio
# AWS Access Key ID: minioadmin (or your configured root user)
# AWS Secret Access Key: your_password (or your configured root password)
# Default region: us-east-1
# Default output format: json

# Example: Create a bucket
aws --profile minio --endpoint-url http://localhost:9000 s3 mb s3://mybucket

MC Client (MinIO Client)

# Install mc (if not already installed)
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc

# Add alias
./mc alias set minio http://localhost:9000 minioadmin your_password

# Example: Create a bucket
./mc mb minio/mybucket

Service Management

# Check status
systemctl --user status minio-pod

# View logs
podman logs minio-svc

# Restart
systemctl --user restart minio-pod

Troubleshooting

Cannot Access Console

  1. Check service running: systemctl --user status minio-pod
  2. Verify ports are correct: podman port minio-svc
  3. Check logs for errors: podman logs minio-svc

S3 API Errors

  1. Verify credentials.
  2. Check the endpoint URL (http://localhost:9000).
  3. Review bucket policies and region settings.

Role-Specific Sections

Bucket Management

  • Versioning: Enable mc version enable minio/mybucket.
  • Policies: Set public read mc anonymous set download minio/mybucket.
  • Lifecycle Rules: Add expiration rule mc ilm add --expiry-days 30 minio/mybucket.

User Management

You can create users and assign policies using the mc admin command.

Backup

# Backup entire data directory
tar czf minio-backup-$(date +%Y%m%d).tar.gz ~/minio-data

# Mirror buckets
./mc mirror minio/source-bucket minio/backup-bucket

Removal

# Remove but keep data
./manage-svc.sh minio remove

# Complete removal (deletes data)
./manage-svc.sh minio remove -e minio_delete_data=true

Reference

License

MIT

Author

Created by jackaltx and Claude.