-
Notifications
You must be signed in to change notification settings - Fork 32
Adding support for payload multiple-stream. #180
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
Open
ybettan
wants to merge
1
commit into
openshift:master
Choose a base branch
from
ybettan:dual-stream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−1
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| FROM registry.ci.openshift.org/ocp/4.22:rhel-coreos-10 | ||
| ARG KERNEL_VERSION='' | ||
| ARG RT_KERNEL_VERSION='' | ||
| ARG RHEL_VERSION='' | ||
| # If RHEL_VERSION is empty, we infer it from the /etc/os-release file. This is used by OKD as we always want the latest one. | ||
| RUN [ "${RHEL_VERSION}" == "" ] && source /etc/os-release && RHEL_VERSION=${VERSION_ID}; echo ${RHEL_VERSION} > /etc/dnf/vars/releasever \ | ||
| && dnf config-manager --best --setopt=install_weak_deps=False --save | ||
|
|
||
| # kernel packages needed to build drivers / kmods | ||
| RUN dnf -y install \ | ||
| kernel-devel${KERNEL_VERSION:+-}${KERNEL_VERSION} \ | ||
| kernel-devel-matched${KERNEL_VERSION:+-}${KERNEL_VERSION} \ | ||
| kernel-headers${KERNEL_VERSION:+-}${KERNEL_VERSION} \ | ||
| kernel-modules${KERNEL_VERSION:+-}${KERNEL_VERSION} \ | ||
| kernel-modules-extra${KERNEL_VERSION:+-}${KERNEL_VERSION} | ||
|
|
||
| # real-time kernel packages | ||
| # Also, assert that the kernel and kernel-rt rpms come from the same build. Relevant for 9.3+. | ||
| RUN if [ $(arch) = x86_64 ]; then \ | ||
| dnf -y install \ | ||
| kernel-rt-devel${RT_KERNEL_VERSION:+-}${RT_KERNEL_VERSION} \ | ||
| kernel-rt-modules${RT_KERNEL_VERSION:+-}${RT_KERNEL_VERSION} \ | ||
| kernel-rt-modules-extra${RT_KERNEL_VERSION:+-}${RT_KERNEL_VERSION}; \ | ||
| diff --side-by-side <(rpm -qi kernel-core | grep 'Source RPM') <(rpm -qi kernel-rt-core | grep 'Source RPM'); \ | ||
| fi | ||
|
|
||
| # 64k-pages kernel packages for aarch64 | ||
| # Headers are not compiled, so there is no kernel-64k-headers packages, | ||
| # and compilation will use the headers from kernel-headers | ||
| RUN if [ $(arch) = aarch64 ]; then \ | ||
| dnf -y install \ | ||
| kernel-64k-devel${KERNEL_VERSION:+-}${KERNEL_VERSION} \ | ||
| kernel-64k-modules${KERNEL_VERSION:+-}${KERNEL_VERSION} \ | ||
| kernel-64k-modules-extra${KERNEL_VERSION:+-}${KERNEL_VERSION}; \ | ||
| fi | ||
|
|
||
| RUN dnf -y install kernel-rpm-macros | ||
|
|
||
| # Additional packages that are mandatory for driver-containers | ||
| RUN dnf -y install elfutils-libelf-devel kmod binutils kabi-dw glibc | ||
|
|
||
| # Find and install the GCC version used to compile the kernel | ||
| # If it cannot be found (fails on some architectures), install the default gcc | ||
| RUN export INSTALLED_KERNEL=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}" kernel-devel) && \ | ||
| GCC_VERSION=$(cat /lib/modules/${INSTALLED_KERNEL}/config | grep -Eo "gcc \(GCC\) ([0-9\.]+)" | grep -Eo "([0-9\.]+)") && \ | ||
| dnf -y install gcc-${GCC_VERSION} gcc-c++-${GCC_VERSION} || dnf -y install gcc gcc-c++ | ||
|
|
||
| # Additional packages that are needed for a subset (e.g DPDK) of driver-containers | ||
| RUN dnf -y install xz diffutils flex bison | ||
|
|
||
| # Packages needed to build driver-containers | ||
| RUN dnf -y install git make rpm-build | ||
|
|
||
| # Packages needed to sign and run externally build kernel modules | ||
| RUN if [ $(arch) == "x86_64" ] || [ $(arch) == "aarch64" ]; then \ | ||
| ARCH_DEP_PKGS="mokutil"; fi \ | ||
| && dnf -y install openssl keyutils $ARCH_DEP_PKGS | ||
|
|
||
| RUN dnf clean all | ||
|
|
||
| COPY manifests /manifests | ||
|
|
||
| ARG TAGS='' | ||
| RUN if echo "${TAGS:-}" | grep -q scos > /dev/null 2>&1; then sed -i 's/rhel-coreos/stream-coreos/g' /manifests/*; fi | ||
|
|
||
| LABEL io.k8s.description="driver-toolkit is a container with the kernel packages necessary for building driver containers for deploying kernel modules/drivers on OpenShift" \ | ||
| name="driver-toolkit" \ | ||
| io.openshift.release.operator=true \ | ||
| version="0.1" \ | ||
| io.openshift.os.streamclass=rhel-10 \ | ||
| kernel-version=${KERNEL_VERSION} \ | ||
| kernel-rt-version=${RT_KERNEL_VERSION} | ||
|
|
||
| # Last layer for metadata for mapping the driver-toolkit to a specific kernel version | ||
| RUN export INSTALLED_KERNEL=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}" kernel-devel); \ | ||
| export INSTALLED_RT_KERNEL=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}+rt" kernel-rt-core); \ | ||
| echo "{ \"KERNEL_VERSION\": \"${INSTALLED_KERNEL}\", \"RT_KERNEL_VERSION\": \"${INSTALLED_RT_KERNEL}\", \"RHEL_VERSION\": \"$(</etc/dnf/vars/releasever)\" }" > /etc/driver-toolkit-release.json | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
@joepvd
There is no
registry.ci.openshift.org/ocp/4.22:base-rhel10in the release repo.Should I use
registry.ci.openshift.org/ocp/4.22:rhel-coreos-10or should we add a newregistry.ci.openshift.org/ocp/4.22:base-rhel10image in the CI registry?