Skip to content

Commit

Permalink
Add database configuration to allow connection from new Metabase server
Browse files Browse the repository at this point in the history
  • Loading branch information
rioug committed Dec 17, 2024
1 parent 8f702cd commit 81e1a46
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/server-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Make sure to clear cache so that instance settings are applied:
- [ ] remove DNS for temporary subdomain
- [ ] make sure the entries in ofn-install are up to date: remove the temporary entry made for the migration, and set the new IP address.
- [ ] validate that `provision.yml` still works. This will rename x-prod2 to x-prod
- [ ] check metabase sync if required: https://data.openfoodnetwork.org.uk/admin/databases/
- [ ] check metabase sync if required: https://data.openfoodnetwork.org/admin/databases/
- [ ] check n8n
- [ ] check backups are functioning
- Update documentation:
Expand Down
2 changes: 2 additions & 0 deletions inventory/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ default_hba_entries:
- {type: host, database: all, user: all, address: '::1/128', auth_method: md5}

custom_hba_metabase: {type: hostssl, database: "{{ db }}", user: "metabase", address: "167.99.89.242/32", auth_method: md5}
custom_hba_new_metabase: {type: hostssl, database: "{{ db }}", user: "metabase", address: "89.47.50.240/32", auth_method: md5}
custom_hba_new_metabase_IPv6: {type: hostssl, database: "{{ db }}", user: "metabase", address: "2001:1600:13:101::8d6/128", auth_method: md5}
custom_hba_n8n: {type: hostssl, database: "{{ db }}", user: "n8n", address: "128.199.44.140/32", auth_method: md5}
custom_hba_new_n8n: {type: hostssl, database: "{{ db }}", user: "n8n", address: "128.65.199.88/32", auth_method: md5}
custom_hba_new_n8n_IPv6: {type: hostssl, database: "{{ db }}", user: "n8n", address: "2001:1600:13:101::633/128", auth_method: md5}
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/app.katuma.org/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
2 changes: 2 additions & 0 deletions inventory/host_vars/coopcircuits.fr/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/openfood.hu/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/openfoodnetwork.be/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
2 changes: 2 additions & 0 deletions inventory/host_vars/openfoodnetwork.ca/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/openfoodnetwork.de/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/openfoodnetwork.ie/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
2 changes: 2 additions & 0 deletions inventory/host_vars/openfoodnetwork.net/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
5 changes: 4 additions & 1 deletion inventory/host_vars/openfoodnetwork.org.au/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
- { type: hostssl, database: "{{ db }}", user: zapier, address: '54.86.9.50/32', auth_method: md5 }
- { type: hostssl, database: "{{ db }}", user: zapier, address: '167.99.89.242/32', auth_method: md5 } # for metabase (data.openfoodnetwork.org.au)
- { type: hostssl, database: "{{ db }}", user: zapier, address: '167.99.89.242/32', auth_method: md5 } # for metabase (data.openfoodnetwork.org.uk)
- { type: hostssl, database: "{{ db }}", user: zapier, address: '89.47.50.240/32', auth_method: md5 } # for metabase (data.openfoodnetwork.org)

# Images settings
attachment_path: "public/images/spree/products/:id/:style/:basename.:extension"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/openfoodnetwork.org.nz/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/openfoodnetwork.org.uk/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/staging.coopcircuits.fr/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ swapfile_size: 1G

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/staging.openfoodnetwork.org.au/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down
2 changes: 2 additions & 0 deletions inventory/host_vars/staging.openfoodnetwork.org.uk/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ postgres_listen_addresses:

custom_hba_entries:
- "{{ custom_hba_metabase }}"
- "{{ custom_hba_new_metabase }}"
- "{{ custom_hba_new_metabase_IPv6 }}"
- "{{ custom_hba_n8n }}"
- "{{ custom_hba_new_n8n }}"
- "{{ custom_hba_new_n8n_IPv6 }}"
Expand Down

0 comments on commit 81e1a46

Please sign in to comment.