Page MenuHomeSoftware Heritage

Add clearly-defined vm role to access the staging clearly defined db instance
ClosedPublic

Authored by ardumont on Dec 16 2020, 12:52 PM.

Details

Summary

This installs the necessary cogs to access the particular clearly_defined db instance.

$ psql service=staging-clearly-defined              # guest user, read-only access
$ psql service=admin-staging-clearly-defined  # clearly-define user access read/write access to the db schema

inventory [1] updated

Related to T2865

[1] https://inventory.internal.softwareheritage.org/virtualization/virtual-machines/90/

Test Plan

vagrant up staging-clearly-defined

.pg_service.conf and .pgpass configured:

$ tg1999@clearly-defined:~$ cat .pg_service.conf
# This file is managed by puppet. Local modifications will be overwritten.

[clearly-defined]
dbname=clearly_defined
host=db1.internal.staging.swh.network
port=5432
user=guest
[admin-clearly-defined]
dbname=clearly_defined
host=db1.internal.staging.swh.network
port=5432
user=guest
tg1999@clearly-defined:~$ ls -lah .pgpass
-r-------- 1 tg1999 tg1999 288 Dec 16 12:31 .pgpass

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Adapt to allow the per node configuration override.

Add access to root user as well

vsellier added a subscriber: vsellier.

LGTM
as tested together, removing the deep option of lookup seems to result in a more predictable behavior :)

This revision is now accepted and ready to land.Dec 16 2020, 3:03 PM