From 7bbf21b215d36dc7a16def3c11b77c3b42a7a6d6 Mon Sep 17 00:00:00 2001 From: srir Date: Wed, 12 Feb 2025 14:45:39 +0530 Subject: [PATCH] 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 --- ...ages-imagestream-specify-architecture.adoc | 8 +- modules/migrating-from-x86-to-arm-cp.adoc | 113 ++++++++++++++++++ .../update-image-stream-to-multi-arch.adoc | 11 ++ .../migrating-to-multi-payload.adoc | 14 ++- 4 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 modules/migrating-from-x86-to-arm-cp.adoc create mode 100644 snippets/update-image-stream-to-multi-arch.adoc diff --git a/modules/images-imagestream-specify-architecture.adoc b/modules/images-imagestream-specify-architecture.adoc index bc8c9bd029..d7c6d9c9cf 100644 --- a/modules/images-imagestream-specify-architecture.adoc +++ b/modules/images-imagestream-specify-architecture.adoc @@ -18,8 +18,6 @@ $ oc import-image --from=// * Run the following command to update your image stream from single-architecture to multi-architecture: + -[source,terminal] ----- -$ oc import-image --from=// \ ---import-mode='PreserveOriginal' ----- \ No newline at end of file +-- +include::snippets/update-image-stream-to-multi-arch.adoc[] +-- \ No newline at end of file diff --git a/modules/migrating-from-x86-to-arm-cp.adoc b/modules/migrating-from-x86-to-arm-cp.adoc new file mode 100644 index 0000000000..53edc992a4 --- /dev/null +++ b/modules/migrating-from-x86-to-arm-cp.adoc @@ -0,0 +1,113 @@ +// Module included in the following assemblies: +// +// * updating/updating_a_cluster/migrating-to-multi-payload.adoc + +:_mod-docs-content-type: PROCEDURE +[id="migrating-from-x86-to-arm64-cp_{context}"] += Migrating the x86 control plane to arm64 architecture on {aws-full} + +You can migrate the control plane in your cluster from `x86` to `arm64` architecture on {aws-first}. + +.Prerequisites + +* You have installed the {oc-first}. +* You logged in to `oc` as a user with `cluster-admin` privileges. + +.Procedure + +. Check the architecture of the control plane nodes by running the following command: ++ +[source,terminal] +---- +$ oc get nodes -o wide +---- ++ +.Example output +[source,terminal] +---- +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +worker-001.example.com Ready worker 100d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +worker-002.example.com Ready worker 98d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +worker-003.example.com Ready worker 98d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +master-001.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +master-002.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +master-003.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +---- ++ +The `KERNEL-VERSION` field in the output indicates the architecture of the nodes. + +. Check that your cluster uses the multi payload by running the following command: ++ +[source,terminal] +---- +$ oc adm release info -o jsonpath="{ .metadata.metadata}" +---- ++ +If you see the following output, the cluster is multi-architecture compatible. ++ +[source,terminal] +---- +{ + "release.openshift.io/architecture": "multi", + "url": "https://access.redhat.com/errata/" +} +---- ++ +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". + +. Update your image stream from single-architecture to multi-architecture by running the following command: ++ +-- +include::snippets/update-image-stream-to-multi-arch.adoc[] +-- + +. Get the `arm64` compatible Amazon Machine Image (AMI) for configuring the control plane machine set by running the following command: ++ +[source,terminal] +---- +$ oc get configmap/coreos-bootimages -n openshift-machine-config-operator -o jsonpath='{.data.stream}' | jq -r '.architectures.aarch64.images.aws.regions."".image' <1> +---- +<1> Replace `` with the {aws-short} region where the current cluster is installed. You can get the {aws-short} region for the installed cluster by running the following command: ++ +[source,terminal] +---- +$ oc get infrastructure cluster -o jsonpath='{.status.platformStatus.aws.region}' +---- ++ +.Example output +[source,terminal] +---- +ami-xxxxxxx +---- + +. Update the control plane machine set to support the `arm64` architecture by running the following command: ++ +[source,terminal] +---- +$ oc edit controlplanemachineset.machine.openshift.io cluster -n openshift-machine-api +---- ++ +Update the `instanceType` field to a type that supports the `arm64` architecture, and set the `ami.id` field to an AMI that is compatible with the `arm64` architecture. For information about supported instance types, see "Tested instance types for {aws-short} on 64-bit ARM infrastructures". ++ +For more information about configuring the control plane machine set for {aws-short}, see "Control plane configuration options for {aws-full}". + +.Verification + +* Verify that the control plane nodes are now running on the `arm64` architecture: ++ +[source,terminal] +---- +$ oc get nodes -o wide +---- ++ +.Example output +[source,terminal] +---- +NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME +worker-001.example.com Ready worker 100d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +worker-002.example.com Ready worker 98d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +worker-003.example.com Ready worker 98d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.x86_64 cri-o://1.30.x +master-001.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.aarch64 cri-o://1.30.x +master-002.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.aarch64 cri-o://1.30.x +master-003.example.com Ready control-plane,master 120d v1.30.7 10.x.x.x Red Hat Enterprise Linux CoreOS 4xx.xx.xxxxx-0 5.x.x-xxx.x.x.el9_xx.aarch64 cri-o://1.30.x +---- diff --git a/snippets/update-image-stream-to-multi-arch.adoc b/snippets/update-image-stream-to-multi-arch.adoc new file mode 100644 index 0000000000..9ecd5b82dc --- /dev/null +++ b/snippets/update-image-stream-to-multi-arch.adoc @@ -0,0 +1,11 @@ +// Snippet included in the following assemblies: +// +// * updating/updating_a_cluster/migrating-from-x86-to-arm64-cp.adoc +// * openshift_images/images-imagestream-specify-architecture.adoc + +:_mod-docs-content-type: SNIPPET +[source,terminal] +---- +$ oc import-image --from=// \ +--import-mode='PreserveOriginal' +---- diff --git a/updating/updating_a_cluster/migrating-to-multi-payload.adoc b/updating/updating_a_cluster/migrating-to-multi-payload.adoc index 45a99473fe..e4095132e7 100644 --- a/updating/updating_a_cluster/migrating-to-multi-payload.adoc +++ b/updating/updating_a_cluster/migrating-to-multi-payload.adoc @@ -36,4 +36,16 @@ include::modules/migrating-to-multi-arch-cli.adoc[leveloffset=+1] * xref:../../updating/understanding_updates/understanding-update-channels-release.adoc#understanding-update-channels-releases[Understanding update channels and releases] * xref:../../installing/overview/installing-preparing.adoc#installing-preparing-selecting-cluster-type[Selecting a cluster installation type] * xref:../../machine_management/deploying-machine-health-checks.adoc#machine-health-checks-about_deploying-machine-health-checks[About machine health checks] -* xref:../../updating/updating_a_cluster/updating-cluster-cli.adoc#update-upgrading-oc-adm-upgrade-status_updating-cluster-cli[Gathering cluster update status using oc adm upgrade status (Technology Preview)] \ No newline at end of file +* xref:../../updating/updating_a_cluster/updating-cluster-cli.adoc#update-upgrading-oc-adm-upgrade-status_updating-cluster-cli[Gathering cluster update status using oc adm upgrade status (Technology Preview)] + +// Migrating the x86 control plane to the arm64 architecture on AWS +include::modules/migrating-from-x86-to-arm-cp.adoc[leveloffset=+1] + +[role="_additional-resources"] +.Additional resources + +* 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}] + +* 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] + +* 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]