Extract the main cli command in a dedicated cli.py module and make it an entrypoint
Add a swh.vault.api.wsgi module to instanciate the (singleton) wsgi app object
Typically used by external wsgi server like uwsgi or gunicorn, e.g.
gunicorn swh.vault.api.wsgi:app
Refactor the VaultBackend to use BaseDb and pool-based db access
Make it possible to specify the config file via SWH_CONFIG_FILENAME env var
so that we have a chance to explicitely choose the config file used when running the wsgi app using a wsgi server like gunicorn.
Normalize the configuration of VaultBackend and cooker
- Ensure every service for which an (remote or local) access is needed uses the same config structure (dict with 'cls' and 'args' keys).
- Extract instanciation (thus confguration) of remote/external services (storage, cache, scheduler) from the VaultBackend constructor; these are now passed as init arguments; their instanciation/configuration is thus now handled by swh.vault.api.server and swh.vault.cooker.get_cooker (with some support in swh.vault.get_vault).
Rewrite tests using pytest's fuxture and adapt them to recent refactorings
pifpaf is not needed any more.
Migrated from D1135 (view on Phabricator)