Skip to content

Commit d7590ce

Browse files
authored
Merge pull request #57252 from mburke5678/mco-third-party-layering
OSDOCS-5139: Allow admins to add 3rd party and custom content to RHCOS
2 parents 91a0dcc + 93284e3 commit d7590ce

File tree

3 files changed

+40
-45
lines changed

3 files changed

+40
-45
lines changed

modules/coreos-layering-configuring.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ kind: MachineConfig
5959
metadata:
6060
labels:
6161
machineconfiguration.openshift.io/role: worker <1>
62-
name: os-layer-hotfix
62+
name: os-layer-custom
6363
spec:
6464
osImageURL: quay.io/my-registry/custom-image@sha256:306b606615dcf8f0e5e7d87fee3 <2>
6565
----
@@ -105,7 +105,7 @@ NAME GENERATEDBYCONTROLLER
105105
99-master-ssh 3.2.0 98m
106106
99-worker-generated-registries 5bdb57489b720096ef912f738b46330a8f577803 3.2.0 95m
107107
99-worker-ssh 3.2.0 98m
108-
os-layer-hotfix 10s <1>
108+
os-layer-custom 10s <1>
109109
rendered-master-15961f1da260f7be141006404d17d39b 5bdb57489b720096ef912f738b46330a8f577803 3.2.0 95m
110110
rendered-worker-5aff604cb1381a4fe07feaf1595a797e 5bdb57489b720096ef912f738b46330a8f577803 3.2.0 95m
111111
rendered-worker-5de4837625b1cbc237de6b22bc0bc873 5bdb57489b720096ef912f738b46330a8f577803 3.2.0 4s <2>

modules/coreos-layering-removing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To remove a {op-system-first} custom layered image from your cluster, you need t
1616
+
1717
[source,terminal]
1818
----
19-
$ oc delete mc os-layer-hotfix
19+
$ oc delete mc os-layer-custom
2020
----
2121
+
2222
After deleting the machine config, the nodes reboot.

post_installation_configuration/coreos-layering.adoc

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,27 @@ RPMs installed through a custom layered image can conflict with RPMs installed b
2222

2323
As soon as you apply the custom layered image to your cluster, you effectively _take ownership_ of your custom layered images and those nodes. While Red Hat remains responsible for maintaining and updating the base {op-system} image on standard nodes, you are responsible for maintaining and updating images on nodes that use a custom layered image. You assume the responsibility for the package you applied with the custom layered image and any issues that might arise with the package.
2424

25+
To apply a custom layered image, you create a Containerfile that references an {product-title} image and the RPM that you want to apply. You then push the resulting custom layered image to an image registry. In a non-production {product-title} cluster, create a `MachineConfig` object for the targeted node pool that points to the new image.
26+
27+
[NOTE]
28+
====
29+
Use the same base {op-system} image installed on the rest of your cluster. Use the `oc adm release info --image-for rhel-coreos-8` command to obtain the base image used in your cluster.
30+
====
31+
2532
:FeatureName: Image layering
2633
include::snippets/technology-preview.adoc[]
2734

28-
Currently, {op-system} image layering allows you to 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.
35+
{op-system} image layering allows you to use the following types of images to create custom layered images:
2936

37+
* *{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.
38+
+
3039
[IMPORTANT]
3140
====
3241
Some Hotfixes require a Red Hat Support Exception and are outside of the normal scope of {product-title} support coverage or life cycle policies.
3342
====
34-
43+
+
3544
In the event you want a Hotfix, it will be provided to you based on link:https://access.redhat.com/solutions/2996001[Red Hat Hotfix policy]. Apply it on top of the base image and test that new custom layered image in a non-production environment. When you are satisfied that the custom layered image is safe to use in production, you can roll it out on your own schedule to specific node pools. For any reason, you can easily roll back the custom layered image and return to using the default {op-system}.
36-
37-
[NOTE]
38-
====
39-
It is planned for future releases that you can use {op-system} image layering to incorporate third-party software packages such as libreswan or numactl.
40-
====
41-
42-
////
43-
Future features
44-
By using layering, you can extend your {op-system} in a number of ways, including:
45-
46-
* {op-system} Hotfixes
47-
* Third-party RHEL packages.
48-
* Bleeding edge drivers and kernel enhancements to improve performance or add capabilities.
49-
* Foresic client tools to investigate possible and actual break-ins.
50-
* Inventory agents that provide a coherent view of the entire fleet.
51-
* Critical and important CVEs as soon as errata are available in RHEL to keep your systems secure.
52-
* SSH Key management packages.
53-
////
54-
55-
To apply a custom layered image, you create a Containerfile that references an {product-title} image and the Hotfix that you want to apply. For example:
56-
57-
// For example, the following Containerfile installs a Hotfix:
58-
45+
+
5946
.Example Containerfile to apply a Hotfix
6047
[source,yaml]
6148
----
@@ -67,28 +54,36 @@ RUN rpm-ostree override replace https://example.com/myrepo/haproxy-1.0.16-5.el8.
6754
ostree container commit
6855
----
6956
70-
////
71-
For example, the following Containerfile installs the libreswan package from quay.io:
72-
[source,terminal]
57+
* *{op-system-base} packages*. You can download {op-system-base-full} packages from the link:https://access.redhat.com/downloads/content/479/ver=/rhel---9/9.1/x86_64/packages[Red Hat Customer Portal], such as chrony, firewalld, and iputils.
58+
+
59+
.Example Containerfile to apply a RHEL package
60+
[source,yaml]
7361
----
74-
# Using aa 4.12.0 image
75-
FROM quay.io/openshift-release-dev/ocp-release@sha256:6499bc69a0707fcad481c3cb73225b867dc31b345c6e6204e28
76-
RUN rpm-ostree install libreswan && \
77-
rpm-ostree cleanup -m && \
62+
FROM quay.io/openshift-release-dev/ocp-release@sha256:6499bc69a0707fcad481c3cb73225b867d
63+
ADD configure-firewall-playbook.yml .
64+
RUN rpm-ostree install firewalld ansible && \
65+
ansible-playbook configure-firewall-playbook.yml && \
66+
rpm -e ansible && \
7867
ostree container commit
7968
----
80-
////
8169
82-
[NOTE]
83-
====
84-
Use the same base {op-system} image installed on the rest of your cluster. Use the `oc adm release info --image-for rhel-coreos-8` command to obtain the base image used in your cluster.
85-
====
86-
87-
Push the resulting custom layered image to an image registry. In a non-production {product-title} cluster, create a `MachineConfig` object for the targeted node pool that points to the new image.
88-
89-
The Machine Config Operator (MCO) updates the operating system with content provided in the machine config. This creates a custom layered image that overrides the base {op-system} image on those nodes.
70+
* *Third-party packages*. You can download and install RPMs from third-party organizations, such as the following types of packages:
71+
+
72+
--
73+
** Bleeding edge drivers and kernel enhancements to improve performance or add capabilities.
74+
** Forensic client tools to investigate possible and actual break-ins.
75+
** Security agents.
76+
** Inventory agents that provide a coherent view of the entire cluster.
77+
** SSH Key management packages.
78+
--
79+
+
80+
.Example Containerfile to apply a third-party package from EPEL
81+
[source,yaml]
82+
----
83+
include::https://raw.githubusercontent.com/openshift/rhcos-image-layering-examples/master/htop/Containerfile[]
84+
----
9085
91-
After you create the machine config, the MCO:
86+
After you create the machine config, the Machine Config Operator (MCO) performs the following steps:
9287

9388
. Renders a new machine config for the specified pool or pools.
9489
. Performs cordon and drain operations on the nodes in the pool or pools.

0 commit comments

Comments
 (0)