Skip to content

Commit 2e6dd90

Browse files
authored
Merge pull request #76246 from sr1kar99/10130-arm-cp-with-x86-compute-nodes
OSDOCS#10130: Doc support for ARM control plane with x86 compute nodes
2 parents eecaee9 + df6de03 commit 2e6dd90

11 files changed

+275
-76
lines changed

modules/multi-architecture-creating-arm64-bootimage.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
:_mod-docs-content-type: PROCEDURE
66
[id="multi-architecture-creating-arm64-bootimage_{context}"]
77

8-
= Creating an ARM64 boot image using the Azure image gallery
8+
= Creating a 64-bit ARM boot image using the Azure image gallery
99

10-
The following procedure describes how to manually generate an ARM64 boot image.
10+
The following procedure describes how to manually generate a 64-bit ARM boot image.
1111

1212
.Prerequisites
1313

@@ -21,7 +21,7 @@ The following procedure describes how to manually generate an ARM64 boot image.
2121
----
2222
$ az login
2323
----
24-
. Create a storage account and upload the `arm64` virtual hard disk (VHD) to your storage account. The {product-title} installation program creates a resource group, however, the boot image can also be uploaded to a custom named resource group:
24+
. Create a storage account and upload the `aarch64` virtual hard disk (VHD) to your storage account. The {product-title} installation program creates a resource group, however, the boot image can also be uploaded to a custom named resource group:
2525
+
2626
[source,terminal]
2727
----
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
//Module included in the following assemblies
2+
//
3+
//post_installation_configuration/cluster-tasks.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="multi-architecture-creating-x86-64-bootimage_{context}"]
7+
= Creating a 64-bit x86 boot image using the Azure image gallery
8+
9+
The following procedure describes how to manually generate a 64-bit x86 boot image.
10+
11+
.Prerequisites
12+
13+
* You installed the Azure CLI (`az`).
14+
* You created a single-architecture Azure installer-provisioned cluster with the multi-architecture installer binary.
15+
16+
.Procedure
17+
18+
. Log in to your Azure account by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ az login
23+
----
24+
. Create a storage account and upload the `x86_64` virtual hard disk (VHD) to your storage account by running the following command. The {product-title} installation program creates a resource group. However, the boot image can also be uploaded to a custom named resource group:
25+
+
26+
[source,terminal]
27+
----
28+
$ az storage account create -n ${STORAGE_ACCOUNT_NAME} -g ${RESOURCE_GROUP} -l westus --sku Standard_LRS <1>
29+
----
30+
+
31+
<1> The `westus` object is an example region.
32+
+
33+
. Create a storage container using the storage account you generated by running the following command:
34+
+
35+
[source,terminal]
36+
+
37+
----
38+
$ az storage container create -n ${CONTAINER_NAME} --account-name ${STORAGE_ACCOUNT_NAME}
39+
----
40+
. Use the {product-title} installation program JSON file to extract the URL and `x86_64` VHD name:
41+
.. Extract the `URL` field and set it to `RHCOS_VHD_ORIGIN_URL` as the file name by running the following command:
42+
+
43+
[source,terminal]
44+
----
45+
$ RHCOS_VHD_ORIGIN_URL=$(oc -n openshift-machine-config-operator get configmap/coreos-bootimages -o jsonpath='{.data.stream}' | jq -r '.architectures.x86_64."rhel-coreos-extensions"."azure-disk".url')
46+
----
47+
.. Extract the `x86_64` VHD name and set it to `BLOB_NAME` as the file name by running the following command:
48+
+
49+
[source,terminal]
50+
----
51+
$ BLOB_NAME=rhcos-$(oc -n openshift-machine-config-operator get configmap/coreos-bootimages -o jsonpath='{.data.stream}' | jq -r '.architectures.x86_64."rhel-coreos-extensions"."azure-disk".release')-azure.x86_64.vhd
52+
----
53+
. Generate a shared access signature (SAS) token. Use this token to upload the {op-system} VHD to your storage container by running the following commands:
54+
+
55+
[source,terminal]
56+
----
57+
$ end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
58+
----
59+
+
60+
[source,terminal]
61+
----
62+
$ sas=`az storage container generate-sas -n ${CONTAINER_NAME} --account-name ${STORAGE_ACCOUNT_NAME} --https-only --permissions dlrw --expiry $end -o tsv`
63+
----
64+
. Copy the {op-system} VHD into the storage container by running the following command:
65+
+
66+
[source,terminal]
67+
----
68+
$ az storage blob copy start --account-name ${STORAGE_ACCOUNT_NAME} --sas-token "$sas" \
69+
--source-uri "${RHCOS_VHD_ORIGIN_URL}" \
70+
--destination-blob "${BLOB_NAME}" --destination-container ${CONTAINER_NAME}
71+
----
72+
+
73+
You can check the status of the copying process by running the following command:
74+
+
75+
[source,terminal]
76+
----
77+
$ az storage blob show -c ${CONTAINER_NAME} -n ${BLOB_NAME} --account-name ${STORAGE_ACCOUNT_NAME} | jq .properties.copy
78+
----
79+
+
80+
.Example output
81+
[source,terminal]
82+
----
83+
{
84+
"completionTime": null,
85+
"destinationSnapshot": null,
86+
"id": "1fd97630-03ca-489a-8c4e-cfe839c9627d",
87+
"incrementalCopy": null,
88+
"progress": "17179869696/17179869696",
89+
"source": "https://rhcos.blob.core.windows.net/imagebucket/rhcos-411.86.202207130959-0-azure.aarch64.vhd",
90+
"status": "success", <1>
91+
"statusDescription": null
92+
}
93+
----
94+
+
95+
<1> If the `status` parameter displays the `success` object, the copying process is complete.
96+
97+
. Create an image gallery by running the following command:
98+
+
99+
[source,terminal]
100+
----
101+
$ az sig create --resource-group ${RESOURCE_GROUP} --gallery-name ${GALLERY_NAME}
102+
----
103+
104+
. Use the image gallery to create an image definition by running the following command:
105+
+
106+
[source,terminal]
107+
----
108+
$ az sig image-definition create --resource-group ${RESOURCE_GROUP} --gallery-name ${GALLERY_NAME} --gallery-image-definition rhcos-x86_64 --publisher RedHat --offer x86_64 --sku x86_64 --os-type linux --architecture x64 --hyper-v-generation V2
109+
----
110+
+
111+
In this example command, `rhcos-x86_64` is the name of the image definition.
112+
113+
. To get the URL of the VHD and set it to `RHCOS_VHD_URL` as the file name, run the following command:
114+
+
115+
[source,terminal]
116+
----
117+
$ RHCOS_VHD_URL=$(az storage blob url --account-name ${STORAGE_ACCOUNT_NAME} -c ${CONTAINER_NAME} -n "${BLOB_NAME}" -o tsv)
118+
----
119+
. Use the `RHCOS_VHD_URL` file, your storage account, resource group, and image gallery to create an image version by running the following command:
120+
+
121+
[source,terminal]
122+
----
123+
$ az sig image-version create --resource-group ${RESOURCE_GROUP} --gallery-name ${GALLERY_NAME} --gallery-image-definition rhcos-arm64 --gallery-image-version 1.0.0 --os-vhd-storage-account ${STORAGE_ACCOUNT_NAME} --os-vhd-uri ${RHCOS_VHD_URL}
124+
----
125+
+
126+
In this example, `1.0.0` is the image version.
127+
128+
. Optional: Access the ID of the generated `x86_64` boot image by running the following command:
129+
+
130+
[source,terminal]
131+
----
132+
$ az sig image-version show -r $GALLERY_NAME -g $RESOURCE_GROUP -i rhcos-x86_64 -e 1.0.0
133+
----
134+
The following example image ID is used in the `recourseID` parameter of the compute machine set:
135+
+
136+
.Example `resourceID`
137+
[source,terminal]
138+
----
139+
/resourceGroups/${RESOURCE_GROUP}/providers/Microsoft.Compute/galleries/${GALLERY_NAME}/images/rhcos-x86_64/versions/1.0.0
140+
----

modules/multi-architecture-modify-machine-set-aws.adoc

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,30 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="multi-architecture-modify-machine-set-aws_{context}"]
7+
= Adding a multi-architecture compute machine set to your AWS cluster
78

8-
= Adding an ARM64 compute machine set to your cluster
9+
After creating a multi-architecture cluster, you can add nodes with different architectures.
910

10-
To configure a cluster with multi-architecture compute machines, you must create a AWS ARM64 compute machine set. This adds ARM64 compute nodes to your cluster so that your cluster has multi-architecture compute machines.
11+
You can add multi-architecture compute machines to a multi-architecture cluster in the following ways:
12+
13+
* Adding 64-bit x86 compute machines to a cluster that uses 64-bit ARM control plane machines and already includes 64-bit ARM compute machines. In this case, 64-bit x86 is considered the secondary architecture.
14+
* Adding 64-bit ARM compute machines to a cluster that uses 64-bit x86 control plane machines and already includes 64-bit x86 compute machines. In this case, 64-bit ARM is considered the secondary architecture.
1115
1216
include::snippets/about-multiarch-tuning-operator.adoc[]
1317

1418
.Prerequisites
1519

16-
* You installed the OpenShift CLI (`oc`).
17-
* You used the installation program to create an AMD64 single-architecture AWS cluster with the multi-architecture installer binary.
18-
20+
* You installed the {oc-first}.
21+
* You used the installation program to create an 64-bit ARM or 64-bit x86 single-architecture AWS cluster with the multi-architecture installer binary.
1922
2023
.Procedure
21-
* Create and modify a compute machine set, this will control the ARM64 compute nodes in your cluster.
24+
25+
. Log in to the {oc-first}.
26+
27+
. Create a YAML file, and add the configuration to create a compute machine set to control the 64-bit ARM or 64-bit x86 compute nodes in your cluster.
2228
+
2329
--
24-
[source,terminal]
25-
----
26-
$ oc create -f aws-arm64-machine-set-0.yaml
27-
----
28-
.Sample YAML compute machine set to deploy an ARM64 compute node
30+
.Example `MachineSet` object for an AWS 64-bit ARM or x86 compute node
2931

3032
[source,yaml]
3133
----
@@ -34,7 +36,7 @@ kind: MachineSet
3436
metadata:
3537
labels:
3638
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
37-
name: <infrastructure_id>-aws-arm64-machine-set-0 <1>
39+
name: <infrastructure_id>-aws-machine-set-0 <1>
3840
namespace: openshift-machine-api
3941
spec:
4042
replicas: 1
@@ -91,15 +93,15 @@ spec:
9193
userDataSecret:
9294
name: worker-user-data
9395
----
94-
<1> Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. If you have the OpenShift CLI installed, you can obtain the infrastructure ID by running the following command:
96+
<1> Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. If you have the {oc-first} installed, you can obtain the infrastructure ID by running the following command:
9597
+
9698
[source,terminal]
9799
----
98100
$ oc get -o jsonpath=‘{.status.infrastructureName}{“\n”}’ infrastructure cluster
99101
----
100102
<2> Specify the infrastructure ID, role node label, and zone.
101103
<3> Specify the role node label to add.
102-
<4> Specify an ARM64 supported Red Hat Enterprise Linux CoreOS (RHCOS) Amazon Machine Image (AMI) for your AWS zone for your OpenShift Container Platform nodes.
104+
<4> Specify a Red{nbsp}Hat Enterprise Linux CoreOS (RHCOS) Amazon Machine Image (AMI) for your AWS zone for the nodes. The RHCOS AMI must be compatible with the machine architecture.
103105
+
104106
[source,terminal]
105107
----
@@ -108,28 +110,37 @@ $ oc get configmap/coreos-bootimages \
108110
-o jsonpath='{.data.stream}' | jq \
109111
-r '.architectures.<arch>.images.aws.regions."<region>".image'
110112
----
111-
<5> Specify an ARM64 supported machine type. For more information, refer to "Tested instance types for AWS 64-bit ARM"
112-
<6> Specify the zone, for example `us-east-1a`. Ensure that the zone you select offers 64-bit ARM machines.
113-
<7> Specify the region, for example, `us-east-1`. Ensure that the zone you select offers 64-bit ARM machines.
113+
<5> Specify a machine type that aligns with the CPU architecture of the chosen AMI. For more information, see "Tested instance types for AWS 64-bit ARM"
114+
<6> Specify the zone. For example, `us-east-1a`. Ensure that the zone you select has machines with the required architecture.
115+
<7> Specify the region. For example, `us-east-1`. Ensure that the zone you select has machines with the required architecture.
114116
--
115117

118+
. Create the compute machine set by running the following command:
119+
+
120+
[source,terminal]
121+
----
122+
$ oc create -f <file_name> <1>
123+
----
124+
<1> Replace `<file_name>` with the name of the YAML file with compute machine set configuration. For example: `aws-arm64-machine-set-0.yaml`, or `aws-amd64-machine-set-0.yaml`.
125+
116126
.Verification
117127

118-
. View the list of compute machine sets by entering the following command:
128+
. View the list of compute machine sets by running the following command:
119129
+
120130
[source,terminal]
121131
----
122132
$ oc get machineset -n openshift-machine-api
123133
----
124-
You can then see your created ARM64 machine set.
134+
+
135+
The output must include the machine set that you created.
125136
+
126137
.Example output
127138
[source,terminal]
128139
----
129140
NAME DESIRED CURRENT READY AVAILABLE AGE
130-
<infrastructure_id>-aws-arm64-machine-set-0 2 2 2 2 10m
141+
<infrastructure_id>-aws-machine-set-0 2 2 2 2 10m
131142
----
132-
. You can check that the nodes are ready and scheduable with the following command:
143+
. You can check if the nodes are ready and schedulable by running the following command:
133144
+
134145
[source,terminal]
135146
----

modules/multi-architecture-modify-machine-set-gcp.adoc

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,30 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="multi-architecture-modify-machine-set-gcp_{context}"]
7-
= Adding an ARM64 compute machine set to your GCP cluster
7+
= Adding a multi-architecture compute machine set to your GCP cluster
88

9-
To configure a cluster with multi-architecture compute machines, you must create a GCP ARM64 compute machine set. This adds ARM64 compute nodes to your cluster.
9+
After creating a multi-architecture cluster, you can add nodes with different architectures.
10+
11+
You can add multi-architecture compute machines to a multi-architecture cluster in the following ways:
12+
13+
* Adding 64-bit x86 compute machines to a cluster that uses 64-bit ARM control plane machines and already includes 64-bit ARM compute machines. In this case, 64-bit x86 is considered the secondary architecture.
14+
* Adding 64-bit ARM compute machines to a cluster that uses 64-bit x86 control plane machines and already includes 64-bit x86 compute machines. In this case, 64-bit ARM is considered the secondary architecture.
1015
1116
include::snippets/about-multiarch-tuning-operator.adoc[]
1217

1318
.Prerequisites
1419

1520
* You installed the {oc-first}.
16-
* You used the installation program to create an AMD64 single-architecture AWS cluster with the multi-architecture installer binary.
21+
* You used the installation program to create a 64-bit x86 or 64-bit ARM single-architecture GCP cluster with the multi-architecture installer binary.
1722
1823
.Procedure
19-
* Create and modify a compute machine set, this controls the ARM64 compute nodes in your cluster:
20-
+
21-
[source,terminal]
22-
----
23-
$ oc create -f gcp-arm64-machine-set-0.yaml
24-
----
24+
25+
. Log in to the {oc-first}.
26+
27+
. Create a YAML file, and add the configuration to create a compute machine set to control the 64-bit ARM or 64-bit x86 compute nodes in your cluster.
2528
+
2629
--
27-
.Sample GCP YAML compute machine set to deploy an ARM64 compute node
30+
.Example `MachineSet` object for a GCP 64-bit ARM or 64-bit x86 compute node
2831
[source,yaml]
2932
----
3033
apiVersion: machine.openshift.io/v1beta1
@@ -123,27 +126,35 @@ Use the `project` and `name` parameters from the output to create the path to im
123126
$ projects/<project>/global/images/<image_name>
124127
----
125128
<4> Optional: Specify custom metadata in the form of a `key:value` pair. For example use cases, see the GCP documentation for link:https://cloud.google.com/compute/docs/metadata/setting-custom-metadata[setting custom metadata].
126-
<5> Specify an ARM64 supported machine type. For more information, refer to _Tested instance types for GCP on 64-bit ARM infrastructures_ in "Additional resources".
129+
<5> Specify a machine type that aligns with the CPU architecture of the chosen OS image. For more information, see "Tested instance types for GCP on 64-bit ARM infrastructures".
127130
<6> Specify the name of the GCP project that you use for your cluster.
128-
<7> Specify the region, for example, `us-central1`. Ensure that the zone you select offers 64-bit ARM machines.
131+
<7> Specify the region. For example, `us-central1`. Ensure that the zone you select has machines with the required architecture.
129132
--
130133

134+
. Create the compute machine set by running the following command:
135+
+
136+
[source,terminal]
137+
----
138+
$ oc create -f <file_name> <1>
139+
----
140+
<1> Replace `<file_name>` with the name of the YAML file with compute machine set configuration. For example: `gcp-arm64-machine-set-0.yaml`, or `gcp-amd64-machine-set-0.yaml`.
141+
131142
.Verification
132-
. View the list of compute machine sets by entering the following command:
143+
. View the list of compute machine sets by running the following command:
133144
+
134145
[source,terminal]
135146
----
136147
$ oc get machineset -n openshift-machine-api
137148
----
138-
You can then see your created ARM64 machine set.
149+
The output must include the machine set that you created.
139150
+
140151
.Example output
141152
[source,terminal]
142153
----
143154
NAME DESIRED CURRENT READY AVAILABLE AGE
144-
<infrastructure_id>-gcp-arm64-machine-set-0 2 2 2 2 10m
155+
<infrastructure_id>-gcp-machine-set-0 2 2 2 2 10m
145156
----
146-
. You can check that the nodes are ready and scheduable with the following command:
157+
. You can check if the nodes are ready and schedulable by running the following command:
147158
+
148159
[source,terminal]
149160
----

0 commit comments

Comments
 (0)