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

[WIP] Build viable Docker images for Polaris using Quarkus #610

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

adutra
Copy link
Contributor

@adutra adutra commented Jan 3, 2025

⚠️ Not ready for review yet!

Requires #469, #604 and #628.

This PR redesigns how Docker images are built, to make them fully compatible with Quarkus.

  • The main Dockerfile for Polaris server is now located at quarkus/server/src/main/docker/Dockerfile.jvm (default location for dockerfiles for Quarkus)
  • The docker file can be built during the regular build: ./gradlew :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
  • The images are built with the Quarkus docker build provider.

This PR modifies the eclipse-link module and includes 2 JDBC drivers in the resulting artifacts: H2 and Postgres. This is absolutely required to be able to run Polaris with Postgres as the JDBC drivers must be present at build time.

Test changes:

  • For Helm tests, an image is built with Gradle and Quarkus, then loaded into minikube, with a custom tag. Then the tests are executed.
  • For regression tests, an image is built with Gradle and Quarkus, then a regtests/docker-compose.override.yml file is created with that tag. Then the tests are executed.

This PR also fixes the issues described in #537:

  • Removes the Dockerfile at the root of the repository (not needed anymore, and has security flaws);
  • The docker-compose.yaml at the root of the repository is moved to the regtests folder where it naturally belongs.
  • The default image in the docker-compose.yaml is apache/polaris:latest, meaning that by default, the regression tests execute against the latest released version of Polaris.
    • Note: there is no released version of Polaris yet, so running the docker compose file today will result in an error, unless the user builds the image manually; but that's a temporary issue.

This PR does not address the specific needs of release builds. For such builds, we need:

  • Multi-platform manifests
  • Various flavours of Eclipse Link dependencies (at least for now)
  • (Probably) multi-registry pushes

Again, this PR also defers all documentation changes to a follow-up task.

And last but not least: this PR changes the Helm chart slightly, only to make the Helm tests pass in CI. But another PR will introduce a bigger revamp of the Helm chart in order to fully to adapt it to Quarkus.

@adutra adutra force-pushed the quarkus-docker branch 8 times, most recently from 3a3efcd to 3bbf02c Compare January 7, 2025 19:19
@adutra adutra force-pushed the quarkus-docker branch 7 times, most recently from 6d67aaa to 748e414 Compare January 10, 2025 20:11
@adutra adutra changed the title [WIP] Build Docker images with Quarkus [WIP] Build viable Docker images for Polaris using Quarkus Jan 10, 2025
@adutra adutra force-pushed the quarkus-docker branch 6 times, most recently from b165942 to 499c4e9 Compare January 10, 2025 22:18
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.

1 participant