Posgres database
Supported Postgres versions: 11-15
Posgis extension: Facultative
SSL connection: Supported
Configure phppgadmin
Use internal postgres
No yet documented
Use external postgres
Edit your inventory file inventories/<your inventory>/group_vars/regards_nodes/main.yml
phppgadmin:
[ ... ]
db:
- name: DB Instance
host: database-inst.cnes.fr
port: 5432
defaultdb: <instance database name>
theme: cappuccino
- name: DB Project
host: database-first-project.cnes.fr
port: 5432
defaultdb: <first project database name>
theme: cappuccino
setting_main_theme: cappuccino
Use external postgres
Edit your inventory file inventories/<your inventory>/group_vars/regards_nodes/main.yml
- add connection information
group_config_mservices:
[ ... ]
postgres:
instance:
host: database-inst.cnes.fr
port: 5432
db: <instance database name>
user: <some user>
password: "{{ regards_vault.group_config_mservices.postgres.instance.password }}"
ssl:
mode: disable | allow | prefer | require
init_project:
host: database-first-project.cnes.fr
port: 5432
db: <first project database name>
user: <some user>
password: "{{ regards_vault.group_config_mservices.init_project.instance.password }}"
The option ssl.mode can be omitted, its default value being prefer. More details about this value and other
supported value are available in
Postgres documentation under the section
Table 32.1. SSL Mode Descriptions.
- (optional) use a different database for the
rs-processingmicroservice
By default, rs-processing uses the database defined under the section group_config_mservices.postgres.instance.
To use a different database for this microservice, add this section:
group_config_mservices:
[ ... ]
processing:
db:
host: database-processing.cnes.fr
port: 5432
db: <processing database name>
user: <some user>
password: "{{ regards_vault.group_config_mservices.postgres.processing.password }}"
ssl:
mode: disable | allow | prefer | require
- remove the Postgres service that was deployed inside
group_docker_cots
# Before
group_docker_cots:
postgres:
tag: "{{ group_docker_tags.cots }}"
[ ... ]
# After
group_docker_cots:
- if you do not have Postgis on your
database-inst.cnes.frdatabase, edit theaccess_instanceservice to indicate there is no Postgis available:
# Before
group_docker_mservices:
access_instance:
tag: "{{ group_docker_tags.back }}"
[ ... ]
# After
group_docker_mservices:
access_instance:
tag: "{{ group_docker_tags.back }}"
postgis: false
[ ... ]