-
Notifications
You must be signed in to change notification settings - Fork 40
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
Introduce "base" variant of SLE-Micro-for-Rancher #1050
Conversation
This defines the "base" packages required to run Kubernetes (k3s or rke2) with a minimal number of packages. Esp. missing is "kernel-firmware-all" which drags in 350MB in packages. All other SLE Micro for Rancher variants should be derived from "base". Signed-off-by: Klaus Kämpf <kkaempf@suse.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
RUN zypper --installroot /osimage in --no-recommends -y apparmor-parser | ||
|
||
# add elemental | ||
RUN zypper --installroot /osimage in --no-recommends -y elemental |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JFYI here we explicitly require elemental
package and hence OBS includes this package as part of the buildenv. Then there is the replace_using_package_version OBS buildtime service that finds this package, gets the version of it and replaces a given placeholder with the computed version.
Just something to keep in mind for our own derivatives, we used to compute the tag from elemental
package version. We could also compute that version|tag from github tags if the sources are pulled from github. This mostly relates to the images we want to build in OBS.
|
||
# Version value is taken form the elemental repository tags | ||
# Release value of this image and os image are unrelated | ||
RUN elemental --debug --config-dir . build-iso -o /output -n "sle-micro-rancher.$(uname -m)-base-%VERSION%-Build%RELEASE%" dir:rootfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In former iso images in OBS this %VERSION% is a placeholder to be replaced with the version computed from github sources, more specific form the elemental.obsinfo
file. For that the _service
file requires an obs_scm service and replace_with_package_version service. Something like:
<service name="obs_scm">
<param name="url">https://github.com/rancher/elemental</param>
<param name="scm">git</param>
<param name="include">.obs</param>
<param name="extract">.obs/dockerfile/slem4r-base-iso/Dockerfile</param>
<param name="revision">main</param>
<param name="filename">elemental</param>
<param name="versionformat">@PARENT_TAG@+git%cd.%h</param>
<param name="versionrewrite-pattern">v([^-]+)-?.*(\+git.*)</param>
<param name="versionrewrite-replacement">\1\2</param>
</service>
<service name="replace_using_package_version" mode="buildtime">
<param name="file">Dockerfile</param>
<param name="regex">%VERSION%</param>
<param name="package">elemental</param>
<param name="parse-version">patch</param>
</service>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will be part of the package submission in OBS
Merging as-is, it doesn't influence any other builds. |
This defines the "base" packages required to run Kubernetes (k3s or rke2) with a minimal number of packages.
Esp. missing is "kernel-firmware-all" which drags in 350MB in packages.
All other SLE Micro for Rancher variants should be derived from "base" and
serve as examples of how to build derived images.