-
Notifications
You must be signed in to change notification settings - Fork 304
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
FISH-7821 FISH-8190 Multiplatform Docker Images for Server and Micro #6523
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
…ding multipaltform Server Docker images Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
… image Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
This reverts commit 3816fa6. It doesn't work, buildx hits an issue with deploying without doing the standard build first, even though it ends up building it again to deploy.
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
This makes the build complicated when using buildx due to the quirk that buildx cannot utilise the local image cache - it can only pull from a published registry. The server-base Dockerfile is now just folded into the other server dockerfiles. The downside to this is that the build for each image is now slower due to having to redo all of what the server-base image previously did for each image (server-full jdk11, server-full jdk17, server-full jdk21, server-web jdk11 etc.), and increases redundancy in the dockerfiles themselves. Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Trying on Odroid machine (ARM64 architecture):
|
aubi
approved these changes
Jan 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, verified on ARM64/Linux machine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Follow up / replacement for #6521
Allows creation and deployment of multiplatform Docker images.
Azul provide AMD64 and ARM64 versions of their azul/zulu-openjdk and azul/zulu-openjdk-alpine images, which we can leverage to create multiplatform images.
Buildx has a quirk that it cannot utilise locally cached images - it can only pull from published images. This comes up when trying to build the Payara Server images, which pull from the payara/basic image. Since the payara/basic image utilised by all Server images is versioned in the same manner as them currently (as in, the
payara/server:6.2024.1-SNAPSHOT
image expects to pull from apayara/basic:6.2024.1-SNAPSHOT
image), this breaks the build unless we always publish (no local builds allowed). The logic behind the original split was to reduce redundancy and optimise the build, but this splitting off wasn't done with buildx in mind. The move to buildx makes maintaining this image awkward, and it will quite possibly frequently catch us out. As an example, if you update the JDK version you won't necessarily see that it breaks the server images until you fully deploy the image and then retest because the server images will still pull down the previously published image. So your local maven build will pass, but upon deployment and retesting it may suddenly start failing. Removing the base image makes the build of the images slower, and there's duplicate steps, but it makes it much clearer if something is breaking or not.Unfortunately (as far as I can tell anyway), a combination of the way we have the build configured with various executions for the different JDK versions rather than a single "default" execution, and the way buildx works where when deploying it actually builds it again first, we have to essentially have a duplicate build config.
There is currently a bug with the maven plugin where the filter settings are ignored during the deploy phase - combined with the above point of buildx requiring us to rebuild the image, this has led me to come up with a workaround where we filter using ant as we create the individual docker files for the various JDK versions (rather than during the build of the Docker images).
I have also had to alter the basic (now server-base) image a little as it was directly downloading Tini. This led to an issue on ARM machine because it was an AMD64 version of Tini. Tini is now installed via the package manager to get around this.
Important Info
Blockers
None
Testing
New tests
None
Testing Performed
On my local machine
mvn clean install -DskipTests -T 1C
mvn clean install -pl .\appserver\extras\docker-images -amd "-PBuildDockerImages
[INFO] DOCKER> docker --config ... **-------> buildx <-------** build --progress=plain --builder maven --platform linux/amd64 --tag payara/micro:latest ...
mvn clean install -pl .\appserver\extras\docker-images -amd -PBuildDockerImages "-Dpayara.version=6.9.0"
Deployment test from WSL
mvn clean deploy -pl ./appserver/extras/docker-images -amd -PBuildDockerImages -DskipTests
On an ARM machine I set up in AWS
mvn clean install -DskipTests -T 1C
mvn clean install -pl ./appserver/extras/docker-images -amd -PBuildDockerImages
docker system prune -a
mvn clean install -pl ./appserver/extras/docker-images/tests -PBuildDockerImages
Testing Environment
Windows 11.
WSL OpenSUSE
Amazon Linux (ARM).
Documentation
N/A
Notes for Reviewers
Related PR to update the release jobs: https://github.com/payara/EngineeringJenkinsjobs/pull/56