diff --git a/data/deployments/staging/common.yaml b/data/deployments/staging/common.yaml --- a/data/deployments/staging/common.yaml +++ b/data/deployments/staging/common.yaml @@ -197,6 +197,10 @@ clearly_defined: name: clearly-defined user: clearly-defined + clearly_defined_full: + name: clearly-defined-full + user: clearly-defined + password: "%{lookup('swh::deploy::clearly_defined::db::password')}" pgbouncer::auth_hba_file: "/etc/postgresql/%{lookup('swh::postgresql::cluster_name')}/pg_hba.conf" pgbouncer::common::listen_addresses: @@ -237,6 +241,11 @@ auth_user: postgres port: 5433 alias: staging-clearly-defined + - source_db: clearly-defined-full + host: localhost + auth_user: postgres + port: 5433 + alias: staging-clearly-defined-full # open objstorage api swh::deploy::objstorage::backend::listen::host: 0.0.0.0 diff --git a/data/hostname/clearly-defined.internal.staging.swh.network.yaml b/data/hostname/clearly-defined.internal.staging.swh.network.yaml --- a/data/hostname/clearly-defined.internal.staging.swh.network.yaml +++ b/data/hostname/clearly-defined.internal.staging.swh.network.yaml @@ -2,6 +2,7 @@ swh::postgres::service::users: - tg1999 - root + - olasd - vlorentz - zack @@ -18,6 +19,18 @@ port: "%{alias('swh::deploy::db::pgbouncer::port')}" user: clearly-defined passwd: "%{alias('swh::deploy::clearly_defined::db::password')}" + - alias: clearly-defined-full + name: clearly-defined-full + host: "%{alias('swh::deploy::storage::db::host')}" + port: "%{alias('swh::deploy::db::pgbouncer::port')}" + user: guest + password: guest + - alias: admin-clearly-defined-full + name: clearly-defined-full + host: "%{alias('swh::deploy::storage::db::host')}" + port: "%{alias('swh::deploy::db::pgbouncer::port')}" + user: clearly-defined + passwd: "%{alias('swh::deploy::clearly_defined::db::password')}" - alias: replica-swh name: softwareheritage host: somerset.internal.softwareheritage.org diff --git a/site-modules/profile/manifests/postgresql/server.pp b/site-modules/profile/manifests/postgresql/server.pp --- a/site-modules/profile/manifests/postgresql/server.pp +++ b/site-modules/profile/manifests/postgresql/server.pp @@ -87,7 +87,10 @@ $dbs = lookup('swh::dbs') each($dbs) | $db_type, $db_config | { # db_type in {storage, indexer, scheduler, etc...} - $db_pass = lookup("swh::deploy::${db_type}::db::password") + $db_pass = pick( + $db_config['password'], + lookup("swh::deploy::${db_type}::db::password", {"default_value" => undef}) + ) $db_name = $db_config['name'] $db_user = $db_config['user']