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

[Upgrade jenkins] Switch to java 11 as default java version on agent nodes #277

Merged
merged 1 commit into from
Apr 28, 2023

Conversation

gaiksaya
Copy link
Member

@gaiksaya gaiksaya commented Apr 28, 2023

Description

Switch to java 11 as default java version on agent nodes. Required for newer jenkins version.
Ubuntu: Contains everything as before but default changed to java 11
Windows: Contains everything as before but default changed to java 11
MacOS: Contains only java 11 now
AL2: Contains only java 11 now

Issues Resolved

Part of #261

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.

@peterzhuamazon
Copy link
Member

Need to confirm that java8 is completely removed on gradle check:
https://github.com/opensearch-project/opensearch-ci/blob/main/lib/compute/agent-node-config.ts#L209

@peterzhuamazon
Copy link
Member

After some discussion there might still be some requirements for JDK8 on gradle check bwc tests.
You can add back the JDK8 and default JAVA_HOME to 11 for Ubuntu and Windows now @gaiksaya .

Thanks.

@gaiksaya
Copy link
Member Author

After some discussion there might still be some requirements for JDK8 on gradle check bwc tests. You can add back the JDK8 and default JAVA_HOME to 11 for Ubuntu and Windows now @gaiksaya .

Thanks.

Looks like I did not remove java8 from ubuntu and windows. However I did remove it from AL2 and macos. Do you want me to add back? Might need to figure out a way to set java 11 as default

@peterzhuamazon
Copy link
Member

After some discussion there might still be some requirements for JDK8 on gradle check bwc tests. You can add back the JDK8 and default JAVA_HOME to 11 for Ubuntu and Windows now @gaiksaya .
Thanks.

Looks like I did not remove java8 from ubuntu and windows. However I did remove it from AL2 and macos. Do you want me to add back? Might need to figure out a way to set java 11 as default

If that is the case just go ahead with the merge.
The building of 1.x/2.x/3.x does not need JDK8 anyway.

Thanks.

Comment on lines 35 to 38
#Set java to JDK11 so Jenkins can bootstrap it
sudo update-alternatives --set "java" "/usr/lib/jvm/java-11-openjdk-11.0.18.0.10-1.amzn2.0.1.x86_64/bin/java"
sudo update-alternatives --set "javac" "/usr/lib/jvm/java-11-openjdk-11.0.18.0.10-1.amzn2.0.1.x86_64/bin/java"

Copy link
Member

@peterzhuamazon peterzhuamazon Apr 28, 2023

Choose a reason for hiding this comment

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

This wont run on the arm64 server.
I would say just ignore jdk8 on non-ubuntu / non-windows for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right! Forgot about that. Will revert to previous state then. Moving on without jdk8 on al2 then

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
@gaiksaya
Copy link
Member Author

The following templates will be used to rebuild the AMIs with this setup:

  • jenkins-agent-al2-x64.json
  • jenkins-agent-win2019-x64.json
  • jenkins-agent-macos12-x64.json
  • jenkins-agent-al2-arm64.json
  • jenkins-agent-ubuntu2004-x64.json
  • jenkins-agent-win2019-x64-gradle-check.json

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.

2 participants