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

Updated CI image to include JDK-8/11/17 distributions, kept JDK-14 as the default one #754

Merged
merged 3 commits into from
Oct 15, 2021

Conversation

reta
Copy link
Contributor

@reta reta commented Oct 15, 2021

Signed-off-by: Andriy Redko [email protected]

Description

Updated CI image to include JDK-8/11/17 distributions, kept JDK-14 as the default one so the 1.x branches will continue to build properly.

declare -x JAVA11_HOME="/opt/java/openjdk-11"
declare -x JAVA14_HOME="/usr/lib/jvm/adoptopenjdk-14-hotspot"
declare -x JAVA17_HOME="/opt/java/openjdk-17"
declare -x JAVA8_HOME="/opt/java/openjdk-8"
declare -x JAVA_HOME="/usr/lib/jvm/adoptopenjdk-14-hotspot"

Issues Resolved

Closes #732, part of opensearch-project/OpenSearch#1351

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@reta
Copy link
Contributor Author

reta commented Oct 15, 2021

@peterzhuamazon could you please take a look? Thank you!

@dblock sadly we cannot cut off JDK-14 in one shot (we will break 1.x builds due to https://bugs.openjdk.java.net/browse/JDK-8209058) but with new CI images we could set JAVA_HOME from build manifests.

@dblock
Copy link
Member

dblock commented Oct 15, 2021

Should we install 14 from adoptium the same way as the other JDKs? Why is it a special case?

@dblock
Copy link
Member

dblock commented Oct 15, 2021

Next question, why aren't we installing the other JDKs with yum install adoptopenjdk-... as well? Does it not support side-by-side installations?

@reta
Copy link
Contributor Author

reta commented Oct 15, 2021

Should we install 14 from adoptium the same way as the other JDKs? Why is it a special case?

That's the fun one, Adoptium picked up where AdoptOpenJDK left and provides JDK-16 and above + LTS releases right now (https://adoptium.net/archive.html) so for JDK-14/15, we still have to use older AdoptOpenJDK builds:

  • Temurin 8 (LTS)
  • Temurin 11 (LTS)
  • Temurin 16
  • Temurin 17 (LTS)
  • Temurin 18 (EA)

@reta
Copy link
Contributor Author

reta commented Oct 15, 2021

Next question, why aren't we installing the other JDKs with yum install adoptopenjdk-... as well? Does it not support side-by-side installations?

A bit relates to previous comments, Adoptium at this moment does not have CentOS repositories (I didn't find any) and the recommended way to install distributions is to use archives.

@dblock
Copy link
Member

dblock commented Oct 15, 2021

Next question, why aren't we installing the other JDKs with yum install adoptopenjdk-... as well? Does it not support side-by-side installations?

A bit relates to previous comments, Adoptium at this moment does not have CentOS repositories (I didn't find any) and the recommended way to install distributions is to use archives.

Thanks, makes sense.

@dblock
Copy link
Member

dblock commented Oct 15, 2021

Last question, are there tools that deal with the sourcing complexity for us in some verifiable and reliable manner? Like sdk? I know it's just a loop over some links and checksums, but wouldn't it be nicer to see sdk install openjdk-....? Feels like we're still reinventing the wheel with this.

@reta
Copy link
Contributor Author

reta commented Oct 15, 2021

Last question, are there tools that deal with the sourcing complexity for us in some verifiable and reliable manner? Like sdk? I know it's just a loop over some links and checksums, but wouldn't it be nicer to see sdk install openjdk-....?

Very valid point, I will try to use https://sdkman.io/, the peculiar way we use JDKs (basically, mutliple at the same time) goes a bit beyond sdk-man capabilities but I think we could manipulate JAVA_HOME & Co using sdk-man, will update you shortly, thanks @dblock !

@dblock
Copy link
Member

dblock commented Oct 15, 2021

@peterzhuamazon @bbarani might have something to say about sdkman, but it's an open-source tool like others we use that seems to do a great job at removing all this complexity - I use it to install my own JDKs

@reta
Copy link
Contributor Author

reta commented Oct 15, 2021

@dblock just played with sdk-man, sadly there is no JDK-14 distributions anymore (AdoptOpenJDK is gone as a source) available. So we could only install JDK 8/11/17 from Adoptium. I will prepare the change and wait for @peterzhuamazon @bbarani feedback regarding their preferences.

@dblock
Copy link
Member

dblock commented Oct 15, 2021

@dblock just played with sdk-man, sadly there is no JDK-14 distributions anymore (AdoptOpenJDK is gone as a source) available. So we could only install JDK 8/11/17 from Adoptium. I will prepare the change and wait for @peterzhuamazon @bbarani feedback regarding their preferences.

I don't want to send you on a wild goose chase either. I would open issues in sdkman to add whatever is missing and open an issue here linking to it to replace what you wrote with sdkman when that's ready, if we want to.

This PR is A-OK with me!

@dblock dblock requested a review from peterzhuamazon October 15, 2021 15:24
@dblock dblock requested a review from peterzhuamazon October 15, 2021 18:32
Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

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

Thanks, great changes.
Wonder if you can do the same for AL2 image as well?

@peterzhuamazon peterzhuamazon merged commit 43b7675 into opensearch-project:main Oct 15, 2021
@reta
Copy link
Contributor Author

reta commented Oct 15, 2021

Thanks, great changes. Wonder if you can do the same for AL2 image as well?

Thanks a lot @peterzhuamazon ! Yeah, sure, I could do that early next week, thanks!

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.

Split, simplify and move usage of CI runners between OpenSearch and OpenSearch Dashboards
3 participants