72 lines
2.6 KiB
YAML

---
# Custom SSH accounts, should start from UID 8000.
bootstrap__active_extra_users:
- { name: ivan, uid: 8000, groups: ['docker', 'dockremap'], key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJBdm8y1PfWjT1pioaWJSZ2ETrUySb+dS/ifDg+VIpLY ivansete@status.im' }
- { name: hanno, uid: 8001, groups: ['docker', 'dockremap'], key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoFi19qWnAkvVdfzQQrPtXBozfeBEekoycGKIEdZarj hanno@status.im' }
- { name: tanya, uid: 8002, groups: ['docker', 'dockremap'], key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH9UsceZPWz8Lhtxbvo8ximWZnaSbOTqvl/tWrZ6enja tanya@status.im' }
postgres_ha_service_name: 'nim-waku-store-db'
postgres_ha_cont_image: 'postgres:15.1-alpine'
postgres_ha_is_master: true
postgres_ha_replica_enabled: false
postgres_ha_replica_allowed_addresses: []
postgres_ha_admin_user: 'postgres'
postgres_ha_admin_pass: '{{lookup("bitwarden", "fleets/status/"+stage+"/db/admin")}}'
# Disable backups since we have multiple DCs
postgres_ha_backup: false
postgres_ha_backup_enabled: false
postgres_ha_databases:
- name: 'nim-waku'
user: 'nim-waku'
pass: '{{lookup("bitwarden", "fleets/status/"+stage+"/db/nim-waku")}}'
# Avoid exceeding volume size with WAL log.
postgres_ha_alter_system_settings: '{{ postgres_system_setting_default | combine(postgres_system_setting_stage[stage])}}'
postgres_system_setting_default:
checkpoint_timeout: '5min'
max_locks_per_transaction: '2160'
postgres_system_setting_stage:
staging: {}
prod:
## The following are obtained from https://pgtune.leopard.in.ua/ (16GB RAM 8CPUs SSD PG version 15)
max_connections: '300'
shared_buffers: '4GB'
effective_cache_size: '12GB'
maintenance_work_mem: '1GB'
checkpoint_completion_target: '0.9'
wal_buffers: '16MB'
default_statistics_target: '100'
random_page_cost: '1.1'
effective_io_concurrency: '200'
work_mem: '10485kB'
huge_pages: 'off'
min_wal_size: '1GB'
max_wal_size: '4GB'
max_worker_processes: '8'
max_parallel_workers_per_gather: '4'
max_parallel_workers: '8'
max_parallel_maintenance_workers: '4'
## Autovacuum
autovacuum: 'off'
# For each 16GB of ram, 1 GB is set to share memory
postgres_share_memory: '{{ ansible_memtotal_mb / 16 | int }}m'
# Consul
postgres_ha_consul_check_interval: '60s'
postgres_ha_consul_check_timeout: '5s'
postgres_ha_consul_success_before_passing: 1
postgres_ha_consul_failures_before_warning: 5
postgres_ha_consul_failures_before_critical: 10
# Open PostgreSQL Port
open_ports_list:
postgres:
- { comment: 'PostgreSQL', port: '{{ postgres_ha_cont_port }}', ipset: '{{ env }}.{{ stage }}', iifname: 'wg0' }