Skip to content

Commit e3da1c6

Browse files
committed
OSDOCS-13736: adds bootc to Updates MicroShift
1 parent 231f54d commit e3da1c6

10 files changed

+110
-30
lines changed

_topic_maps/_topic_map_ms.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ Topics:
100100
File: microshift-update-rpms-ostree
101101
- Name: Manual updates with RPMs
102102
File: microshift-update-rpms-manually
103+
- Name: Migrating from RHEL for Edge to image mode for RHEL
104+
File: microshift-update-rhel-edge-to-image-mode
103105
- Name: Listing update package contents
104106
File: microshift-list-update-contents
105107
---

microshift_updating/microshift-update-options.adoc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Only `rpm-ostree` updates include automatic rollbacks.
3030
====
3131

3232
[id="microshift-update-options-rpm-ostree-updates_{context}"]
33-
=== RPM-OSTree updates
33+
=== {op-system-ostree} updates
34+
3435
Using the {op-system-ostree} `rpm-ostree` update path allows for automated backup and system rollback in case any part of the update fails.
3536

3637
* You can update {microshift-short} on an `rpm-ostree` system such as {op-system-ostree} by building a new system image containing the new version of {microshift-short}.
@@ -83,12 +84,19 @@ You can update {op-system-ostree} or {op-system-base} and update {microshift-sho
8384
. Enable the correct {microshift-short} repository to ensure alignment between your {op-system-base} and {microshift-short} versions.
8485
. Use the {microshift-short} update type specific to your update path.
8586

87+
[id="microshift-update-options-edge-to-image_{context}"]
88+
== Migrating {microshift-short} from {op-system-ostree} to {op-system-image}
89+
90+
Starting with {microshift-short} 4.19, you can migrate your {microshift-short} cluster from {op-system-ostree} to {op-system-image} if the versions are compatible. Check compatibilities before beginning a migration. See the {op-system-base} documentation for instructions to migrate your image-based {op-system-base} system.
91+
//RHEL docs are coming soon
92+
8693
//additional resources for updating RHEL and MicroShift
8794
[role="_additional-resources"]
8895
.Additional resources
8996
* link:https://access.redhat.com/articles/rhel-eus#c5[How to Access EUS]
9097
* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/composing_a_customized_rhel_system_image/index[Composing a customized RHEL system image]
91-
* xref:../microshift_updating/microshift-update-rpms-ostree.adoc#microshift-update-rpms-ostree[Applying updates on an OSTree system]
98+
* xref:../microshift_updating/microshift-update-rpms-ostree.adoc#microshift-update-rpms-ostree[Applying updates on an {op-system-ostree} system]
9299
* xref:../microshift_updating/microshift-update-rpms-manually.adoc#microshift-update-rpms-manually[Applying updates manually with RPMs]
93100
* xref:../microshift_install_get_ready/microshift-greenboot.adoc#microshift-greenboot[The greenboot system health check]
94101
* xref:../microshift_running_apps/microshift-greenboot-workload-health-checks.adoc#microshift-greenboot-workload-health-checks[Greenboot workload health checks]
102+
//* xref:../microshift_updating/microshift-update-rhel-edge-to-image-mode.adoc#microshift-update-rhel-edge-to-image[Migrating {microshift-short} from {op-system-ostree} to {op-system-image}]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="microshift-update-rhel-edge-to-image-mode"]
3+
include::_attributes/attributes-microshift.adoc[]
4+
= Migrating {microshift-short} from {op-system-ostree} to {op-system-image}
5+
:context: microshift-update-rhel-edge-to-image
6+
7+
toc::[]
8+
9+
To migrate {microshift-short} from {op-system-ostree-first}, embed {microshift-short} on a new {op-system-image} image.
10+
11+
include::modules/microshift-update-edge-to-image.adoc[leveloffset=+1]
12+
13+
include::modules/microshift-updates-edge-to-image-uid-drift.adoc[leveloffset=+1]
14+
15+
//additional resources for image mode docs in RHEL
16+
//[role="_additional-resources"]
17+
//.Additional resources
18+
//TODO Add RHEL doc links when published

microshift_updating/microshift-update-rpms-manually.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include::_attributes/attributes-microshift.adoc[]
66

77
toc::[]
88

9-
Updating {product-title} for non-OSTree systems such as {op-system-base-full} requires updating the RPMs. For patch releases, such as 4.19.1 to 4.19.2, simply update the RPMs. For minor-version release updates, add the step of enabling the update repository using your subscription manager.
9+
Updating {product-title} for non-image-based {op-system-base-full} systems requires updating the RPMs. For patch releases, such as 4.19.1 to 4.19.2, simply update the RPMs. For minor-version release updates, add the step of enabling the update repository using your subscription manager.
1010

1111
[NOTE]
1212
====
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="microshift-update-rpms-ostree"]
3-
= Updating RPMs on an OSTree system
3+
= Updating RPMs on a RHEL for Edge system
44
include::_attributes/attributes-microshift.adoc[]
55
:context: microshift-update-rpms-ostree
66

77
toc::[]
88

9-
Updating {microshift-short} on an `rpm-ostree` system such as {op-system-ostree-first} requires building a new {op-system-ostree} image containing the new version of {microshift-short} and any associated optional RPMs. After you have the `rpm-ostree` image with {microshift-short} embedded, direct your system to boot into that operating system image.
9+
You can update {microshift-short} on {op-system-ostree-first} by embedding the new version of {microshift-short} on a new operating system image.
1010

11-
The procedures are the same for minor-version and patch updates. For example, use the same steps to upgrade from 4.18 to 4.19 or from 4.19.2 to 4.19.3.
12-
13-
[NOTE]
14-
====
15-
Downgrades other than automatic rollbacks are not supported. The following procedure is for updates only.
16-
====
11+
include::modules/microshift-updates-rpms-ostree-con.adoc[leveloffset=+1]
1712

1813
include::modules/microshift-updating-rpms-ostree.adoc[leveloffset=+1]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_updating/microshift-update-rhel-edge-to-image-mode.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="microshift-updates-edge-to-image-mode_{context}"]
7+
= Migrating {microshift-short} to {op-system-image}
8+
9+
Migrating {microshift-short} from a {op-system-ostree-first} system to a {op-system-image} system requires building a new {op-system-image} image containing the required version of {microshift-short} and any associated optional RPMs.
10+
11+
See the {op-system-base-full} documentation for general instructions on migrating {op-system-ostree} systems to {op-system-image} using the `bootc switch` command. Plan the upgrade process carefully. The following tips apply:
12+
13+
* Follow the instructions in the {op-system-base} documentation for converting `rpm-ostree` blueprint files to image mode container files.
14+
* You can use the `rpm-ostree compose container-encapsulate` image-compose command to create a base container image that can be used for bootc container builds. Then you can derive and familiarize yourself with an {op-system-image} image that is based on existing `ostree` commits.
15+
* To fully adopt {op-system-image}, define a container build pipeline.
16+
* Plan for UID and GID drift because {op-system-ostree} and {op-system-image} are not derived from the same parent image. See the {op-system-base} documentation for more information.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_updating/microshift-update-rhel-edge-to-image-mode.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="microshift-updates-edge-to-image-uid-drift_{context}"]
7+
= Working around UID and GID drift when migrating to {op-system-image}
8+
9+
If you do not re-install operating systems that are running {microshift-short}, you must use a workaround for a possible UID and GID drift during the migration process. One way to solve this problem is to add `systemd` units that apply the necessary fixes before the affected system services are started.
10+
11+
.Prerequisites
12+
13+
* You have an existing {op-system-ostree} deployment running {microshift-short}.
14+
* You have root access to the build host.
15+
* You have an image that you want to deploy.
16+
17+
.Procedure
18+
19+
* Solve the potential UID or GID drift for the Open vSwitch (OVS) `systemd` service, `ovsdb-server.service`, by adding the following command to the {microshift-short} image-build procedure:
20+
+
21+
[source,terminal]
22+
----
23+
# Install systemd configuration drop-ins to fix potential permission problems when upgrading from rpm-ostree commits to image mode container layers
24+
RUN mkdir -p /usr/lib/systemd/system/ovsdb-server.service.d && \
25+
cat > /usr/lib/systemd/system/ovsdb-server.service.d/microshift-ovsdb-ownership.conf <<'EOF'
26+
# The openvswitch database files must be owned by the appropriate user and its primary group. That the user and its group can be overwritten, recreate them.
27+
[Service]
28+
ExecStartPre=/bin/sh -c '/bin/getent passwd openvswitch >/dev/null || useradd -r openvswitch'
29+
ExecStartPre=/bin/sh -c '/bin/getent group hugetlbfs >/dev/null || groupadd -r hugetlbfs'
30+
ExecStartPre=/sbin/usermod -a -G hugetlbfs openvswitch
31+
ExecStartPre=/bin/chown -Rhv openvswitch. /etc/openvswitch
32+
EOF
33+
----
34+
35+
[IMPORTANT]
36+
====
37+
After the {microshift-short} migration to {op-system-image} is complete, this workaround is not needed and can be removed.
38+
====

modules/microshift-updates-rhde-config-rhel-repos.adoc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ $ sudo subscription-manager release --set=_<x.y>_ # <1>
2424
----
2525
<1> Replace _<x.y>_ with the major and minor version of your compatible {op-system-base} system. For example, _9.6_.
2626

27-
//this is the same command as above; is this correct?
28-
. Update both {microshift-short} and {op-system-base} versions by running the following command:
29-
+
30-
[source,terminal]
31-
----
32-
$ sudo subscription-manager release --set={ocp-version} # <1>
33-
----
34-
<1> You can replace _{ocp-version}_ with the major and minor version of your compatible {op-system-base} system if it is not the same version given in this example.
35-
3627
. If you are using an EUS {microshift-short} release, disable the {op-system-base} standard-support-scope repositories by running the following command:
3728
+
3829
[source,terminal]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//Module included in the following assemblies:
2+
//
3+
//* microshift_updating/microshift-update-rpms-ostree.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="microshift-updates-rpms-ostree-con_{context}"]
7+
= {microshift-short} updates on an {op-system-ostree} system
8+
9+
Updating {microshift-short} on a {op-system-ostree-first} system requires building a new {op-system-ostree} image containing the new version of {microshift-short} and any associated optional RPMs. After you create the `rpm-ostree` image with {microshift-short} embedded, you can boot into that operating system image.
10+
11+
The procedures are the same for minor-version and patch updates. For example, use the same steps to upgrade from 4.18 to 4.19 or from 4.19.2 to 4.19.3. The following details apply:
12+
13+
* Back up and system rollback are automatic with this update type.
14+
* You can use the following workflow to update applications running in the {microshift-short} cluster. Ensure compatibilities between the application and the adjacent versions of {microshift-short} and {op-system-ostree} before starting an update.
15+
* Downgrades other than automatic rollbacks are not supported. The following procedure is for updates only.
16+
+
17+
[IMPORTANT]
18+
====
19+
The steps you use depends on how your existing deployment is set up. The following procedure outlines the general steps you can take, with links to the {op-system-ostree} documentation. The {op-system-ostree} documentation is your resource for specific details on building an updated operating system image.
20+
====

modules/microshift-updating-rpms-ostree.adoc

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

55
:_mod-docs-content-type: PROCEDURE
66
[id="microshift-updates-rpms-ostree_{context}"]
7-
= Applying updates on an rpm-ostree system
7+
= Applying updates on an {op-system-ostree} system
88

9-
To update {microshift-short} on an `rpm-ostree` system such as {op-system-ostree-first}, embed the new version of {microshift-short} on a new operating system image.
10-
11-
* Back up and system rollback are automatic with this update type.
12-
* You can also use this workflow to update applications running in the {microshift-short} cluster. Ensure compatibility between the application and the adjacent versions of {microshift-short} and {op-system-ostree} before starting an update.
13-
14-
[IMPORTANT]
15-
====
16-
The steps you use depends on how your existing deployment is set up. The following procedure outlines the general steps you can take, with links to the {op-system-ostree} documentation. The {op-system-ostree} documentation is your resource for specific details on building an updated operating system image.
17-
====
9+
To update {microshift-short} on {op-system-ostree-first}, embed the new version of {microshift-short} on a new operating system image.
1810

1911
.Prerequisites
2012

0 commit comments

Comments
 (0)