Skip to content

Commit 22d0663

Browse files
authored
Merge pull request #47356 from jeana-redhat/OSDOCS-3594-nutanix-mapi
[OSDOCS-3594]: Nutanix MAPI
2 parents 3d0084a + 1ccbf17 commit 22d0663

File tree

4 files changed

+160
-0
lines changed

4 files changed

+160
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,8 @@ Topics:
18341834
File: creating-machineset-gcp
18351835
- Name: Creating a machine set on IBM Cloud
18361836
File: creating-machineset-ibm-cloud
1837+
- Name: Creating a machine set on Nutanix
1838+
File: creating-machineset-nutanix
18371839
- Name: Creating a machine set on OpenStack
18381840
File: creating-machineset-osp
18391841
- Name: Creating a machine set on RHV

machine_management/creating-infrastructure-machinesets.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ include::modules/machineset-yaml-gcp.adoc[leveloffset=+3]
5454
Machine sets running on GCP support non-guaranteed xref:../machine_management/creating_machinesets/creating-machineset-gcp.adoc#machineset-non-guaranteed-instance_creating-machineset-gcp[preemptible VM instances]. You can save on costs by using preemptible VM instances at a lower price
5555
compared to normal instances on GCP. You can xref:../machine_management/creating_machinesets/creating-machineset-gcp.adoc#machineset-creating-non-guaranteed-instance_creating-machineset-gcp[configure preemptible VM instances] by adding `preemptible` to the `MachineSet` YAML file.
5656

57+
include::modules/machineset-yaml-nutanix.adoc[leveloffset=+3]
58+
5759
include::modules/machineset-yaml-osp.adoc[leveloffset=+3]
5860

5961
include::modules/machineset-yaml-rhv.adoc[leveloffset=+3]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
:_content-type: ASSEMBLY
2+
[id="creating-machineset-nutanix"]
3+
= Creating a machine set on Nutanix
4+
include::_attributes/common-attributes.adoc[]
5+
:context: creating-machineset-nutanix
6+
7+
toc::[]
8+
9+
You can create a different machine set to serve a specific purpose in your {product-title} cluster on Nutanix. For example, you might create infrastructure machine sets and related machines so that you can move supporting workloads to the new machines.
10+
11+
//[IMPORTANT] admonition for UPI
12+
include::modules/machine-user-provisioned-limitations.adoc[leveloffset=+1]
13+
14+
//Machine API overview
15+
include::modules/machine-api-overview.adoc[leveloffset=+1]
16+
17+
//Sample YAML for a machine set custom resource on Nutanix
18+
include::modules/machineset-yaml-nutanix.adoc[leveloffset=+1]
19+
20+
//Creating a machine set
21+
include::modules/machineset-creating.adoc[leveloffset=+1]

modules/machineset-yaml-nutanix.adoc

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/creating-infrastructure-machinesets.adoc
4+
// * machine_management/creating_machinesets/creating-machineset-nutanix.adoc
5+
6+
ifeval::["{context}" == "creating-infrastructure-machinesets"]
7+
:infra:
8+
endif::[]
9+
10+
:_content-type: REFERENCE
11+
[id="machineset-yaml-nutanix_{context}"]
12+
= Sample YAML for a machine set custom resource on Nutanix
13+
14+
This sample YAML defines a Nutanix machine set that creates nodes that are labeled with
15+
ifndef::infra[`node-role.kubernetes.io/<role>: ""`.]
16+
ifdef::infra[`node-role.kubernetes.io/infra: ""`.]
17+
18+
In this sample, `<infrastructure_id>` is the infrastructure ID label that is based on the cluster ID that you set when you provisioned the cluster, and
19+
ifndef::infra[`<role>`]
20+
ifdef::infra[`<infra>`]
21+
is the node label to add.
22+
23+
[source,yaml]
24+
----
25+
apiVersion: machine.openshift.io/v1beta1
26+
kind: MachineSet
27+
metadata:
28+
labels:
29+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
30+
ifndef::infra[]
31+
machine.openshift.io/cluster-api-machine-role: <role> <2>
32+
machine.openshift.io/cluster-api-machine-type: <role> <2>
33+
name: <infrastructure_id>-<role>-<zone> <3>
34+
endif::infra[]
35+
ifdef::infra[]
36+
machine.openshift.io/cluster-api-machine-role: <infra> <2>
37+
machine.openshift.io/cluster-api-machine-type: <infra> <2>
38+
name: <infrastructure_id>-<infra>-<zone> <3>
39+
endif::infra[]
40+
namespace: openshift-machine-api
41+
annotations: <4>
42+
machine.openshift.io/memoryMb: "16384"
43+
machine.openshift.io/vCPU: "4"
44+
spec:
45+
replicas: 3
46+
selector:
47+
matchLabels:
48+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
49+
ifndef::infra[]
50+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>-<zone> <3>
51+
endif::infra[]
52+
ifdef::infra[]
53+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<infra>-<zone> <3>
54+
endif::infra[]
55+
template:
56+
metadata:
57+
labels:
58+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
59+
ifndef::infra[]
60+
machine.openshift.io/cluster-api-machine-role: <role> <2>
61+
machine.openshift.io/cluster-api-machine-type: <role> <2>
62+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>-<zone> <3>
63+
endif::infra[]
64+
ifdef::infra[]
65+
machine.openshift.io/cluster-api-machine-role: <infra> <2>
66+
machine.openshift.io/cluster-api-machine-type: <infra> <2>
67+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<infra>-<zone> <3>
68+
endif::infra[]
69+
spec:
70+
metadata:
71+
labels:
72+
ifndef::infra[]
73+
node-role.kubernetes.io/<role>: ""
74+
endif::infra[]
75+
ifdef::infra[]
76+
node-role.kubernetes.io/infra: ""
77+
endif::infra[]
78+
providerSpec:
79+
value:
80+
apiVersion: machine.openshift.io/v1
81+
cluster:
82+
type: uuid
83+
uuid: <cluster_uuid>
84+
credentialsSecret:
85+
name: nutanix-creds-secret
86+
image:
87+
name: <infrastructure_id>-rhcos <5>
88+
type: name
89+
kind: NutanixMachineProviderConfig
90+
memorySize: 16Gi <6>
91+
subnets:
92+
- type: uuid
93+
uuid: <subnet_uuid>
94+
systemDiskSize: 120Gi <7>
95+
userDataSecret:
96+
name: <user_data_secret> <8>
97+
vcpuSockets: 4 <9>
98+
vcpusPerSocket: 1 <10>
99+
ifdef::infra[]
100+
taints: <11>
101+
- key: node-role.kubernetes.io/infra
102+
effect: NoSchedule
103+
endif::infra[]
104+
----
105+
<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 (`oc`) installed, you can obtain the infrastructure ID by running the following command:
106+
+
107+
[source,terminal]
108+
----
109+
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
110+
----
111+
ifndef::infra[]
112+
<2> Specify the node label to add.
113+
<3> Specify the infrastructure ID, node label, and zone.
114+
endif::infra[]
115+
ifdef::infra[]
116+
<2> Specify the `<infra>` node label.
117+
<3> Specify the infrastructure ID, `<infra>` node label, and zone.
118+
endif::infra[]
119+
<4> Annotations for the cluster autoscaler.
120+
<5> Specify the image to use. Use an image from an existing default machine set for the cluster.
121+
<6> Specify the amount of memory for the cluster in Gi.
122+
<7> Specify the size of the system disk in Gi.
123+
<8> Specify the name of the secret in the user data YAML file that is in the `openshift-machine-api` namespace. Use the value that the installer populates in the default machine set.
124+
<9> Specify the number of vCPU sockets.
125+
<10> Specify the number of vCPUs per socket.
126+
ifdef::infra[]
127+
<11> Specify a taint to prevent user workloads from being scheduled on infra nodes.
128+
endif::infra[]
129+
130+
ifeval::["{context}" == "creating-infrastructure-machinesets"]
131+
:!infra:
132+
endif::[]
133+
ifeval::["{context}" == "cluster-tasks"]
134+
:!infra:
135+
endif::[]

0 commit comments

Comments
 (0)