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

Add docker for index meta-database #140

Merged

Conversation

CasperWA
Copy link
Member

Going from the index_meta_db branch from @ltalirz's fork, this adds a Dockerfile to the repository and a docker-compose file that should start both servers.

Furthermore, a CI check has been added to test the Docker build.

@CasperWA CasperWA force-pushed the add_docker_for_index_meta_db branch 3 times, most recently from b234f3b to 98219df Compare January 30, 2020 17:00
@CasperWA
Copy link
Member Author

CasperWA commented Jan 30, 2020

This now creates two docker-compose services, i.e., two images. One is for the index meta-database (called optimade-index), the other is for starting the "normal" server (called optimade).
Both are now fully tested if they run in CI: First they're built, then they're run and a response is checked.

@CasperWA CasperWA force-pushed the add_docker_for_index_meta_db branch 2 times, most recently from 370807e to 71bb485 Compare February 4, 2020 13:54
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a very useful PR for deploying the server, thanks @CasperWA (and @ltalirz).

Just a few docker-related changes, the rest looks good to me.

.github/workflows/deps_lint.yml Outdated Show resolved Hide resolved
.github/workflows/deps_lint.yml Outdated Show resolved Hide resolved
.github/workflows/deps_lint.yml Outdated Show resolved Hide resolved
.github/workflows/deps_lint.yml Outdated Show resolved Hide resolved
@CasperWA CasperWA force-pushed the add_docker_for_index_meta_db branch 3 times, most recently from df60bb2 to f98c055 Compare February 6, 2020 00:36
@CasperWA CasperWA requested a review from ml-evs February 6, 2020 11:26
run.sh Show resolved Hide resolved
ltalirz and others added 8 commits February 7, 2020 00:35
Co-authored-by: Casper Welzel Andersen <casper.andersen@epfl.ch>
Update docker-compose to start both servers.
Add CI check for building the Docker containers.
Now we are testing not only if it can be built, but also start both
servers and test to see if we get an expected response.
There are now two ways to start the index meta-database server, instead
of the regular server.
1. Run: ./run.sh index
2. Set variable: export MAIN="main_index"
   And then run normally.
The two methods are also prioritized this way, i.e., if the environment
variable MAIN="main", but one runs ./run.sh index, then the index
meta-database will be started instead of the regular server.
.docker/run.sh Show resolved Hide resolved
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good to go, if you decide to act on my above comment then just ping me to re-accept.

@CasperWA CasperWA merged commit 3712c9c into Materials-Consortia:master Feb 7, 2020
@CasperWA CasperWA deleted the add_docker_for_index_meta_db branch February 7, 2020 15:52
@CasperWA CasperWA mentioned this pull request Feb 13, 2020
CasperWA added a commit that referenced this pull request Feb 13, 2020
Bump to v0.5.0

Changes:
- Possibility for Docker deployment for both the index meta-database
  server as well as the regular server (#140, @ltalirz, @CasperWA)
- Test building and starting Docker images with GitHub Actions CI
  (#140, @CasperWA, @ml-evs, @ltalirz)
- Remove `/index` from the index meta-database's base URL
  (#140, @ltalirz, @CasperWA)
- `include` query parameter (#163, @CasperWA)
- Rename `optimade/server/deps.py` to `optimade/server/query_params.py`
  (#163, @CasperWA)
- Human-readable landing page for versioned base URLs, as well as for
  `/optimade` (#172, @ml-evs)
- Move mapper aliases to config file and out of mapper classes
  (#175, @ml-evs)

Bug fixes:
- Properly build versioned base URLs (#178, @CasperWA)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants