# Pigsty v1.5.0

> Docker application support

---

LLMS index: [llms.txt](/llms.txt)

---

**v1\.5\.0 · 2022-05-22**
- [View release](https://github.com/pgsty/pigsty/releases/tag/v1.5.0)
- [Source · tar\.gz](https://github.com/pgsty/pigsty/archive/refs/tags/v1.5.0.tar.gz)
- [Source · zip](https://github.com/pgsty/pigsty/archive/refs/tags/v1.5.0.zip)
- [pgsty\/pigsty](https://github.com/pgsty/pigsty)

### 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_probackup` backup 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_register` role
* Metrics collector pg_exporter updated to v0.5.0, new features: `scale` and `default`, allowing metric multiplication factors and default values
* `pg_bgwriter`, `pg_wal`, `pg_query`, `pg_db`, `pgbouncer_stat` time-related metrics now uniformly scaled to seconds from milliseconds/microseconds
* Related counter metrics in `pg_table` now have default value `0` instead of `NaN`
* `pg_class` metrics collector removed by default, related metrics added to `pg_table` and `pg_index` collectors
* `pg_table_size` metrics collector now enabled by default with 300-second cache time

### Deployment

* New optional package `docker.tgz` with 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_type` specifies DCS service for PG high-availability: Consul (default), ETCD (alternative)
* `node_crontab` parameter for configuring node scheduled tasks like database backups, VACUUM, statistics collection
* New `pg_checksum` option: when enabled, database cluster enables data checksums (previously only `crit` template enabled by default)
* New `pg_delay` option: when instance is Standby Cluster Leader, this parameter configures a **delayed replica**
* New `pg_probackup` package, default role `replicator` now has backup-related function permissions
* Redis deployment split into two parts: Redis node and Redis instance, `redis_port` parameter controls specific instances
* Loki and Promtail now installed via `fpm`-built RPM packages
* DCS3 config template now uses a 3-node `pg-meta` cluster 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 exist
- `node_crontab_overwrite`: Overwrite `/etc/crontab` instead of appending
- `node_crontab`: Node crontab content to append or overwrite
- `nameserver_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_clean`
- `pg_disable_purge` -> `pg_safeguard`
- `dcs_exists_action` -> `dcs_clean`
- `dcs_disable_purge` -> `dcs_safeguard`

## Parameter Renames

- `node_ntp_config` -> `node_ntp_enabled`
- `node_admin_setup` -> `node_admin_enabled`
- `node_admin_pks` -> `node_admin_pk_list`
- `node_dns_hosts` -> `node_etc_hosts_default`
- `node_dns_hosts_extra` -> `node_etc_hosts`
- `node_dns_server` -> `node_dns_method`
- `node_local_repo_url` -> `node_repo_local_urls`
- `node_packages` -> `node_packages_default`
- `node_extra_packages` -> `node_packages`
- `node_packages_meta` -> `node_packages_meta`
- `node_meta_pip_install` -> `node_packages_meta_pip`
- `node_sysctl_params` -> `node_tune_params`
- `app_list` -> `nginx_indexes`
- `grafana_plugin` -> `grafana_plugin_method`
- `grafana_cache` -> `grafana_plugin_cache`
- `grafana_plugins` -> `grafana_plugin_list`
- `grafana_git_plugin_git` -> `grafana_plugin_git`
- `haproxy_admin_auth_enabled` -> `haproxy_auth_enabled`
- `pg_shared_libraries` -> `pg_libs`
- `dcs_type` -> `pg_dcs_type`

## Sources

- [GitHub release](https://github.com/pgsty/pigsty/releases/tag/v1.5.0)
- [Pigsty v1.5 release article](https://pigsty.io/blog/pigsty/v1.5/)
- [Historical About / Release Note](https://pigsty.io/docs/about/release/#v150)
- [Source comparison: `v1.4.1...v1.5.0`](https://github.com/pgsty/pigsty/compare/v1.4.1...v1.5.0)
