Skip to content

Commit 7e7f737

Browse files
authored
Merge pull request #98970 from bscott-rh/MULTIARCH-5409
MULTIARCH-5409 migrating machine sets to/from x86/arm on GCP
2 parents 194cac2 + 2dd5a50 commit 7e7f737

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed
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+
// * updating/updating_a_cluster/migrating-to-multi-payload.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="multiarch-migrating-cp-infra-gcp_{context}"]
7+
= Migrating control plane or infra machine sets between architectures on {gcp-full}
8+
9+
You can migrate the control plane or infra machine sets in your {gcp-short} cluster between `x86` and `arm64` architectures.
10+
11+
.Prerequisites
12+
13+
* You have installed the {oc-first}.
14+
* You logged in to `oc` as a user with `cluster-admin` privileges.
15+
16+
.Procedure
17+
18+
. Check the architecture of the control plane or infra nodes by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc get nodes -o wide
23+
----
24+
+
25+
.Example output
26+
[source,terminal]
27+
----
28+
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
29+
worker-001.example.com Ready infra 100d v1.30.7 10.x.x.x <none> Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x
30+
master-001.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x <none> Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x
31+
----
32+
+
33+
The `KERNEL-VERSION` field in the output indicates the architecture of the nodes.
34+
35+
. Check that your cluster uses the multi payload by running the following command:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc adm release info -o jsonpath="{ .metadata.metadata}"
40+
----
41+
+
42+
If you see the following output, the cluster is multi-architecture compatible.
43+
+
44+
[source,terminal]
45+
----
46+
{
47+
"release.openshift.io/architecture": "multi",
48+
"url": "https://access.redhat.com/errata/<errata_version>"
49+
}
50+
----
51+
+
52+
If the cluster is not using the multi payload, migrate the cluster to a multi-architecture cluster. For more information, see "Migrating to a cluster with multi-architecture compute machines".
53+
54+
. If you use any custom image streams, update them from single-architecture to multi-architecture by running the following command for each image stream:
55+
+
56+
--
57+
include::snippets/update-image-stream-to-multi-arch.adoc[]
58+
--
59+
60+
. Select an instance type that matches the target architecture from link:https://cloud.google.com/compute/docs/general-purpose-machines[General-purpose machine family for Compute engine] (Google documentation). Check the link:https://cloud.google.com/compute/docs/regions-zones#available[Available regions and zones] table (Google documentation) to verify that the instance type is supported in your zone.
61+
62+
. Select a supported disk type for the instance type that you selected from the "Supported disk types" section of link:https://cloud.google.com/compute/docs/general-purpose-machines[General-purpose machine family for Compute engine] (Google documentation).
63+
64+
. Determine the {gcp-short} image that the machine set uses after migration by running the following command:
65+
+
66+
[source,terminal]
67+
----
68+
$ oc get configmap/coreos-bootimages \
69+
-n openshift-machine-config-operator \
70+
-o jsonpath='{.data.stream}' | jq \
71+
-r '.architectures.aarch64.images.gcp'
72+
----
73+
+
74+
.Example output
75+
[source,terminal]
76+
----
77+
"gcp": {
78+
"release": "415.92.202309142014-0",
79+
"project": "rhcos-cloud",
80+
"name": "rhcos-415-92-202309142014-0-gcp-aarch64"
81+
}
82+
----
83+
Use the `project` and `name` parameters from the output to form the `image` parameter in the following format: `projects/<project>/global/images/<name>`.
84+
85+
. To migrate the control plane to another architecture, run the following command:
86+
+
87+
[source,terminal]
88+
----
89+
$ oc edit controlplanemachineset.machine.openshift.io cluster -n openshift-machine-api
90+
----
91+
+
92+
.. Replace the `disks.type` parameter with the disk type that you selected.
93+
.. Replace the `disks.image` parameter with the `image` parameter that you formed previously.
94+
.. Replace the `machineType` parameter with the instance type that you selected.
95+
96+
. To migrate an infra machine set to another architecture, run the following command using the ID of an infra machine set:
97+
+
98+
[source,terminal]
99+
----
100+
$ oc edit machineset <infra-machine-set_id> -n openshift-machine-api
101+
----
102+
+
103+
.. Replace the `disks.type` parameter with the disk type that you selected.
104+
.. Replace the `disks.image` parameter with the `image` parameter that you formed previously.
105+
.. Replace the `machineType` parameter with the instance type that you selected.

updating/updating_a_cluster/migrating-to-multi-payload.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,16 @@ include::modules/migrating-to-multi-arch-cli.adoc[leveloffset=+1]
4141
// Migrating the x86 control plane to the arm64 architecture on AWS
4242
include::modules/migrating-from-x86-to-arm-cp.adoc[leveloffset=+1]
4343

44+
// Migrating CP or infra between x86 and arm on GCP
45+
include::modules/multiarch-migrating-cp-infra-gcp.adoc[leveloffset=+1]
46+
4447
[role="_additional-resources"]
4548
.Additional resources
4649

4750
* xref:../../machine_management/control_plane_machine_management/cpmso_provider_configurations/cpmso-config-options-aws.adoc#cpmso-config-options-aws[Control plane configuration options for {aws-full}]
4851
4952
* xref:../../installing/installing_aws/upi/upi-aws-installation-reqs.adoc#installation-aws-arm-tested-machine-types_upi-aws-installation-reqs[Tested instance types for AWS on 64-bit ARM infrastructures]
5053
54+
* xref:../../installing/installing_gcp/installing-gcp-customizations.adoc#installation-gcp-tested-machine-types-arm_installing-gcp-customizations[Tested instance types for GCP on 64-bit ARM infrastructures]
55+
5156
* xref:../../updating/updating_a_cluster/migrating-to-multi-payload.adoc#migrating-to-multi-arch-cli_updating-clusters-overview[Migrating to a cluster with multi-architecture compute machines using the CLI]

0 commit comments

Comments
 (0)