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

Merge ISO and OS container images #1611

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidcassany
Copy link
Contributor

This commit unifies OS container and ISO container images at OBS level. This way the two are stick together and we need to handle less submissions.

Also, as a consequence, both release numbers are likely to be aligned with this setup.

@davidcassany davidcassany requested a review from a team as a code owner October 3, 2024 07:51
@davidcassany davidcassany marked this pull request as draft October 3, 2024 07:51
Copy link
Contributor Author

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

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

This PR removes the following OBS packages:

  • build-base-iso-image
  • build-baremetal-iso-image
  • build-baremetal-disk-image
  • build-kvm-iso-image
  • build-rt-iso-image
  • build-k3s-selinux-iso-image
  • build-rke2-selinuc-iso-image

And they are embedded in their SL-Micro-* counterpart.

@@ -10,7 +10,7 @@
ARG SLMICRO_VERSION

FROM suse/sl-micro/${SLMICRO_VERSION}/base-os-container:latest AS os
FROM suse/sl-micro/${SLMICRO_VERSION}/baremetal-os-container:latest AS builder
FROM suse/sl-micro/${SLMICRO_VERSION}/base-os-container:latest AS builder
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the OS image as the builder itself simplifies the image cross dependencies, so the ISO only requires the OS container to build, so base ISO only requires base OS.

<param name="eval">SLMICRO_VERSION=$(rpm --macros=/root/.rpmmacros -E %slmicro_version)</param>
<param name="var">SLMICRO_VERSION</param>
</service>
<service name="replace_using_env" mode="buildtime">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nit: we could consider adapting this replace_using_env OBS service to actually support globbing, so instead of requiring a new service call per file and per variable we could do something like the following (the * on the file name):

<service name="replace_using_env" mode="buildtime">
    <param name="file">Dockerfile*</param>
    <param name="eval">SLMICRO_VERSION=$(rpm --macros=/root/.rpmmacros -E %slmicro_version)</param>
    <param name="var">SLMICRO_VERSION</param>
  </service>

@@ -0,0 +1,4 @@
<multibuild>
<flavor>iso</flavor>
<flavor>disk</flavor>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note this same approach is also valid for disks

@davidcassany
Copy link
Contributor Author

@kkaempf
Copy link
Contributor

kkaempf commented Oct 4, 2024

I'm not sure about using the OS images as builder (which probably contain lots of "build" dependencies, which are not "runtime" dependencies) 🤔

@davidcassany
Copy link
Contributor Author

I'm not sure about using the OS images as builder (which probably contain lots of "build" dependencies, which are not "runtime" dependencies) 🤔

I agree this is arguable, but with the current setup installing elemental, which is part of the base image, already includes everything we need to build, which is not that much at the end.

This commit unifies OS container and ISO container images at OBS
level. This way the two are stick together and we need to handle less
submissions.

Also, as a consequence, both release numbers are likely to be aligned
with this setup.

Signed-off-by: David Cassany <[email protected]>
@davidcassany davidcassany marked this pull request as ready for review October 23, 2024 17:16
Copy link
Member

@fgiudici fgiudici left a comment

Choose a reason for hiding this comment

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

Looks good here!
Worth just to make the release process easier... and fixing the mismatch in the release numbers of ISOs and container OS images is quite an important "side effect" too which would alone deserve this PR 💚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏃🏼‍♂️ In Progress
Development

Successfully merging this pull request may close these issues.

3 participants