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 9 #866

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

adambkaplan
Copy link
Contributor

@adambkaplan adambkaplan commented Aug 29, 2024

Add agent and inbound-agent images for RHEL, based on UBI 9. 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
Contributor 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
Contributor 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. 👍

@adambkaplan adambkaplan force-pushed the ubi9-agent branch 2 times, most recently from c0f13fb to b356f11 Compare September 23, 2024 14:16
@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
Contributor 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
Contributor 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

@adambkaplan
Copy link
Contributor Author

Could you drop it please

Done!

@MarkEWaite MarkEWaite changed the title [JENKINS-73703] Add Agent Images for UBI 8 and UBI 9 [JENKINS-73703] Add agent images for UBI 9 Sep 23, 2024
README_agent.md Outdated Show resolved Hide resolved
docker-bake.hcl Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
MarkEWaite
MarkEWaite previously approved these changes Sep 23, 2024
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

All my remaining comments are optional. This is ready to merge once CI job passes.

docker-bake.hcl Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Show resolved Hide resolved
MarkEWaite
MarkEWaite previously approved these changes Sep 24, 2024
dduportal
dduportal previously approved these changes Sep 24, 2024
Copy link
Contributor

@lemeurherveCB lemeurherveCB left a comment

Choose a reason for hiding this comment

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

Small suggestions.

docker-bake.hcl Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
rhel/ubi9/Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

If the ARG UBI9_TAG suggestion is accepted, it should also be defined as a variable here and passed to the corresponding target like what is done for DEBIAN_RELEASE.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accepting the suggestion, thus I'll add a follow-up commit with the new variable.

Comment on lines 43 to 55
# Red Hat Enterprise Linux Universal Base Image

- package-ecosystem: docker
directory: "rhel"
schedule:
interval: weekly
open-pull-requests-limit: 2
target-branch: master
reviewers:
- MarkEWaite
labels:
- dependencies

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Red Hat Enterprise Linux Universal Base Image
- package-ecosystem: docker
directory: "rhel"
schedule:
interval: weekly
open-pull-requests-limit: 2
target-branch: master
reviewers:
- MarkEWaite
labels:
- dependencies

Cf #866 (comment), removing this in favor of an updatecli manifest which can be added in a follow-up pull request.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that some content above should be removed too (unrelated to this PR)

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that some content above should be removed too (unrelated to this PR)

Addressed in #877

adambkaplan and others added 2 commits September 24, 2024 09:13
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>
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.

The tag for the base UBI 9 image was converted to a build arg, to
facilitate automatic updates via updatecli. Other minor fixes to
documentation and image metadata also included.

Signed-off-by: Adam Kaplan <adam.kaplan@redhat.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Co-authored-by: lemeurherveCB <137290663+lemeurherveCB@users.noreply.github.com>
@adambkaplan
Copy link
Contributor Author

Rebased and squashed commits down to 2 (preserving the decisions around UBI 8 and updatecli). Thanks everyone!

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks!

@MarkEWaite MarkEWaite merged commit 350499f into jenkinsci:master Sep 24, 2024
10 checks passed
@adambkaplan adambkaplan deleted the ubi9-agent branch September 24, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants