From a8c4c0395ab214d1abfc15957aa6bb5863a0a1cf Mon Sep 17 00:00:00 2001 From: Anton Iakimov Date: Fri, 29 Sep 2023 12:26:44 +0200 Subject: [PATCH] store-db: setup hosts and connection --- ansible/group_vars/store.yml | 4 ++++ ansible/main.yml | 7 +++++++ ansible/requirements.yml | 7 +++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ansible/group_vars/store.yml b/ansible/group_vars/store.yml index 10ed41e..5fdb1a1 100644 --- a/ansible/group_vars/store.yml +++ b/ansible/group_vars/store.yml @@ -30,6 +30,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/shards/"+stage+"/db/nim-waku")}}' +nim_waku_store_message_db_url: 'postgres://{{ nim_waku_store_message_db_user}}:{{ nim_waku_store_message_db_pass}}@store-db-01.{{ ansible_domain }}.wg:5432/{{nim_waku_store_message_db_name}}' nim_waku_store_message_retention_policy: 'time:2592000' # 30 days # DNS Discovery diff --git a/ansible/main.yml b/ansible/main.yml index 3503a1b..faaab0f 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -22,3 +22,10 @@ - { role: open-ports, tags: open-ports } - { role: swap-file, tags: swap-file } - { role: nim-waku, tags: nim-waku } + +- name: Configure Waku Storage DB Nodes + hosts: store-db + roles: + - { role: open-ports, tags: open-ports } + - { role: swap-file, tags: swap-file } + - { role: infra-role-postgres-ha, tags: postgres-ha } diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 731c071..27ad97e 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -25,6 +25,9 @@ - name: nim-waku src: git@github.com:status-im/infra-role-nim-waku.git - # TODO: update hash and find a working image to support topic argument change - version: 8044c33ffb92b3ee73cba677a090330ff638b70c + version: 5a96779773b1b5e1d34dd3be6e1a280151184447 + scm: git + +- name: infra-role-postgres-ha + src: git@github.com:status-im/infra-role-postgres-ha.git scm: git