Plan (inspired by T4102):
- [x] Install scrubber (postgres) db (for production manually done) [1]
- [x] D8034: Configure db connection (puppet)
- [x] Check connection is ok
- [x] D8035: Update documentation on how to connect to db
- [x] Install schema in swh-scrubber db [2]
- [x] Grand read-only access to guest user
- [ ] Deploy postgres checker service on a dedicated scrubber node
[1]
```
postgres@belvedere:~$ createuser -p 5434 -P swh-scrubber
Enter password for new role:
Enter it again:
postgres@belvedere:~$ createdb -p 5434 --lc-ctype=C.UTF-8 -T template1 -O swh-scrubber swh-scrubber
```
[2]
```
$ ~/work/inria/bin/setup-db.sh
+ DBPORT=5432
+ DBPASSWORD=<redacted>
+ DBUSER=swh-scrubber
+ DBNAME=swh-scrubber
+ DBHOST=belvedere.internal.softwareheritage.org
+ CONNSTRING=postgresql://swh-scrubber:tigress-headboard-implement-spent@belvedere.internal.softwareheritage.org:5432/swh-scrubber
+ swh db init-admin --dbname postgresql://swh-scrubber:tigress-headboard-implement-spent@belvedere.internal.softwareheritage.org:5432/swh-scrubber scrubber
+ swh db init --dbname postgresql://swh-scrubber:<redacted>@belvedere.internal.softwareheritage.org:5432/swh-scrubber scrubber
psql:/home/tony/work/inria/repo/swh/swh-environment/swh-core/swh/core/db/sql/36-dbmodule.sql:12: NOTICE: relation "dbmodule" already exists, skipping
INFO:swh.core.cli.db:Initializing database version to 1 from the command line option --initial-version
DONE database for scrubber initialized at version 1
```