Pigsty installs these certificate files on managed nodes:
/etc/pki/ca.crt # root:root 0644, root cert on all nodes
/etc/pki/ca-trust/source/anchors/ca.crt # EL system trust anchor
/usr/local/share/ca-certificates/ca.crt # Debian/Ubuntu system trust anchor
All infra nodes have these certificates:
/etc/pki/infra.crt # root:infra 0644, infra node cert
/etc/pki/infra.key # root:infra 0640, infra node key
If the admin node fails, files/pki and pigsty.yml should be available on the backup admin node. Use rsync to copy them:
# run on meta-1, rsync to meta2cd ~/pigsty;rsync -avz ./ meta-2:~/pigsty
INFRA FHS
The infra role creates infra_data (default: /data/infra) and creates a symlink /infra -> /data/infra.
The permissions for /data/infra are root:infra 0771. Subdirectories default to *:infra 0750, unless overridden:
This structure is created by: roles/infra/tasks/dir.yml, roles/infra/tasks/victoria.yml, roles/infra/tasks/register.yml, roles/infra/tasks/dns.yml, and roles/infra/tasks/env.yml.
NODE FHS
node_data specifies the node data directory. The default is /data, with owner root:root and mode 0755.
Most core components place their default data directories here. Some pilot modules use their own fixed paths. Native MySQL 8.4 currently uses /var/lib/mysql.
Pigsty starts HAProxy with its own systemd unit and manages the main configuration separately from service fragments:
/etc/systemd/system/haproxy.service # systemd unit rendered by Pigsty/etc/haproxy/haproxy.cfg # HAProxy main configuration/etc/haproxy/conf.d/*.cfg # node and PostgreSQL service fragments/etc/default/haproxy # optional user environment file; Pigsty does not create it
To append startup arguments in /etc/default/haproxy, use EXTRAOPTS and retain the default -S /run/haproxy-master.sock. The systemd unit loads configuration with explicit -f arguments. Do not add another -f to EXTRAOPTS.
Victoria FHS
Monitoring config has moved from the legacy /etc/prometheus layout to the /infra runtime layout.
The main template is roles/infra/templates/victoria/prometheus.yml, rendered to /infra/prometheus.yml.
Pigsty copies files/victoria/bin/* to /infra/bin/ and files/victoria/rules/* to /infra/rules/. Each module registers FileSD targets under /infra/targets/*.
Pigsty stores generated INFRA units in /etc/systemd/system/. These include vmetrics, vlogs, vtraces, vmalert, alertmanager, blackbox_exporter, nginx_exporter, and dnsmasq. Distribution package unit directories are not write targets for these roles.
PostgreSQL FHS
The following parameters and internal variables are related to PostgreSQL directory layout:
pg_dbsu_home: Postgres default user home directory, default: /var/lib/pgsql
On Ubuntu/Debian, the default PostgreSQL Deb package installation location is:
/usr/lib/postgresql/${pg_version}/bin
Pigsty also stores generated PostgreSQL runtime units in /etc/systemd/system/. These primarily include patroni.service, postgres.service, pgbouncer.service, pg_exporter.service, pgbackrest_exporter.service, and pgbouncer_exporter.service. If VIP is enabled, they also include vip-manager.service.
Pgbouncer FHS
Pgbouncer runs under the same user as {{ pg_dbsu }} (default postgres), with configs in /etc/pgbouncer.
pgbouncer.ini: main pool configuration (postgres:postgres 0640)
database.txt: pooled database definitions (postgres:postgres 0600)
The MINIO module currently deploys only Silo. It retains minio_* parameter and directory names for compatibility:
/etc/default/silo # root:minio 0640, service environment/etc/systemd/system/silo.service # root:root 0644, rendered by Pigsty/data/minio/ # minio:minio 0750, default data directory/infra/targets/minio/<cluster>-<seq>.yml # victoria:infra 0640, FileSD target/home/minio/.mcli/config.json # mcli alias; also written for the execution user
Silo certificates are stored in /home/minio/.minio/certs/. The module name, role parameters, data directory, and FileSD path retain the compatible MINIO / minio_* naming.
Redis FHS
Pigsty manages Redis or Valkey with the same directory layout and instance naming.
Service units call binaries according to redis_type (/bin/* is compatible with /usr/bin/* on most distributions):
Pigsty stores generated Redis/Valkey instance and exporter units in /etc/systemd/system/. Instance units use Type=notify. Packages can provide units in distribution directories. The roles do not write to those directories.