Skip to content

Commit ea31514

Browse files
authored
Merge pull request #88184 from ShaunaDiaz/OSDOCS-13069
OSDOCS-13069: backport adding EUS repos to MicroShift 4.16
2 parents cfda84d + 3514b7a commit ea31514

6 files changed

+145
-4
lines changed

microshift_install/microshift-embed-in-rpm-ostree.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ include::snippets/microshift-rhde-compatibility-table-snip.adoc[leveloffset=+1]
2121

2222
include::modules/microshift-preparing-for-image-building.adoc[leveloffset=+1]
2323

24+
//This module version is specifically for the 4.16 branch due to refactors in 4.17.
25+
include::modules/microshift-embed-ostree-enable-eus-repos.adoc[leveloffset=+1]
26+
2427
include::modules/microshift-adding-repos-to-image-builder.adoc[leveloffset=+1]
2528

2629
[role="_additional-resources"]

microshift_updating/microshift-update-options.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Consider the following when planning to update {microshift-short}:
2525
* {op-system-base} or {op-system-ostree} updates are only required to update {microshift-short} if the existing operating system is not compatible with the new version of {microshift-short} that you want to use.
2626
* {microshift-short} operates as an in-place update and does not require removal of the previous version. Data backups beyond those required for the usual functioning of your applications are also not required.
2727

28+
include::snippets/microshift-unsupported-config-warn.adoc[leveloffset=+1]
29+
2830
[id="microshift-update-options-rpm-ostree-updates_{context}"]
2931
=== RPM-OSTree updates
3032
You can update {microshift-short} on an `rpm-ostree` system such as {op-system-ostree} by building a new image containing the new version of {microshift-short}. Ensure that the version of the operating system you want to use is compatible with the new version of {microshift-short} that you update to.

microshift_updating/microshift-update-rpms-manually.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ include::modules/microshift-updating-rpms-y.adoc[leveloffset=+1]
2525
//additional resources for backup and restore
2626
[role="_additional-resources"]
2727
.Additional resources
28-
* xref:../microshift_backup_and_restore/microshift-backup-and-restore.adoc#microshift-backup-and-restore[Backup and restore]
28+
* xref:../microshift_backup_and_restore/microshift-backup-and-restore.adoc#microshift-backup-and-restore[Backing up and restoring {microshift-short} data]
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_install/microshift-embed-into-rpm-ostree.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="microshift-enable-eus-repos_{context}"]
7+
= Enabling extended support repositories for image building
8+
9+
If you have an extended support (EUS) release of {microshift-short} or {op-system-base-full}, you must enable the {op-system-base} EUS repositories for image builder to use. If you do not have an EUS version, you can skip these steps.
10+
11+
.Prerequisites
12+
13+
* You have an EUS version of {microshift-short} or {op-system-base}, or you are updating to one.
14+
* You have root-user access to your build host.
15+
* You reviewed the link:https://docs.redhat.com/en/documentation/red_hat_build_of_microshift/4.16/html/installing/microshift-install-rpm#microshift-install-rpm-rhde-compatibility-table[{op-system-bundle} release compatibility matrix].
16+
17+
include::snippets/microshift-unsupported-config-warn.adoc[leveloffset=+1]
18+
19+
.Procedure
20+
21+
. Create the `/etc/osbuild-composer/repositories` directory by running the following command:
22+
+
23+
[source,terminal]
24+
----
25+
$ sudo mkdir -p /etc/osbuild-composer/repositories
26+
----
27+
28+
. Copy the `/usr/share/osbuild-composer/repositories/rhel-9.4.json` file into the `/etc/osbuild-composer/repositories` directory by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ sudo cp /usr/share/osbuild-composer/repositories/rhel-9.4.json /etc/osbuild-composer/repositories/rhel-9.4.json
33+
----
34+
35+
. Update the `baseos` source by modifying the `/etc/osbuild-composer/repositories/rhel-9.4.json` file with the following values:
36+
+
37+
[source,terminal]
38+
----
39+
# ...
40+
"baseurl": "https://cdn.redhat.com/content/eus/rhel<9>/<9.4>//baseos/os", # <1>
41+
# ...
42+
----
43+
<1> Replace _<9>_ with the major {op-system-base} version you are using, and replace _<9.4>_ with the _<major.minor>_ version. Be certain that the {op-system-base} version you choose is compatible with the {microshift-short} version you are using.
44+
45+
. Optional. Apply the `baseos` update by running the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ sudo sed -i "s,dist/rhel<9>/<9.4>/$(uname -m)/baseos/,eus/rhel<9>/<9.4>/$(uname -m)/baseos/,g" \
50+
/etc/osbuild-composer/repositories/rhel-<9.4>.json # <1>
51+
----
52+
<1> Replace _<9>_ with the major {op-system-base} version you are using, and replace _<9.4>_ with the _<major.minor>_ version. Be certain that the {op-system-base} version you choose is compatible with the {microshift-short} version you are using.
53+
54+
. Update the `appstream` source by modifying the `/etc/osbuild-composer/repositories/rhel-<major.minor>.json` file with the following values:
55+
+
56+
[source,terminal]
57+
----
58+
# ...
59+
"baseurl": "https://cdn.redhat.com/content/eus/rhel<9>/<9.4>//appstream/os", # <1>
60+
# ...
61+
----
62+
<1> Replace _<9>_ with the major {op-system-base} version you are using, and replace _<9.4>_ with the _<major.minor>_ version. Be certain that the {op-system-base} version you choose is compatible with the {microshift-short} version you are using.
63+
64+
. Optional. Apply the `appstream` update by running the following command:
65+
+
66+
[source,terminal]
67+
----
68+
$ sudo sed -i "s,dist/rhel<9>/<9.4>/$(uname -m)/appstream/,eus/rhel<9>/<9.4>/$(uname -m)/appstream/,g" \
69+
/etc/osbuild-composer/repositories/rhel-<9.4>.json # <1>
70+
----
71+
<1> Replace _<9>_ with the major {op-system-base} version you are using, and replace _<9.4>_ with the _<major.minor>_ version. Be certain that the {op-system-base} version you choose is compatible with the {microshift-short} version you are using.
72+
73+
.Verification
74+
75+
You can verify the repositories by using the `composer-cli` tool to display information about the source.
76+
77+
. Verify the `baseos` source by running the following command:
78+
+
79+
[source,terminal]
80+
----
81+
$ sudo composer-cli sources info baseos | grep 'url ='
82+
----
83+
.Example output
84+
+
85+
[source,text]
86+
----
87+
url = "https://cdn.redhat.com/content/eus/rhel9/9.4/x86_64/baseos/os"
88+
----
89+
90+
. Verify the `appstream` source by running the following command:
91+
+
92+
[source,terminal]
93+
----
94+
$ sudo composer-cli sources info appstream | grep 'url ='
95+
----
96+
.Example output
97+
+
98+
[source,text]
99+
----
100+
url = "https://cdn.redhat.com/content/eus/rhel9/9.4/x86_64/appstream/os"
101+
----
102+
103+
.Troubleshooting
104+
105+
* If you cannot verify the updated sources, restart the host and run the verification steps again.

modules/microshift-updating-rpms-y.adoc

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,29 @@ You cannot downgrade {microshift-short} with this process. Downgrades are not su
2727

2828
.Procedure
2929

30-
. Enable the {microshift-short} repositories by running the following command:
30+
. For all lifecycles, enable the repository for your release by running the following command:
3131
+
3232
[source,terminal,subs="attributes+"]
3333
----
3434
$ sudo subscription-manager repos \
35-
--enable rhocp-{ocp-version}-for-{rhel-major}-$(uname -m)-rpms \
36-
--enable fast-datapath-for-{rhel-major}-$(uname -m)-rpms
35+
--enable rhocp-4.16-for-9-$(uname -m)-rpms \
36+
--enable fast-datapath-for-9-$(uname -m)-rpms
37+
----
38+
39+
. For extended support (EUS) releases, also enable the EUS repositories by running the following command:
40+
+
41+
[source,terminal]
42+
----
43+
`$ sudo subscription-manager repos \
44+
--enable rhel-9-for-x86_64-appstream-eus-rpms \
45+
--enable rhel-9-for-x86_64-baseos-eus-rpms`
46+
----
47+
48+
. Avoid unintended future updates into an unsupported configuration by locking your operating system version with the following command:
49+
+
50+
[source,terminal]
51+
----
52+
$ sudo subscription-manager release --set=9.4 command.
3753
----
3854

3955
. Update the {microshift-short} RPMs by running the following command:
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Text snippet included in the following modules:
2+
//
3+
// * modules/microshift-updating-rpms-y.adoc
4+
// * modules/microshift-embed-ostree-enable-eus-repos.adoc
5+
// * assemblies/microshift-update-options.adoc
6+
// * assemblies/microshift-embed-in-rpm-ostree.adoc
7+
8+
:_mod-docs-content-type: SNIPPET
9+
10+
[WARNING]
11+
====
12+
Keeping component versions in a supported configuration of {op-system-bundle} can require updating {microshift-short} and {op-system-base} at the same time. Ensure that your version of {op-system-base} is compatible with the version of {microshift-short} you are updating to, especially if you are updating {microshift-short} across two minor versions. Otherwise, you can create an unsupported configuration, break your cluster, or both. For more information, see the link:https://docs.redhat.com/en/documentation/red_hat_build_of_microshift/4.16/html/installing/microshift-install-rpm#microshift-install-rpm-rhde-compatibility-table[Red Hat Device Edge release compatibility matrix].
13+
====
14+
15+
//This snippet is specifically for the 4.16 branch due to refactors in 4.17.

0 commit comments

Comments
 (0)