Members of pipelines and commissioning teams may need direct access to the APDB in the USDF; this page describes how to configure such authorization.

As of this writing (September 2023), precursor processing uses two postgres APDB instances:

Obtain Production APDB Credentials

Go to https://vault.slac.stanford.edu/ui/vault/secrets/secret/show/rubin/usdf-prompt-processing/postgres (select "oidc" and then use your SLAC UNIX credentials.  If you get "permission denied" you will need to request support on #ops-usdf).

Obtain dev APDB Credentials

Precursor processing presently uses the -dev database.  Obtain the secrets at

https://vault.slac.stanford.edu/ui/vault/secrets/secret/show/rubin/usdf-prompt-processing-dev/postgres

Update $HOME/.lsst/postgres-credentials.txt

For each database, add a line to $HOME/.lsst/postgres-credentials.txt that is

url:database:username:password

where the values of url, database, username, and password are given from those field names in the Vault entry.  Note that the vault entry "url" is of the format hostname:port  (xyz.slac.stanford.edu:1234) and database is lsst-devl 

For weeklies starting with w_2023_14 this value won't be overwritten by future RSP deployments.

You can test that your credentials work as expected on the production database by executing

psql -h usdf-prompt-processing.slac.stanford.edu lsst-devl rubin -c 'set search_path to pp_apdb; select count(*) from "DiaObject";'

You can list the schema names for precursor processing by executing

psql -h usdf-prompt-processing-dev.slac.stanford.edu lsst-devl rubin -c '\dn;'

Caution!

At present (Sept. 2023) all database access is using the shared "rubin" user.  Be careful when executing commands which might delete data!



  • No labels