PIGSTY

Playbook

control primitives

You have to configure minio cluster in the config inventory before running the playbook.


Playbook

There are two built-in playbooks for MinIO cluster management:

minio.yml

minio.yml

  • minio-id : generate minio identity
  • minio_install : install minio/mcli
    • minio_os_user : create os user minio
    • minio_pkg : install minio/mcli package
    • minio_clean : remove minio data (not default) - DEPRECATED since v3.6+
    • minio_dir : create minio directories
  • minio_config : generate minio config
    • minio_conf : minio main config
    • minio_cert : minio ssl cert
    • minio_dns : write minio dns records
  • minio_launch : launch minio service
  • minio_register : register minio to prometheus
  • minio_provision : create minio aliases/buckets/users
    • minio_alias : create minio client alias
    • minio_bucket : create minio buckets
    • minio_user : create minio biz users

Architecture Change: Pigsty v3.6+

Since Pigsty v3.6+, the minio.yml playbook and minio role are focused solely on cluster installation. All removal operations have been moved to the dedicated minio-rm.yml playbook using the minio_remove role.

Trusted ca file: /etc/pki/ca.crt should exist on all nodes already. which is generated in role: ca and loaded & trusted by default in role: node.

You should install MINIO module on Pigsty-managed nodes (i.e., Install NODE first)


minio-rm.yml

To remove the MinIO cluster, run the following playbook:

./minio-rm.yml    # remove MinIO cluster

Here are available sub tasks:

  • minio-id : generate minio identity for removal operations
  • minio_safeguard : safeguard against accidental removal (default: false)
  • prometheus : remove minio targets registration from prometheus
  • minio_svc : stop and disable minio service with systemd
  • minio_data : remove minio data (disable with minio_rm_data=false)
  • minio_pkg : uninstall minio packages (enable with minio_rm_pkg=true)

The removal playbook uses the new minio_remove role with configurable parameters:

  • minio_safeguard: Prevents accidental removal when set to true
  • minio_rm_data: Controls whether MinIO data is deleted (true by default)
  • minio_rm_pkg: Controls whether MinIO packages are uninstalled (false by default)

Commands

MINIO Playbook cheatsheet and common commands

./minio.yml -l <cls>                      # init MINIO module on group <cls>
./minio-rm.yml -l minio                   # remove MinIO cluster using dedicated removal playbook
./minio.yml -l minio -t minio_install     # install MinIO, setup dirs, without configure & launch
./minio.yml -l minio -t minio_config      # generate MinIO config & certs
./minio.yml -l minio -t minio_launch      # restart MinIO cluster