73 lines
2.5 KiB
YAML
73 lines
2.5 KiB
YAML
---
|
|
hiera_include:
|
|
- profiles::sql::patroni
|
|
|
|
profiles::packages::include:
|
|
python3-devel: {}
|
|
libpq5-devel: {}
|
|
postgresql-devel: {}
|
|
|
|
postgresql_config_entries:
|
|
max_connections: 300
|
|
shared_buffers: '256MB'
|
|
|
|
profiles::sql::patroni::cluster_name: "patroni-puppetdb-%{facts.environment}"
|
|
profiles::sql::patroni::postgres_exporter_enabled: true
|
|
profiles::sql::patroni::postgres_exporter_user: postgres_exporter
|
|
profiles::sql::patroni::pgsql_version: "17"
|
|
patroni::bootstrap_pg_hba:
|
|
- 'local all postgres ident'
|
|
- 'host all all 0.0.0.0/0 md5'
|
|
- 'host replication repl 0.0.0.0/0 md5'
|
|
patroni::pgsql_pg_hba:
|
|
- 'local all postgres ident'
|
|
- 'host all all 0.0.0.0/0 md5'
|
|
- 'host replication repl 0.0.0.0/0 md5'
|
|
|
|
# FIXME: puppet-python wants to try manage python-dev, which is required by the ceph package
|
|
python::manage_dev_package: false
|
|
|
|
#consul::services:
|
|
# "%{hiera('profiles::sql::patroni::cluster_name')}":
|
|
# service_name: "%{hiera('profiles::sql::patroni::cluster_name')}"
|
|
# tags:
|
|
# - 'puppet'
|
|
# - 'puppetdb'
|
|
# - 'database'
|
|
# address: "%{facts.networking.ip}"
|
|
# port: 5432
|
|
# checks:
|
|
# - id: 'psql-check'
|
|
# name: 'PostgreSQL Health Check'
|
|
# args:
|
|
# - '/usr/local/bin/check_consul_postgresql'
|
|
# interval: '10s'
|
|
# timeout: '1s'
|
|
profiles::consul::client::node_rules:
|
|
- resource: service
|
|
segment: "%{hiera('profiles::sql::patroni::cluster_name')}"
|
|
disposition: write
|
|
- resource: service_prefix
|
|
segment: "%{hiera('profiles::sql::patroni::cluster_name')}"
|
|
disposition: write
|
|
- resource: key_prefix
|
|
segment: "service/%{hiera('profiles::sql::patroni::cluster_name')}"
|
|
disposition: write
|
|
- resource: session_prefix
|
|
segment: ""
|
|
disposition: write
|
|
|
|
profiles::yum::global::repos:
|
|
postgresql-17:
|
|
name: postgresql-17
|
|
descr: postgresql-17 repository
|
|
target: /etc/yum.repos.d/postgresql.repo
|
|
baseurl: https://packagerepo.service.consul/postgresql/rhel%{facts.os.release.major}/17-daily/%{facts.os.architecture}/os
|
|
gpgkey: https://packagerepo.service.consul/postgresql/rhel%{facts.os.release.major}/17-daily/%{facts.os.architecture}/os/PGDG-RPM-GPG-KEY-RHEL
|
|
postgresql-common:
|
|
name: postgresql-common
|
|
descr: postgresql-common repository
|
|
target: /etc/yum.repos.d/postgresql.repo
|
|
baseurl: https://packagerepo.service.consul/postgresql/rhel%{facts.os.release.major}/common-daily/%{facts.os.architecture}/os
|
|
gpgkey: https://packagerepo.service.consul/postgresql/rhel%{facts.os.release.major}/common-daily/%{facts.os.architecture}/os/PGDG-RPM-GPG-KEY-RHEL
|