Page MenuHomeSoftware Heritage

Docker: Migrate relevant services to the split `swh db create` / `swh db init`
ClosedPublic

Authored by olasd on Sep 23 2020, 7:59 PM.

Details

Summary

Since swh.core 0.3.0, the database creation (superuser) and database
initialization (user) operations have been split for databases managed using raw
SQL.

  • Override the postgresql containers for these services to avoid creating an

empty database.

  • Add an entry for the template1 database to .pgpass so other containers can

connect to it

  • extend wait_pgsql to take a database name as first argument
Test Plan

cleaned up all containers, rebuilt swh/stack and ran tox in the
docker directory, to successful completion.

Diff Detail

Repository
rDENV Development environment
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont added a subscriber: ardumont.

lgtm

Plus, tryout run executed up to a loading and browsing in webapp -> everything is fine!

Note: And other dbs (listers, deposit, webapp...) are not impacted by this
change because those other associated entrypoints have their own ways of
initializing dbs... just saying because i was not remembering exactly and had to check ;)

Thanks.

This revision is now accepted and ready to land.Sep 24 2020, 10:15 AM