Skip to content

Parameters

Fine-tune Pigsty customization using configuration parameters

Use inventory parameters to customize infrastructure settings and database configuration.


Parameter List

The files/cmdb.sql defaults define 399 public configuration parameters across 12 Pigsty modules. See Parameter Reference for the complete list.

ModuleGroupsParamsDescription
PGSQL10125PostgreSQL HA clusters, backups, and PITR
INFRA1073Software repositories and Victoria observability infrastructure
NODE1173Node initialization, system tuning, and operations baseline
ETCD213ETCD cluster and removal protection parameters
VAULT28OpenBao secrets clusters and removal safeguards
MINIO222Silo deployment, observability, and removal parameters
REDIS222Redis/Valkey deployment and removal parameters
DOCKER18Docker engine parameters
JUICE12JuiceFS instance and cache parameters
VIBE668Code/Jupyter/Node.js/Claude/Codex configuration
KAFKA219Kafka deployment and removal-protection parameters
MYSQL616Native MySQL 8.4 deployment, backups, monitoring, and removal
Total55399Default parameter records in files/cmdb.sql

cmdb.sql combines INFRA_ID and INFRA_PACKAGE into one group, giving INFRA 9 groups; documentation splits them into 10 for navigation. NODE also has the platform-derived node_tuned_profile_dir in defaults/main.yml, so the NODE parameter page lists 74 entries.


Parameter Form

Parameters are key-value pairs that describe entities. A key is a string. A value can be a boolean, string, number, array, or object.

all:                            # <------- Top-level object: all
  vars:
    admin_ip: 10.10.10.10       # <------- Global configuration parameter
  children:
    pg-meta:                    # <------- pg-meta group
      vars:
        pg_cluster: pg-meta     # <------- Cluster-level parameter
      hosts:
        10.10.10.10:            # <------- Host node IP
          pg_seq: 1
          pg_role: primary      # <------- Instance-level parameter

Parameter Priority

Set parameters at these levels, listed from highest to lowest priority:

LevelLocationDescriptionPriority
CLI-e command line argumentPassed via command lineHighest (5)
Host/Instance<group>.hosts.<host>Parameters specific to a single hostHigher (4)
Group/Cluster<group>.varsParameters shared by hosts in group/clusterMedium (3)
Globalall.varsParameters shared by all hostsLower (2)
Default<roles>/default/main.ymlRole implementation defaultsLowest (1)

These examples show parameter priority:

  • Set -e grafana_clean=true on the playbook command line to erase Grafana data.
  • Set host variable pg_role to override the PostgreSQL instance role.
  • Set group variable pg_cluster to override the PostgreSQL cluster name.
  • Set global variable node_ntp_servers to specify NTP servers.
  • If you do not set pg_version, Pigsty uses the pgsql role default, 18.

Except for identity parameters, all parameters have defaults. You do not need to set them explicitly.


Identity Parameters

Identity parameters identify entities. They have no defaults and must be set explicitly, with the exception below.

ModuleIdentity Parameters
PGSQLpg_cluster, pg_seq, pg_role, …
NODEnodename, node_cluster
ETCDetcd_cluster, etcd_seq
VAULTvault_cluster, vault_seq
MINIOminio_cluster, minio_seq
REDISredis_cluster, redis_node, redis_instances
KAFKAkafka_cluster, kafka_seq
MYSQLmysql_cluster, mysql_seq
INFRAinfra_seq

Exceptions are etcd_cluster and vault_cluster, which run on fixed groups and default to etcd and vault. Instance sequences etcd_seq and vault_seq still require explicit values. Object storage minio_cluster no longer has a default; define it in each object storage cluster’s variables. Do not set it in all.vars, which would mark every host as a MINIO member.

Was this page helpful?

Table reader