Deploy with Pigsty
The minio_backend: postgres branch in the Pigsty minio Ansible role is pinned to an unpublished coordination commit (5633285b2b8d40321e458026abe2656944674ed3) and depends on the unpublished silo DEB/RPM packages (MVP in progress). Released versions of Pigsty do not yet include this backend branch.
The coordinated Pigsty minio role adds a minio_backend: postgres execution path to minio.yml. It deploys silo systemd services connected to an existing PostgreSQL database without inheriting erasure-coded disk arguments or local volume mounts.
Scope and prerequisites
- The role deploys stateless
silogateways only; it does not create the PostgreSQL cluster, database owner (silo_owner), orsilodatabase, and it does not configure database backups. Complete the database setup in Install first. minio_pg_dsnmust be a single-hostpostgresql://URI with an explicit username, database name,sslmode=verify-full, andsslrootcertmatchingminio_pg_ca_file(located under/etc/silo/). The role rejects multi-host fallback URIs and query parameters that override connection identity.- Certificates used by the gateway must include
127.0.0.1in their IP SANs because the role’s post-start health check probeshttps://127.0.0.1:9000/minio/health/cluster(for writable gateways) or/minio/health/cluster/read(for read-only gateways) with strict TLS verification.
Example two-gateway inventory
Store credentials (vault_silo_root_user, vault_silo_root_password, and URL-encoded vault_silo_pg_dsn) in an encrypted Ansible Vault file (vault.yml), and define the two-gateway silo_pg group in inventory.yml:
Setting minio_buckets: [] and minio_users: [] skips Pigsty’s default pgbackrest backup bucket/user creation so database backups are never stored inside the pgsilo service that depends on that same database.
Deploy the first writable gateway alone (-l 10.10.10.11 -e minio_provision=false) so it initializes the PostgreSQL schema without racing a second node, then run the playbook across the group:
What the role configures
| Component | Behavior in minio_backend: postgres |
|---|---|
| Package & binary verification | Copies the local .deb/.rpm from minio_pg_package_src, verifies minio_pg_package_sha256, installs it, and verifies /usr/bin/silo against minio_pg_binary_sha256 |
| OS account | Runs the service as minio:minio (minio_user defaults to minio, whereas manual DEB installation uses silo:silo) |
| Service & environment | Writes /etc/systemd/system/silo.service and /etc/default/silo (root:minio, mode 0640) with no_log secret protection |
| TLS certificates | Places public.crt and private.key in /home/<minio_user>/.minio/certs/ and the PostgreSQL CA at /etc/silo/postgres-ca.crt |
| Read-only gateways | Setting minio_pg_read_only: true on a standby gateway host configures SILO_PG_READ_ONLY=on, skips bucket/user provisioning, and probes /minio/health/cluster/read |
| Monitoring | Defaults MINIO_PROMETHEUS_AUTH_TYPE=public in the environment template and provides the files/grafana/minio/silo-pg.json dashboard; restrict metrics network access or override to jwt authentication |
Note that re-running minio.yml across nodes does not replace the stop-all-writers procedure required for a schema migration; follow Upgrade whenever schema_version changes.
