production: Deploy swh-scrubber database and checkers
Plan (inspired by #4102 (closed)):
-
Install scrubber (postgres) db (for production manually done) [1] -
infra/puppet/puppet-swh-site!529: Configure db connection (puppet) -
Check connection is ok -
D8035: Update documentation on how to connect to db -
Install schema in swh-scrubber db [2] -
Grand read-only access to guest user -
Update inventory with new scrubber node [3] -
infra/swh-sysadmin-provisioning!79: Provision node for checkers services -
infra/puppet/puppet-swh-site!530: Deploy checker services -
infra/puppet/puppet-swh-site!531: Ensure services start properly -
infra/puppet/puppet-swh-site!531 (test plan): Checks everything is fine -
[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:<redacted>@belvedere.internal.softwareheritage.org:5432/swh-scrubber
+ swh db init-admin --dbname postgresql://swh-scrubber:<redacted>@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
Migrated from T4324 (view on Phabricator)
Edited by Antoine R. Dumont