ansible: setup postgres store db
This commit is contained in:
parent
66da797fb2
commit
b37acdf4b9
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
|
||||
postgres_ha_service_name: 'nim-waku-db'
|
||||
postgres_ha_cont_image: 'postgres:15.1-alpine'
|
||||
|
||||
postgres_ha_is_master: true
|
||||
postgres_ha_replica_allowed_addresses: []
|
||||
|
||||
postgres_ha_admin_user: 'postgres'
|
||||
postgres_ha_admin_pass: '{{lookup("bitwarden", "fleets/waku/"+stage+"/db/admin")}}'
|
||||
|
||||
postgres_ha_databases:
|
||||
- name: 'nim-waku'
|
||||
user: 'nim-waku'
|
||||
pass: '{{lookup("bitwarden", "fleets/waku/"+stage+"/db/nim-waku")}}'
|
||||
|
||||
# Open PostgreSQL Port
|
||||
open_ports_default_comment: '{{ postgres_ha_service_name }}'
|
||||
open_ports_default_chain: 'SERVICES'
|
||||
open_ports_default_protocol: 'tcp'
|
||||
open_ports_list:
|
||||
- { port: '{{ postgres_ha_cont_port }}', ipset: '{{ env }}.{{ stage }}' }
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
# Tag dependent on fleet: test
|
||||
# TODO: change to waku with CI on
|
||||
nim_waku_cont_tag: 'deploy-wakuv2-{{ stage }}'
|
||||
nim_waku_cont_tag: 'deploy-shards-{{ stage }}'
|
||||
nim_waku_cont_name: 'nim-waku'
|
||||
nim_waku_log_level: 'debug'
|
||||
nim_waku_protocols_enabled: ['relay', 'filter', 'lightpush', 'peer-exchange']
|
||||
nim_waku_protocols_enabled: ['relay', 'store', 'filter', 'lightpush', 'peer-exchange']
|
||||
nim_waku_disc_v5_enabled: true
|
||||
nim_waku_dns4_domain_name: '{{ dns_entry }}'
|
||||
nim_waku_node_key: '{{lookup("bitwarden", "fleets/waku/"+stage+"/nodekeys", field=hostname)}}'
|
||||
nim_waku_node_key: '{{lookup("bitwarden", "fleets/"+env+"/"+stage+"/nodekeys", field=hostname)}}'
|
||||
|
||||
# Subscribe to all shards
|
||||
nim_waku_pubsub_topics:
|
||||
|
@ -32,6 +32,10 @@ nim_waku_rpc_tcp_port: 8545
|
|||
nim_waku_p2p_max_connections: 300
|
||||
|
||||
# Store
|
||||
nim_waku_store_message_db_name: 'nim-waku'
|
||||
nim_waku_store_message_db_user: 'nim-waku'
|
||||
nim_waku_store_message_db_pass: '{{lookup("bitwarden", "fleets/"+env+"/"+stage+"/db/nim-waku")}}'
|
||||
nim_waku_store_message_db_url: 'postgres://{{ nim_waku_store_message_db_user}}:{{ nim_waku_store_message_db_pass}}@node-db-01.{{ ansible_domain }}.wg:5432/{{nim_waku_store_message_db_name}}'
|
||||
nim_waku_store_message_retention_policy: 'time:2592000' # 30 days
|
||||
|
||||
# DNS Discovery
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
changed_when: false
|
||||
|
||||
- name: Configure Waku Nodes
|
||||
hosts:
|
||||
- waku
|
||||
hosts: node
|
||||
roles:
|
||||
- { role: open-ports, tags: open-ports }
|
||||
- { role: swap-file, tags: swap-file }
|
||||
|
@ -19,3 +18,10 @@
|
|||
# - { role: conn-limit, tags: conn-limit }
|
||||
- { role: certbot, tags: certbot }
|
||||
- { role: nim-waku, tags: nim-waku }
|
||||
|
||||
- name: Configure Waku Storage DB Nodes
|
||||
hosts: node-db
|
||||
roles:
|
||||
- { role: open-ports, tags: open-ports }
|
||||
- { role: swap-file, tags: swap-file }
|
||||
- { role: infra-role-postgres-ha, tags: postgres-ha }
|
||||
|
|
|
@ -28,3 +28,7 @@
|
|||
version: 0b0cbbe576f2facb6f9fea17b8c722bb8b36edca
|
||||
scm: git
|
||||
|
||||
- name: infra-role-postgres-ha
|
||||
src: git@github.com:status-im/infra-role-postgres-ha.git
|
||||
version: 8c10ac4c08681580dd5e60046178631579ef980e
|
||||
scm: git
|
||||
|
|
Loading…
Reference in New Issue