Nodes managed by Pigsty will have the following certificate files installed:
/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 will have the following certificates:
/etc/pki/infra.crt # root:infra 0644, infra node cert
/etc/pki/infra.key # root:infra 0640, infra node key
When your admin node fails, the files/pki directory and pigsty.yml file should be available on the backup admin node. You can use rsync to achieve this:
# 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.
/data/infra permissions 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
The node data directory is specified by node_data, defaulting to /data, owned by root:root with mode 0755.
Most core components place their default data directories here. Some pilot modules use fixed paths of their own; 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 already loads configuration with explicit -f arguments, so 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.
files/victoria/bin/* and files/victoria/rules/* are synced to /infra/bin/ and /infra/rules/, while each module registers FileSD targets under /infra/targets/*.
Pigsty-rendered INFRA units are consistently stored in /etc/systemd/system/, including 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 EL-compatible distributions (using yum), PostgreSQL default installation location is:
/usr/pgsql-${pg_version}/
Pigsty creates a symlink named /usr/pgsql pointing to the actual version specified by the pg_version parameter, for example:
/usr/pgsql -> /usr/pgsql-18
Therefore, the default pg_bin_dir is /usr/pgsql/bin/, and this path is added to the system PATH environment variable, defined in: /etc/profile.d/pgsql.sh.
On Ubuntu/Debian, the default PostgreSQL Deb package installation location is:
/usr/lib/postgresql/${pg_version}/bin
Pigsty-rendered PostgreSQL runtime units are likewise stored in /etc/systemd/system/. They primarily include patroni.service, postgres.service, pgbouncer.service, pg_exporter.service, pgbackrest_exporter.service, pgbouncer_exporter.service, and vip-manager.service when VIP is enabled.
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, while retaining 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-rendered Redis/Valkey instance and exporter units are consistently stored in /etc/systemd/system/, and instance units use Type=notify. Package-provided units may still live in distribution directories, but those are not role write targets.