WIP: trying to consolidate okd and ocp builds into a single dockerfile - #1051
WIP: trying to consolidate okd and ocp builds into a single dockerfile#1051Prashanth684 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Prashanth684 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test okd-scos-images |
|
Thank you for your PR. I understand this is WiP, but when "consolidating" this, one thing to keep in mind should be that access to external repos (e.g. |
|
@Prashanth684: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Thanks @jmencak for looking over this. The context for this change is https://issues.redhat.com/browse/OKD-210, where we are looking to build all OKD content on top of centos stream. As part of that change, ART had raised this PR which adds OKD configs based on centos stream. The source of truth for these configs is the ocp-build-data repo. In that repo, the dockerfile for NTO is specified as Dockerfile.rhel9, which is why we thought it would be better to consolidate, so that the autogeneration works for future releases. That said - I might need to understand a bit more about what is different for OKD. IIUC, is it:
|
Thank you for additional context @Prashanth684 . The
The patch should go. There shouldn't be any patches to
We don't do any of those at the moment to my knowledge. If different tuning is needed, this could be handled at
The proposed change complicates the
Do you mean the |
|
@jmencak -
In order to support the entire organization building OKD artifacts, the OKD team must rely on automation to accomplish most of the work. The automation being designed is based on OCP ART metadata (e.g. https://github.com/openshift-eng/ocp-build-data/blob/openshift-4.16/images/cluster-node-tuning-operator.yml#L23-L26 ). We can use this metadata to generate, and keep in sync, the hundreds of configurations necessary to produce OKD with the lowest possible impact to OCP teams. The cluster-node-tuning operator appears to be one of the few where this process will not work. The simplest way to address this and support the OKD team is to unify the Dockerfiles. Once that is done, the same automation that supports the rest of the organization's OKD artifacts will keep your Dockerfile.rhel9 (or future unified variant) building and promoting compliant OKD images. The next simplest approach is to ensure that the number of layers (and intention of those layers) is consistent between The final option is to exclude NTO from the automation. This transfers the full responsibility of building OKD images and keeping them compliant to the NTO team (e.g. keeping up with centos based golang builders when they are available). As I'm sure you can appreciate, anything other than full automation creates a tax for someone and risk for OKD. I hope that helps explain the motivation. |
|
Thank you for additional context Justin.
This is where again, I'm a bit lost. Is this about the difference in the number stages ( /cc @yanirq
|
|
FROM statements:
fwiw, the number of stages in a Dockerfile doesn't impact the final size of the image -- only the content of the final stage matters. If it is the content in the Dockerfile, extracting this to a simple shell script (e.g. |
Based on this comment @jmencak , it looks like the patch can be removed in |
So the number of stages (
Yes, if you build the packages you need during a build stage, you'll have a smaller final image. That's why we're doing the 3 stage build. Every extra This is a quick experiment I did: Size of NTO images prior this PR: Size of NTO images with this PR: So a huge increase in size for the CS9 NTO image, not so big for RHEL9, but there is still some. I believe we need to limit the number of |
Yes. Actually, I wonder if the way forward is to make the |
|
@jmencak - #1058 gets the OKD image size down to 495MB. |
No description provided.