Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"fast-initialize" Docker entrypoint for faster setup and testing #639

Open
ashiklom opened this issue Feb 18, 2019 · 2 comments
Open

"fast-initialize" Docker entrypoint for faster setup and testing #639

ashiklom opened this issue Feb 18, 2019 · 2 comments

Comments

@ashiklom
Copy link
Member

Currently, the BETY initialization entrypoint takes several minutes to run due to the large volume of data it has to import. That is useful for normal initialization, but it would be nice if there was a minimal version of BETY that could be loaded much more quickly to facilitate testing pull requests.

Looking at the tables included in the initialization, many of the largest are also the ones least necessary for quick tests (e.g. likelihoods, dbfiles, runs).

I think this should be just a matter of creating a new entry in entrypoint.sh that is identical to the current initialize, but which points to a different, minimal BETY dump. E.g. Something like:

    "fast-initialize" )
        echo "Create new database, initialized from minimal data."
        psql -h postgres -p 5432 -U postgres -c "CREATE ROLE bety WITH LOGIN CREATEDB NOSUPERUSER NOCREATEROLE PASSWORD 'bety'"
        psql -h postgres -p 5432 -U postgres -c "CREATE DATABASE bety WITH OWNER bety"
        ./script/load.bety.sh -a "postgres" -d "bety" -p "-h postgres -p 5432" -o bety -c -u -g -m ${LOCAL_SERVER} -r 0 -w https://ebi-forecast.igb.illinois.edu/pecan/dump/FAST/bety.tar.gz
;;
@robkooper
Copy link
Member

The other options is to have a special image that is the latest dump of the database that can be copied to the postgis image volume. There is no need at that point to run the code.

@dlebauer
Copy link
Member

dlebauer commented Feb 18, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants