Page MenuHomeSoftware Heritage

storage/entrypoint.sh: Make the storage initialization transparent
ClosedPublic

Authored by ardumont on Dec 14 2018, 12:18 PM.

Details

Summary

The swh-storage startup does initialize the db directly.

Related T1444
Depends on D816 (for idempotency)

Test Plan
docker-compose down --volumes; docker-compose build; docker-compose up

Then load a repository directly (no need for the init step now).

python3 -m swh.loader.git.updater --origin-url https://github.com/SoftwareHeritage/swh-storage.git

For information, to develop this, i used the composability of our
stuff introduced in (D811 \m/):

I added the following docker-compose.override.yml:

version: '2'

services:
  swh-storage:
      volumes:                                                                                                                                                                                         - "${SWH_ENVIRONMENT_HOME}/swh-core:/src/swh-core"

(Note: replace $SWH_ENVIRONMENT_HOME, my local env variable, with
something that works for you)

Diff Detail

Repository
rCDFD Dockerfiles for developers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Dec 14 2018, 12:18 PM
ardumont marked an inline comment as done.Dec 14 2018, 12:22 PM
ardumont added inline comments.
dockerfiles/swh-storage/entrypoint.sh
31

I cannot use the service=swh in the current state of swh-db-init...

vlorentz accepted this revision.Dec 14 2018, 1:33 PM
This revision is now accepted and ready to land.Dec 14 2018, 1:33 PM
This revision was automatically updated to reflect the committed changes.