-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Rework Java installation #11139
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
Rework Java installation #11139
Conversation
This reverts commit 316b49f.
LocalStack Community integration with Pro 2 files 2 suites 1h 37m 37s ⏱️ Results for commit 680a58a. ♻️ This comment has been updated with latest results. |
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.
Wow, this is a great step forward to upgrading Java, and maybe in the future really just installing it on demand for the few services that depend on it!
I think we need to find a solution for the pretty big size increase of the image due to the change, and I added some comments to other things we could maybe optimize from the beginning (for example using latest patch versions).
3b7d18f
to
5657058
Compare
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.
Thanks a lot for addressing all the comments and for cleaning up along the way (f.e. by removing the docker-java-home
)!
The changes are looking great! Especially the automatic latest-version lookup! 💯
I only had one minor nitpick / question concerning the user-agent, but nothing blocking a release.
Background
LocalStack Docker image currently installs JRE 11 from the Temurin Docker build. This is used as the default JRE installation for the LS environment.
We have a need for more flexibility around having multiple JRE installations. Certain components demand an older or a new version of JRE and currently there is no mechanism to achieve this.
Changes
This PR adds a
java
LPM package that supports all three Java LTS releases (8, 11, 21).As before, we preinstall JRE 11 during the Docker build process. The
java
package installer is based on the Ext version. It was refactored to useArchiveDownloadAndExtractInstaller
instead ofOSPackageInstaller
.The install source is changed but we use the same jlink-based optimisation. Post-install disk footprint is more or less the same (~70M) except for Java 8 which does not have jlink.
In follow up PRs, the specific Java requirement explicit in all community (DDB, Opensearch, etc.) and ext LPM packages. The default system-wide Java installation made during Docker build will also be removed.
It should be safe to merge this without the companion PR. Tested with AWS / Ext Integration Tests # 778