Pigsty v1.5.0
Docker application support
Highlights
- Complete Docker support: enabled by default on meta node with many out-of-the-box software templates: bytebase, pgadmin, pgweb, postgrest, minio, etc.
- Infrastructure self-monitoring: Nginx, ETCD, Consul, Prometheus, Grafana, Loki self-monitoring
- CMDB upgrade: compatibility improvements, supports Redis cluster/Greenplum cluster metadata, config file visualization
- Service discovery improvements: Consul can auto-discover all monitoring targets and integrate with Prometheus
- Better cold backup support: default scheduled backup tasks,
pg_probackupbackup tool, one-click delayed replica creation - ETCD can now be used as PostgreSQL/Patroni DCS service, as an alternative to Consul
- Redis playbook/role improvements: now allows init and remove operations for individual Redis instances, not just entire Redis nodes
Monitoring System
Dashboards
- CMDB Overview: visualize Pigsty CMDB Inventory
- DCS Overview: view Consul and ETCD cluster monitoring metrics
- Nginx Overview: view Pigsty Web access metrics and logs
- Grafana Overview: Grafana self-monitoring
- Prometheus Overview: Prometheus self-monitoring
- INFRA Dashboard redesigned to reflect overall infrastructure status
Monitoring Architecture
- Now allows Consul for service discovery (when all services are registered to Consul)
- All Infra components now enable self-monitoring and register to Prometheus and Consul via
infra_registerrole - Metrics collector pg_exporter updated to v0.5.0, new features:
scaleanddefault, allowing metric multiplication factors and default values pg_bgwriter,pg_wal,pg_query,pg_db,pgbouncer_stattime-related metrics now uniformly scaled to seconds from milliseconds/microseconds- Related counter metrics in
pg_tablenow have default value0instead ofNaN pg_classmetrics collector removed by default, related metrics added topg_tableandpg_indexcollectorspg_table_sizemetrics collector now enabled by default with 300-second cache time
Deployment
- New optional package
docker.tgzwith common app images: Pgadmin, Pgweb, Postgrest, ByteBase, Kong, Minio, etc. - New ETCD role: automatically deploys ETCD service on DCS Server nodes and integrates with monitoring
pg_dcs_typespecifies DCS service for PG high-availability: Consul (default), ETCD (alternative)node_crontabparameter for configuring node scheduled tasks like database backups, VACUUM, statistics collection- New
pg_checksumoption: when enabled, database cluster enables data checksums (previously onlycrittemplate enabled by default) - New
pg_delayoption: when instance is Standby Cluster Leader, this parameter configures a delayed replica - New
pg_probackuppackage, default rolereplicatornow has backup-related function permissions - Redis deployment split into two parts: Redis node and Redis instance,
redis_portparameter controls specific instances - Loki and Promtail now installed via
fpm-built RPM packages - DCS3 config template now uses a 3-node
pg-metacluster with a single-node delayed replica
Software Upgrades
- PostgreSQL upgraded to 14.3
- Redis upgraded to 6.2.7
- PG Exporter upgraded to 0.5.0
- Consul upgraded to 1.12.0
- vip-manager upgraded to v1.0.2
- Grafana upgraded to v8.5.2
- Loki & Promtail upgraded to v2.5.0, using fpm packaging
Bug Fixes
- Fixed Loki and Promtail default config filename issues
- Fixed Loki and Promtail environment variable expansion issues
- Complete English documentation translation and revision; documentation JS resources now served locally, no internet access required
API Changes
New Parameters
node_data_dir: Main data mount path, created if doesn’t existnode_crontab_overwrite: Overwrite/etc/crontabinstead of appendingnode_crontab: Node crontab content to append or overwritenameserver_enabled: Enable nameserver on this infra node?prometheus_enabled: Enable prometheus on this infra node?grafana_enabled: Enable grafana on this infra node?loki_enabled: Enable loki on this infra node?docker_enable: Enable docker on this infra node?consul_enable: Enable consul server/agent?etcd_enable: Enable etcd server/client?pg_checksum: Enable pg cluster data checksums?pg_delay: Application delay when backup cluster leader replays replication
Parameter Redesign
*_clean is now a boolean parameter for cleaning existing instances during init.
*_safeguard is also a boolean parameter to prevent cleaning running instances during any playbook execution.
pg_exists_action->pg_cleanpg_disable_purge->pg_safeguarddcs_exists_action->dcs_cleandcs_disable_purge->dcs_safeguard
Parameter Renames
node_ntp_config->node_ntp_enablednode_admin_setup->node_admin_enablednode_admin_pks->node_admin_pk_listnode_dns_hosts->node_etc_hosts_defaultnode_dns_hosts_extra->node_etc_hostsnode_dns_server->node_dns_methodnode_local_repo_url->node_repo_local_urlsnode_packages->node_packages_defaultnode_extra_packages->node_packagesnode_packages_meta->node_packages_metanode_meta_pip_install->node_packages_meta_pipnode_sysctl_params->node_tune_paramsapp_list->nginx_indexesgrafana_plugin->grafana_plugin_methodgrafana_cache->grafana_plugin_cachegrafana_plugins->grafana_plugin_listgrafana_git_plugin_git->grafana_plugin_githaproxy_admin_auth_enabled->haproxy_auth_enabledpg_shared_libraries->pg_libsdcs_type->pg_dcs_type