Skip to content

Commit 822f585

Browse files
authored
Merge pull request #63991 from kelbrown20/OSDOCS-6402-GCP-on-multi-arch
OSDOCS#6402: GCP on with multi-arch compute machines support
2 parents 10ffc21 + 137abae commit 822f585

File tree

5 files changed

+186
-1
lines changed

5 files changed

+186
-1
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,8 @@ Topics:
536536
File: creating-multi-arch-compute-nodes-azure
537537
- Name: Creating a cluster with multi-architecture compute machines on AWS
538538
File: creating-multi-arch-compute-nodes-aws
539+
- Name: Creating a cluster with multi-architecture compute machines on GCP
540+
File: creating-multi-arch-compute-nodes-gcp
539541
- Name: Creating a cluster with multi-architecture compute machines on bare metal
540542
File: creating-multi-arch-compute-nodes-bare-metal
541543
- Name: Creating a cluster with multi-architecture compute machines on IBM Z and IBM LinuxONE with z/VM
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
//Module included in the following assembly
2+
//
3+
//post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-gcp.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="multi-architecture-modify-machine-set-gcp_{context}"]
7+
= Adding an ARM64 compute machine set to your GCP cluster
8+
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.
10+
11+
.Prerequisites
12+
13+
* You installed the {oc-first}.
14+
* You used the installation program to create an AMD64 single-architecture AWS cluster with the multi-architecture installer binary.
15+
16+
.Procedure
17+
* Create and modify a compute machine set, this controls the ARM64 compute nodes in your cluster:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc create -f gcp-arm64-machine-set-0.yaml
22+
----
23+
+
24+
--
25+
.Sample GCP YAML compute machine set to deploy an ARM64 compute node
26+
[source,yaml]
27+
----
28+
apiVersion: machine.openshift.io/v1beta1
29+
kind: MachineSet
30+
metadata:
31+
labels:
32+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
33+
name: <infrastructure_id>-w-a
34+
namespace: openshift-machine-api
35+
spec:
36+
replicas: 1
37+
selector:
38+
matchLabels:
39+
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
40+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-w-a
41+
template:
42+
metadata:
43+
creationTimestamp: null
44+
labels:
45+
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
46+
machine.openshift.io/cluster-api-machine-role: <role> <2>
47+
machine.openshift.io/cluster-api-machine-type: <role>
48+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-w-a
49+
spec:
50+
metadata:
51+
labels:
52+
node-role.kubernetes.io/<role>: ""
53+
providerSpec:
54+
value:
55+
apiVersion: gcpprovider.openshift.io/v1beta1
56+
canIPForward: false
57+
credentialsSecret:
58+
name: gcp-cloud-credentials
59+
deletionProtection: false
60+
disks:
61+
- autoDelete: true
62+
boot: true
63+
image: <path_to_image> <3>
64+
labels: null
65+
sizeGb: 128
66+
type: pd-ssd
67+
gcpMetadata: <4>
68+
- key: <custom_metadata_key>
69+
value: <custom_metadata_value>
70+
kind: GCPMachineProviderSpec
71+
machineType: n1-standard-4 <5>
72+
metadata:
73+
creationTimestamp: null
74+
networkInterfaces:
75+
- network: <infrastructure_id>-network
76+
subnetwork: <infrastructure_id>-worker-subnet
77+
projectID: <project_name> <6>
78+
region: us-central1 <7>
79+
serviceAccounts:
80+
- email: <infrastructure_id>-w@<project_name>.iam.gserviceaccount.com
81+
scopes:
82+
- https://www.googleapis.com/auth/cloud-platform
83+
tags:
84+
- <infrastructure_id>-worker
85+
userDataSecret:
86+
name: worker-user-data
87+
zone: us-central1-a
88+
----
89+
<1> Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. You can obtain the infrastructure ID by running the following command:
90+
+
91+
[source,terminal]
92+
----
93+
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
94+
----
95+
<2> Specify the role node label to add.
96+
<3> Specify the path to the image that is used in current compute machine sets. You need the project and image name for your path to image.
97+
+
98+
To access the project and image name, run the following command:
99+
+
100+
[source,terminal]
101+
----
102+
$ oc get configmap/coreos-bootimages \
103+
-n openshift-machine-config-operator \
104+
-o jsonpath='{.data.stream}' | jq \
105+
-r '.architectures.aarch64.images.gcp'
106+
----
107+
+
108+
.Example output
109+
[source,terminal]
110+
----
111+
"gcp": {
112+
"release": "415.92.202309142014-0",
113+
"project": "rhcos-cloud",
114+
"name": "rhcos-415-92-202309142014-0-gcp-aarch64"
115+
}
116+
----
117+
Use the `project` and `name` parameters from the output to create the path to image field in your machine set. The path to the image should follow the following format:
118+
+
119+
[source,terminal]
120+
----
121+
$ projects/<project>/global/images/<image_name>
122+
----
123+
<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].
124+
<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".
125+
<6> Specify the name of the GCP project that you use for your cluster.
126+
<7> Specify the region, for example, `us-central1`. Ensure that the zone you select offers 64-bit ARM machines.
127+
--
128+
129+
.Verification
130+
. View the list of compute machine sets by entering the following command:
131+
+
132+
[source,terminal]
133+
----
134+
$ oc get machineset -n openshift-machine-api
135+
----
136+
You can then see your created ARM64 machine set.
137+
+
138+
.Example output
139+
[source,terminal]
140+
----
141+
NAME DESIRED CURRENT READY AVAILABLE AGE
142+
<infrastructure_id>-gcp-arm64-machine-set-0 2 2 2 2 10m
143+
----
144+
. You can check that the nodes are ready and scheduable with the following command:
145+
+
146+
[source,terminal]
147+
----
148+
$ oc get nodes
149+
----

modules/multi-architecture-verifying-cluster-compatibility.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// Module included in the following assemblies:
22

3-
// * post_installation_configuration/multi-architecture-configuration.adoc
3+
// * post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-aws.adoc
4+
// * post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-azure.adoc
5+
// * post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-bare-metal.adoc
6+
// * post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-gcp.adoc
7+
// * post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-ibm-z-kvm.adoc
8+
// * post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-ibm-z.adoc
49

510
:_content-type: PROCEDURE
611
[id="multi-architecture-verifying-cluster-compatibility_{context}"]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
:_content-type: ASSEMBLY
2+
:context: creating-multi-arch-compute-nodes-gcp
3+
[id="creating-multi-arch-compute-nodes-gcp"]
4+
= Creating a cluster with multi-architecture compute machines on GCP
5+
include::_attributes/common-attributes.adoc[]
6+
7+
toc::[]
8+
9+
To create a Google Cloud Platform (GCP) cluster with multi-architecture compute machines, you must first create a single-architecture GCP installer-provisioned cluster with the multi-architecture installer binary. For more information on AWS installations, refer to xref:../../installing/installing_gcp/installing-gcp-customizations.adoc[Installing a cluster on GCP with customizations]. You can then add ARM64 compute machines sets to your GCP cluster.
10+
11+
[NOTE]
12+
====
13+
Secure booting is currently not supported on ARM64 machines for GCP
14+
====
15+
16+
include::modules/multi-architecture-verifying-cluster-compatibility.adoc[leveloffset=+1]
17+
18+
include::modules/multi-architecture-modify-machine-set-gcp.adoc[leveloffset=+1]
19+
20+
.Additional resources
21+
22+
* 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]

post_installation_configuration/configuring-multi-arch-compute-machines/multi-architecture-configuration.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@ To create a cluster with multi-architecture compute machines for various platfor
2828

2929
* xref:../../post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-aws.adoc#creating-multi-arch-compute-nodes-aws[Creating a cluster with multi-architecture compute machines on AWS]
3030

31+
* xref:../../post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-gcp.adoc#creating-multi-arch-compute-nodes-gcp[Creating a cluster with multi-architecture compute machines on GCP]
32+
3133
* xref:../../post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-bare-metal.adoc#creating-multi-arch-compute-nodes-bare-metal[Creating a cluster with multi-architecture compute machines on bare metal]
3234

3335
* xref:../../post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-ibm-z.adoc#creating-multi-arch-compute-nodes-ibm-z[Creating a cluster with multi-architecture compute machines on {ibmzProductName} and {linuxoneProductName} with z/VM]
3436

3537
* xref:../../post_installation_configuration/configuring-multi-arch-compute-machines/creating-multi-arch-compute-nodes-ibm-z-kvm.adoc#creating-multi-arch-compute-nodes-ibm-z-kvm[Creating a cluster with multi-architecture compute machines on {ibmzProductName} and {linuxoneProductName} with {op-system-base} KVM]
38+
39+
[IMPORTANT]
40+
====
41+
Autoscaling from zero is currently not supported on Google Cloud Platform (GCP).
42+
====

0 commit comments

Comments
 (0)