Skip to content

Commit 1b25ad9

Browse files
authored
Merge pull request #86622 from xenolinux/single-to-multiarch
OSDOCS#11510: HCP: single-architecture to multi-architecture migration
2 parents 770c92a + 9df36f2 commit 1b25ad9

File tree

3 files changed

+239
-0
lines changed

3 files changed

+239
-0
lines changed

hosted_control_planes/hcp-manage/hcp-manage-aws.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ include::modules/hcp-managed-aws-infra-separate.adoc[leveloffset=+2]
3232
include::modules/hcp-managed-aws-iam-separate.adoc[leveloffset=+2]
3333

3434
include::modules/hcp-managed-aws-hc-separate.adoc[leveloffset=+2]
35+
36+
include::modules/hcp-migrate-aws-single-to-multiarch.adoc[leveloffset=+1]
37+
38+
include::modules/hcp-migrate-aws-multiarch-nodepools.adoc[leveloffset=+1]
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-manage/hcp-manage-aws.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-migrate-aws-multiarch-nodepools_{context}"]
7+
= Creating node pools on the multi-architecture hosted cluster
8+
9+
After transitioning your hosted cluster from single-architecture to multi-architecture, create node pools on compute machines based on 64-bit AMD and 64-bit ARM architectures.
10+
11+
.Procedure
12+
13+
. Create node pools based on 64-bit ARM architecture by entering the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ hcp create nodepool aws \
18+
--cluster-name <hosted_cluster_name> \// <1>
19+
--name <nodepool_name> \// <2>
20+
--node-count=<node_count> \// <3>
21+
--arch arm64
22+
----
23+
<1> Replace `<hosted_cluster_name>` with your hosted cluster name.
24+
<2> Replace `<nodepool_name>` with your node pool name.
25+
<3> Replace `<node_count>` with integer for your node count, for example, `2`.
26+
27+
. Create node pools based on 64-bit AMD architecture by entering the following command:
28+
+
29+
[source,terminal]
30+
----
31+
$ hcp create nodepool aws \
32+
--cluster-name <hosted_cluster_name> \// <1>
33+
--name <nodepool_name> \// <2>
34+
--node-count=<node_count> \// <3>
35+
--arch amd64
36+
----
37+
<1> Replace `<hosted_cluster_name>` with your hosted cluster name.
38+
<2> Replace `<nodepool_name>` with your node pool name.
39+
<3> Replace `<node_count>` with integer for your node count, for example, `2`.
40+
41+
.Verification
42+
43+
* Verify that a node pool is using the multi-architecture release image by entering the following command:
44+
+
45+
[source,terminal]
46+
----
47+
$ oc get nodepool/<nodepool_name> -oyaml
48+
----
49+
+
50+
.Example output for 64-bit AMD node pools
51+
[source,yaml]
52+
----
53+
#...
54+
spec:
55+
arch: amd64
56+
#...
57+
release:
58+
image: quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi <1>
59+
----
60+
<1> Replace `<4.y.z>` with the supported {product-title} version that you use.
61+
+
62+
.Example output for 64-bit ARM node pools
63+
[source,yaml]
64+
----
65+
#...
66+
spec:
67+
arch: arm64
68+
#...
69+
release:
70+
image: quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi
71+
----
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-manage/hcp-manage-aws.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-migrate-aws-single-to-multiarch_{context}"]
7+
= Transitioning a hosted cluster from single-architecture to multi-architecture
8+
9+
You can transition your single-architecture 64-bit AMD hosted cluster to a multi-architecture hosted cluster on {aws-first}, to reduce the cost of running workloads on your cluster. For example, you can run existing workloads on 64-bit AMD while transitioning to 64-bit ARM and you can manage these workloads from a central Kubernetes cluster.
10+
11+
A single-architecture hosted cluster can manage node pools of only one particular CPU architecture. However, a multi-architecture hosted cluster can manage node pools with different CPU architectures. On {aws-short}, a multi-architecture hosted cluster can manage both 64-bit AMD and 64-bit ARM node pools.
12+
13+
.Prerequisites
14+
15+
* You have installed an {product-title} management cluster for {aws-short} on {rh-rhacm-first} with the {mce}.
16+
* You have an existing single-architecture hosted cluster that uses 64-bit AMD variant of the {product-title} release payload.
17+
* An existing node pool that uses the same 64-bit AMD variant of the {product-title} release payload and is managed by an existing hosted cluster.
18+
* Ensure that you installed the following command-line tools:
19+
20+
** `oc`
21+
** `kubectl`
22+
** `hcp`
23+
** `skopeo`
24+
25+
.Procedure
26+
27+
. Review an existing {product-title} release image of the single-architecture hosted cluster by running the following command:
28+
+
29+
[source,terminal]
30+
----
31+
$ oc get hostedcluster/<hosted_cluster_name> -o jsonpath='{.spec.release.image}' <1>
32+
----
33+
+
34+
<1> Replace `<hosted_cluster_name>` with your hosted cluster name.
35+
+
36+
.Example output
37+
[source,terminal]
38+
----
39+
quay.io/openshift-release-dev/ocp-release:<4.y.z>-x86_64 <1>
40+
----
41+
<1> Replace `<4.y.z>` with the supported {product-title} version that you use.
42+
43+
. In your {product-title} release image, if you use the digest instead of a tag, find the multi-architecture tag version of your release image:
44+
45+
.. Set the `OCP_VERSION` environment variable for the {product-title} version by running the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ OCP_VERSION=$(oc image info quay.io/openshift-release-dev/ocp-release@sha256:ac78ebf77f95ab8ff52847ecd22592b545415e1ff6c7ff7f66bf81f158ae4f5e -o jsonpath='{.config.config.Labels["io.openshift.release"]}')
50+
----
51+
52+
.. Set the `MULTI_ARCH_TAG` environment variable for the multi-architecture tag version of your release image by running the following command:
53+
+
54+
[source,terminal]
55+
----
56+
$ MULTI_ARCH_TAG=$(skopeo inspect docker://quay.io/openshift-release-dev/ocp-release@sha256:ac78ebf77f95ab8ff52847ecd22592b545415e1ff6c7ff7f66bf81f158ae4f5e | jq -r '.RepoTags' | sed 's/"//g' | sed 's/,//g' | grep -w "$OCP_VERSION-multi$" | xargs)
57+
----
58+
59+
.. Set the `IMAGE` environment variable for the multi-architecture release image name by running the following command:
60+
+
61+
[source,terminal]
62+
----
63+
$ IMAGE=quay.io/openshift-release-dev/ocp-release:$MULTI_ARCH_TAG
64+
----
65+
66+
.. To see the list of multi-architecture image digests, run the following command:
67+
+
68+
[source,terminal]
69+
----
70+
$ oc image info $IMAGE
71+
----
72+
+
73+
.Example output
74+
[source,terminal]
75+
----
76+
OS DIGEST
77+
linux/amd64 sha256:b4c7a91802c09a5a748fe19ddd99a8ffab52d8a31db3a081a956a87f22a22ff8
78+
linux/ppc64le sha256:66fda2ff6bd7704f1ba72be8bfe3e399c323de92262f594f8e482d110ec37388
79+
linux/s390x sha256:b1c1072dc639aaa2b50ec99b530012e3ceac19ddc28adcbcdc9643f2dfd14f34
80+
linux/arm64 sha256:7b046404572ac96202d82b6cb029b421dddd40e88c73bbf35f602ffc13017f21
81+
----
82+
83+
. Transition the hosted cluster from single-architecture to multi-architecture:
84+
85+
.. Set the multi-architecture {product-title} release image for the hosted cluster by ensuring that you use the same {product-title} version as the hosted cluster. Run the following command:
86+
+
87+
[source,terminal]
88+
----
89+
$ oc patch -n clusters hostedclusters/<hosted_cluster_name> -p '{"spec":{"release":{"image":"quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi"}}}' --type=merge <1>
90+
----
91+
<1> Replace `<4.y.z>` with the supported {product-title} version that you use.
92+
93+
.. Confirm that the multi-architecture image is set in your hosted cluster by running the following command:
94+
+
95+
[source,terminal]
96+
----
97+
$ oc get hostedcluster/<hosted_cluster_name> -o jsonpath='{.spec.release.image}'
98+
----
99+
100+
. Check that the status of the `HostedControlPlane` resource is `Progressing` by running the following command:
101+
+
102+
[source,terminal]
103+
----
104+
$ oc get hostedcontrolplane -n <hosted_control_plane_namespace> -oyaml
105+
----
106+
+
107+
.Example output
108+
[source,yaml]
109+
----
110+
#...
111+
- lastTransitionTime: "2024-07-28T13:07:18Z"
112+
message: HostedCluster is deploying, upgrading, or reconfiguring
113+
observedGeneration: 5
114+
reason: Progressing
115+
status: "True"
116+
type: Progressing
117+
#...
118+
----
119+
120+
. Check that the status of the `HostedCluster` resource is `Progressing` by running the following command:
121+
+
122+
[source,terminal]
123+
----
124+
$ oc get hostedcluster <hosted_cluster_name> -n <hosted_cluster_namespace> -oyaml
125+
----
126+
127+
.Verification
128+
129+
* Verify that a node pool is using the multi-architecture release image in your `HostedControlPlane` resource by running the following command:
130+
+
131+
[source,terminal]
132+
----
133+
$ oc get hostedcontrolplane -n clusters-example -oyaml
134+
----
135+
+
136+
.Example output
137+
[source,yaml]
138+
----
139+
#...
140+
version:
141+
availableUpdates: null
142+
desired:
143+
image: quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi <1>
144+
url: https://access.redhat.com/errata/RHBA-2024:4855
145+
version: 4.16.5
146+
history:
147+
- completionTime: "2024-07-28T13:10:58Z"
148+
image: quay.io/openshift-release-dev/ocp-release:<4.x.y>-multi
149+
startedTime: "2024-07-28T13:10:27Z"
150+
state: Completed
151+
verified: false
152+
version: <4.x.y>
153+
----
154+
<1> Replace `<4.y.z>` with the supported {product-title} version that you use.
155+
156+
+
157+
[NOTE]
158+
====
159+
The multi-architecture {product-title} release image is updated in your `HostedCluster`, `HostedControlPlane` resources, and hosted control plane pods. However, your existing node pools do not transition with the multi-architecture image automatically, because the release image transition is decoupled between the hosted cluster and node pools. You must create new node pools on your new multi-architecture hosted cluster.
160+
====
161+
162+
.Next steps
163+
164+
* Creating node pools on the multi-architecture hosted cluster

0 commit comments

Comments
 (0)