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

[JENKINS-73703] Add Agent Images for UBI 8 and UBI 9 #866

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adambkaplan
Copy link

@adambkaplan adambkaplan commented Aug 29, 2024

Add agent and inbound-agent images for RHEL, based on UBI 9 and UBI 9, respectively. The base images are part of the UBI catalog. Therefore, the resulting images are free to redistribute anywhere (no subscription or terms agreement required).

Based on initial feedback from the community, these images use the same scripts to install and shrink the JRE that the image uses at runtime, rather than the respective version of OpenJDK packaged by Red Hat.

Testing done

I verified locally that the agent images build with podman, and that when run as a container the agents can communicate with an appropriately configured Jenkins controller/server.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@dduportal
Copy link
Contributor

dduportal commented Aug 29, 2024

Thanks for the contribution !

a quick first feedback (need to take a look) : the Jenkins uses Temurin JDK so we would like to use it here as well.
Changing the JDK distribution for only one declination is a nightmare to manage : updates, CVEs, patches, tests etc.

would you be willing to switch back to Temurin ?

@dduportal
Copy link
Contributor

Hi @adambkaplan , as discussed during the Jenkins Platform SIG meeting today:

  • We are good with adding UBI9 image for the agents
  • But we won't accept a new JDK distribution other than Temurin (same model as other images) for the reasons I exposed on my previous comment (maintenance burden for us).

Is that OK for you to update your PR to match the JDK pattern of other images (current UBI or Debian)?

@adambkaplan
Copy link
Author

Is that OK for you to update your PR to match the JDK pattern of other images (current UBI or Debian)?

Happy to match the JDK pattern for the controller's UBI image. I can completely understand the need to keep things in sync when it comes to testing, verification, and patching.

@gounthar
Copy link
Contributor

Thank you so much. 🤗

@adambkaplan
Copy link
Author

@gounthar @dduportal updated the PR to use the Temurin JDK, using the same scripts as the other agent images. Was able to verify the controller-agent connection works for the inbound flavor of the image locally.

I tried to update docker-bake and the README, but I'm a bit shakier on those as I don't have docker on my local machine. PTAL - after this next set of review I can squash commits and take this PR out of the draft state.

@gounthar
Copy link
Contributor

Thanks, I will have a look. 👍

Add agent and inbound-agent images for RHEL, based on UBI 8 and UBI
9. The standard UBI image is used as the base, making the resulting
images free to redistribute anywhere (no subscription or terms
agreement required). Like the other docker-agent images, these
download and shrink the Adoptium JDK instead of using the default
openjdk packages in the OS distribution.

Signed-off-by: Adam Kaplan <adam.kaplan@redhat.com>
@adambkaplan adambkaplan marked this pull request as ready for review September 23, 2024 14:17
@adambkaplan adambkaplan requested a review from a team as a code owner September 23, 2024 14:17
@adambkaplan adambkaplan changed the title WIP - [JENKINS-73703] Add Agent Images for UBI9 [JENKINS-73703] Add Agent Images for UBI 8 and UBI 9 Sep 23, 2024
@adambkaplan
Copy link
Author

@gounthar I have squashed commits, rebased this PR, and taken it out of draft state. PTAL.

@MarkEWaite
Copy link
Contributor

MarkEWaite commented Sep 23, 2024

Thanks very much @adambkaplan !

I'm a little surprised at the addition of UBI 8 + Java 11. Jenkins weekly has not supported Java 11 since 18 Jun 2024 (Jenkins 2.463). Jenkins LTS 2.477.1 will not support Java 11 when it releases 30 Oct 2024. Current Jenkins LTS (2.462.2) supports Java 11 and the 2 Oct 2024 Jenkins LTS (2.462.3) will support Java 11, but those will be the last LTS versions to support Java 11.

Jenkins does not support running a Jenkins agent with an older Java major version than the Java major version that is used on the controller.

That doesn't mean that we should not add a UBI 8 + Java 11 agent container, but the usable life of that container image seems much smaller than the UBI 9 + Java 17 and UBI 9 + Java 21 container images.

Is there a larger story behind the inclusion of an agent image for UBI 8 + Java 11?

@adambkaplan
Copy link
Author

Is there a larger story behind the inclusion of an agent image for UBI 8 + Java 11?

Not really. The present change set is meant to provide the same set of base OS + JREs for the agent that the community is providing for the main server. If the community plans on dropping UBI 8 support when Java 11 reaches EOL (effectively next week), then I agree it doesn't make sense to build an agent image now.

@timja
Copy link
Member

timja commented Sep 23, 2024

Could you drop it please

With the upcoming EOL of Java 11, the UBI 8 image for Jenkins server
will no longer be supported. Creating a UBI 8 image therefore does not
make any sense.

Signed-off-by: Adam Kaplan <adam.kaplan@redhat.com>
@adambkaplan
Copy link
Author

Could you drop it please

Done!

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.

5 participants