Skip to content

Commit c3d47a3

Browse files
authored
Merge pull request #94133 from mburke5678/mco-ocl-image-mode
MCO change on-cluster layering to image mode for OpenShift
2 parents d76a4e5 + a1ecb01 commit c3d47a3

13 files changed

+44
-33
lines changed

_attributes/common-attributes.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,3 +389,12 @@ endif::openshift-origin[]
389389
:spiffe-full: Secure Production Identity Framework for Everyone (SPIFFE)
390390
:svid-full: SPIFFE Verifiable Identity Document (SVID)
391391
:spire-full: SPIFFE Runtime Environment
392+
// Formerly on-cluster image layering
393+
:image-mode-os-caps: Image mode for OpenShift
394+
:image-mode-os-lower: image mode for OpenShift
395+
// Formerly on-cluster layering
396+
:image-mode-os-on-caps: On-cluster image mode
397+
:image-mode-os-on-lower: on-cluster image mode
398+
// Formerly out-of-cluster layering
399+
:image-mode-os-out-caps: Out-of-cluster image mode
400+
:image-mode-os-out-lower: out-of-cluster image mode

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,12 +2387,9 @@ Topics:
23872387
File: mco-update-boot-images
23882388
- Name: Managing unused rendered machine configs
23892389
File: machine-configs-garbage-collection
2390-
- Name: Red Hat Enterprise Linux (RHEL) CoreOS image layering
2390+
- Name: Image mode for OpenShift
23912391
File: mco-coreos-layering
2392-
Distros: openshift-enterprise
2393-
- Name: Fedora CoreOS image layering
2394-
File: mco-coreos-layering
2395-
Distros: openshift-origin
2392+
Distros: openshift-enterprise,openshift-origin
23962393
- Name: Machine Config Daemon metrics
23972394
File: machine-config-daemon-metrics
23982395
---

machine_configuration/mco-coreos-layering.adoc

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
:_mod-docs-content-type: ASSEMBLY
22
include::_attributes/common-attributes.adoc[]
33
[id="mco-coreos-layering"]
4-
= {op-system} image layering
4+
= Image mode for OpenShift
55
:context: mco-coreos-layering
66

77
toc::[]
88

99

10-
{op-system-first} image layering allows you to easily extend the functionality of your base {op-system} image by _layering_ additional images onto the base image. This layering does not modify the base {op-system} image. Instead, it creates a _custom layered image_ that includes all {op-system} functionality and adds additional functionality to specific nodes in the cluster.
10+
{image-mode-os-caps} allows you to easily extend the functionality of your base {op-system} image by layering additional images onto the base image. This layering does not modify the base {op-system} image. Instead, it creates a _custom layered image_ that includes all {op-system} functionality and adds additional functionality to specific nodes in the cluster.
11+
12+
// Paragraph taken from Mark Russell draft (6/2/25) blog: https://docs.google.com/document/d/1DMaBg--3ljVlv0jqLJ4KjjFvGRA6J9gmF67Yq37uKdQ/edit?tab=t.0
13+
Image mode is a cloud-native approach to operating system management that treats your OS like a container image. You define your operating system configuration as code, build it as a unified image, and deploy it consistently across your entire fleet.
1114

1215
[id="coreos-layering-about_{context}"]
13-
== About {op-system} image layering
16+
== About {image-mode-os-lower}
1417

15-
Image layering allows you to customize the underlying node operating system on any of your cluster nodes. This helps keep everything up-to-date, including the node operating system and any added customizations such as specialized software.
18+
{image-mode-os-caps} allows you to customize the underlying node operating system on any of your cluster nodes. This helps keep everything up-to-date, including the node operating system and any added customizations such as specialized software.
1619

1720
You create a custom layered image by using a Containerfile and applying it to nodes by using a custom object. At any time, you can remove the custom layered image by deleting that custom object.
1821

19-
With {op-system} image layering, you can install RPMs into your base image, and your custom content will be booted alongside {op-system}. The Machine Config Operator (MCO) can roll out these custom layered images and monitor these custom containers in the same way it does for the default {op-system} image. {op-system} image layering gives you greater flexibility in how you manage your {op-system} nodes.
22+
With {image-mode-os-lower}, you can install RPMs into your base image, and your custom content will be booted alongside {op-system}. The Machine Config Operator (MCO) can roll out these custom layered images and monitor these custom containers in the same way it does for the default {op-system} image. {image-mode-os-caps} gives you greater flexibility in how you manage your {op-system} nodes.
2023

2124
// NOTE from https://issues.redhat.com/browse/OCPBUGS-2214?focusedCommentId=21430101&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-21430101
2225

@@ -29,9 +32,9 @@ As soon as you apply the custom layered image to your cluster, you effectively _
2932

3033
There are two methods for deploying a custom layered image onto your nodes:
3134

32-
On-cluster layering:: With xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on_mco-coreos-layering[on-cluster layering], you create a `MachineOSConfig` object where you include the Containerfile and other parameters. The build is performed on your cluster and the resulting custom layered image is automatically pushed to your repository and applied to the machine config pool that you specified in the `MachineOSConfig` object. The entire process is performed completely within your cluster.
35+
{image-mode-os-on-caps}:: With xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on_mco-coreos-layering[{image-mode-os-on-lower}], you create a `MachineOSConfig` object where you include the Containerfile and other parameters. The build is performed on your cluster and the resulting custom layered image is automatically pushed to your repository and applied to the machine config pool that you specified in the `MachineOSConfig` object. The entire process is performed completely within your cluster.
3336

34-
Out-of-cluster layering:: With xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring_mco-coreos-layering[out-of-cluster layering], you create a Containerfile that references an {product-title} image and the RPM that you want to apply, build the layered image in your own environment, and push the image to your repository. Then, in your cluster, create a `MachineConfig` object for the targeted node pool that points to the new image. The Machine Config Operator overrides the base {op-system} image, as specified by the `osImageURL` value in the associated machine config, and boots the new image.
37+
{image-mode-os-out-caps}:: With xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring_mco-coreos-layering[{image-mode-os-out-lower}], you create a Containerfile that references an {product-title} image and the RPM that you want to apply, build the layered image in your own environment, and push the image to your repository. Then, in your cluster, create a `MachineConfig` object for the targeted node pool that points to the new image. The Machine Config Operator overrides the base {op-system} image, as specified by the `osImageURL` value in the associated machine config, and boots the new image.
3538

3639
[IMPORTANT]
3740
====
@@ -41,9 +44,9 @@ For both methods, use the same base {op-system} image installed on the rest of y
4144
[id="coreos-layering-examples_{context}"]
4245
== Example Containerfiles
4346

44-
{op-system} image layering allows you to use the following types of images to create custom layered images:
47+
{image-mode-os-caps} allows you to use the following types of images to create custom layered images:
4548

46-
* *{product-title} Hotfixes*. You can work with Customer Experience and Engagement (CEE) to obtain and apply link:https://access.redhat.com/solutions/2996001[Hotfix packages] on top of your {op-system} image. In some instances, you might want a bug fix or enhancement before it is included in an official {product-title} release. {op-system} image layering allows you to easily add the Hotfix before it is officially released and remove the Hotfix when the underlying {op-system} image incorporates the fix.
49+
* *{product-title} Hotfixes*. You can work with Customer Experience and Engagement (CEE) to obtain and apply link:https://access.redhat.com/solutions/2996001[Hotfix packages] on top of your {op-system} image. In some instances, you might want a bug fix or enhancement before it is included in an official {product-title} release. {image-mode-os-caps} allows you to easily add the Hotfix before it is officially released and remove the Hotfix when the underlying {op-system} image incorporates the fix.
4750
+
4851
[IMPORTANT]
4952
====
@@ -177,16 +180,16 @@ It is strongly recommended that you test your images outside of your production
177180
include::modules/coreos-layering-configuring-on.adoc[leveloffset=+1]
178181

179182
.Additional resources
180-
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-proc_mco-coreos-layering[Using on-cluster layering to apply a custom layered image]
183+
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-proc_mco-coreos-layering[Using the {image-mode-os-on-lower} to apply a custom layered image]
181184
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-remove_mco-coreos-layering[Removing an on-cluster custom layered image]
182185
* xref:../updating/updating_a_cluster/update-using-custom-machine-config-pools.adoc#update-using-custom-machine-config-pools-pause_update-using-custom-machine-config-pools[Pausing the machine config pools]
183186
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-rebuild_mco-coreos-layering[Rebuilding an on-cluster custom layered image]
184187
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-revert_mco-coreos-layering[Reverting an on-cluster custom layered image]
185188
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-modifying_mco-coreos-layering[Modifying a custom layered image]
186189

187-
.Additional resources
188190
include::modules/coreos-layering-configuring-on-proc.adoc[leveloffset=+2]
189191

192+
.Additional resources
190193
* xref:../openshift_images/managing_images/using-image-pull-secrets.adoc#images-update-global-pull-secret_using-image-pull-secrets[Updating the global cluster pull secret]
191194
* xref:../machine_configuration/mco-coreos-layering.adoc#coreos-layering-configuring-on-revert_mco-coreos-layering[Reverting an on-cluster custom layered image]
192195

modules/coreos-layering-configuring-on-extensions.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include::snippets/coreos-layering-configuring-on-pause.adoc[]
1919

2020
.Prerequisites
2121

22-
* You have opted in to on-cluster layering by creating a `MachineOSConfig` object.
22+
* You have opted in to {image-mode-os-on-caps} by creating a `MachineOSConfig` object.
2323
2424
.Procedure
2525

modules/coreos-layering-configuring-on-modifying.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="coreos-layering-configuring-on-modifying_{context}"]
7-
= Modifying a custom layered image
7+
= Modifying an on-cluster custom layered image
88

99
You can modify an on-cluster custom layered image, as needed. This allows you to install additional packages, remove existing packages, change the pull or push repositories, update secrets, or other similar changes. You can edit the `MachineOSConfig` object, apply changes to the YAML file that created the `MachineOSConfig` object, or create a new YAML file for that purpose.
1010

@@ -14,7 +14,7 @@ include::snippets//coreos-layering-configuring-on-pause.adoc[]
1414

1515
.Prerequisites
1616

17-
* You have opted in to on-cluster layering by creating a `MachineOSConfig` object.
17+
* You have opted in to {image-mode-os-on-lower} by creating a `MachineOSConfig` object.
1818
1919
.Procedure
2020

modules/coreos-layering-configuring-on-proc.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="coreos-layering-configuring-on-proc_{context}"]
7-
= Using on-cluster layering to apply a custom layered image
7+
= Using the {image-mode-os-on-lower} to apply a custom layered image
88

99
To apply a custom layered image to your cluster by using the on-cluster build process, create a `MachineOSConfig` custom resource (CR) that specifies the following parameters:
1010

@@ -61,7 +61,7 @@ spec:
6161
name: builder-dockercfg-mtcl23
6262
----
6363
<1> Specifies the `machineconfiguration.openshift.io/v1` API that is required for `MachineConfig` CRs.
64-
<2> Specifies a name for the `MachineOSConfig` object. This name is used with other on-cluster layering resources. The examples in this documentation use the name `layered-image`.
64+
<2> Specifies a name for the `MachineOSConfig` object. This name is used with other [image-mode-os-on-lower] resources. The examples in this documentation use the name `layered-image`.
6565
<3> Specifies the name of the machine config pool associated with the nodes where you want to deploy the custom layered image. The examples in this documentation use the `layered` machine config pool.
6666
<4> Specifies the Containerfile to configure the custom layered image.
6767
<5> Specifies the architecture this containerfile is to be built for: `ARM64`, `AMD64`, `PPC64LE`, `S390X`, or `NoArch`. The default is `NoArch`, which defines a Containerfile that can be applied to any architecture.

modules/coreos-layering-configuring-on-rebuild.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
[id="coreos-layering-configuring-on-rebuild_{context}"]
77
= Rebuilding an on-cluster custom layered image
88

9-
In situations where you want to rebuild a custom layered image, you can either modify your `MachineOSConfig` object or add an annotation to the `MachineOSConfig` object. Both of these actions trigger an automatic rebuild of the object. For example, you could perform a rebuild if the you change the Containerfile or need to update the `osimageurl` location in a machine config.
9+
In situations where you want to rebuild an on-cluster custom layered image, you can either modify your `MachineOSConfig` object or add an annotation to the `MachineOSConfig` object. Both of these actions trigger an automatic rebuild of the object. For example, you could perform a rebuild if the you change the Containerfile or need to update the `osimageurl` location in a machine config.
1010

1111
After you add the annotation, the Machine Config Operator (MCO) deletes the current `MachineOSBuild` object and creates a new one in its place. When the build process is complete, the MCO automatically removes the annotation.
1212

1313
.Prerequisites
1414

15-
* You have opted-in to on-cluster layering by creating a `MachineOSConfig` object.
15+
* You have opted-in to {image-mode-os-on-lower} by creating a `MachineOSConfig` object.
1616
1717
.Procedure
1818

modules/coreos-layering-configuring-on-revert.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Before you remove the label, make sure the node is associated with another MCP.
1717

1818
.Prerequisites
1919

20-
* You have opted-in to on-cluster layering by creating a `MachineOSConfig` object.
20+
* You have opted-in to {image-mode-os-on-caps} by creating a `MachineOSConfig` object.
2121
* You have applied a `MachineOSConfig` object to a node in a custom machine config pool.
2222
2323
.Procedure

modules/coreos-layering-configuring-on.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:_mod-docs-content-type: CONCEPT
66
[id="coreos-layering-configuring-on_{context}"]
7-
= About on-cluster layering
7+
= About {image-mode-os-on-lower}
88

9-
You can use the on-cluster build process to apply a custom layered image to your nodes by creating a `MachineOSConfig` custom resource (CR), as described in "Using on-cluster layering to apply a custom layered image".
9+
You can use the {image-mode-os-lower} on-cluster build process to apply a custom layered image to your nodes by creating a `MachineOSConfig` custom resource (CR), as described in "Using {image-mode-os-on-caps} to apply a custom layered image".
1010

1111
When you create the object, the Machine Config Operator (MCO) creates a `MachineOSBuild` object and a builder pod. The process also creates transient objects, such as config maps, which are cleaned up after the build is complete. The `MachineOSBuild` object and the associated `builder-*` pod use the same naming scheme, `<MachineOSConfig_CR_name>-<hash>`, for example:
1212

@@ -75,11 +75,11 @@ You can modify an on-custom layered image as needed, to install additional packa
7575

7676
[discrete]
7777
[id="coreos-layering-configuring-on-limitations_{context}"]
78-
== On-cluster layering known limitations
78+
== {image-mode-os-on-caps} known limitations
7979

8080
Note the following limitations when working with the on-cluster layering feature:
8181

82-
* On-cluster layering is not supported on multi-architecture compute machines.
82+
* {image-mode-os-on-caps} is not supported on multi-architecture compute machines.
8383
* Using multiple `MachineOSConfig` objects on the same machine config pool is not supported. You need a separate `MachineOSConfig` CR for each machine config pool where you want to use a distinct custom layered image.
8484
* If you scale up a machine set that uses a custom layered image, the nodes reboot two times. The first, when the node is initially created with the base image and a second time when the custom layered image is applied.
8585
* Node disruption policies are not supported on nodes with a custom layered image. As a result the following configuration changes cause a node reboot:

modules/coreos-layering-configuring.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="coreos-layering-configuring_{context}"]
7-
= Using out-of-cluster layering to apply a custom layered image
7+
= Using {image-mode-os-out-caps} to apply a custom layered image
88

9-
You can easily configure {op-system-first} image layering on the nodes in specific machine config pools. The Machine Config Operator (MCO) reboots those nodes with the new custom layered image, overriding the base {op-system-first} image.
9+
You can use the {image-mode-os-lower} out-of-cluster build process to apply a custom layered image to your nodes by creating a `MachineOSConfig` custom resource (CR).
10+
11+
When you create the object, the Machine Config Operator (MCO) reboots those nodes with the new custom layered image, overriding the base {op-system-first} image.
1012

1113
To apply a custom layered image to your cluster, you must have the custom layered image in a repository that your cluster can access. Then, create a `MachineConfig` object that points to the custom layered image. You need a separate `MachineConfig` object for each machine config pool that you want to configure.
1214

0 commit comments

Comments
 (0)