Skip to content

Commit 3b8fe7b

Browse files
authored
Merge pull request #59489 from rohennes/TELCODOCS-1177-machinesets
TELCODOCS1177: Adding machinesets content for bare metal deployments
2 parents d58e080 + 0c4ebfe commit 3b8fe7b

File tree

4 files changed

+130
-0
lines changed

4 files changed

+130
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,8 @@ Topics:
21362136
Distros: openshift-origin
21372137
- Name: Creating a compute machine set on vSphere
21382138
File: creating-machineset-vsphere
2139+
- Name: Creating a compute machine set on bare metal
2140+
File: creating-machineset-bare-metal
21392141
- Name: Manually scaling a compute machine set
21402142
File: manually-scaling-machineset
21412143
- Name: Modifying a compute machine set
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:_content-type: ASSEMBLY
2+
[id="creating-machineset-bare-metal"]
3+
= Creating a compute machine set on bare metal
4+
include::_attributes/common-attributes.adoc[]
5+
:context: creating-machineset-bare-metal
6+
7+
toc::[]
8+
9+
You can create a different compute machine set to serve a specific purpose in your {product-title} cluster on bare metal. For example, you might create infrastructure machine sets and related machines so that you can move supporting workloads to the new machines.
10+
11+
include::modules/machine-user-provisioned-limitations.adoc[leveloffset=+1]
12+
13+
include::modules/machineset-yaml-baremetal.adoc[leveloffset=+1]
14+
15+
include::modules/machineset-creating.adoc[leveloffset=+1]
16+
17+
// Mothballed - re-add when available
18+
// include::modules/machineset-osp-adding-bare-metal.adoc[leveloffset=+1]

machine_management/index.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ As a cluster administrator, you can perform the following actions:
4343

4444
** xref:../machine_management/creating_machinesets/creating-machineset-vsphere.adoc#creating-machineset-vsphere[vSphere]
4545

46+
* Create a machine set for a bare metal deployment: xref:../machine_management/creating_machinesets/creating-machineset-bare-metal.adoc#creating-machineset-bare-metal[Creating a compute machine set on bare metal]
47+
4648
* xref:../machine_management/manually-scaling-machineset.adoc#manually-scaling-machineset[Manually scale a compute machine set] by adding or removing a machine from the compute machine set.
4749

4850
* xref:../machine_management/modifying-machineset.adoc#modifying-machineset[Modify a compute machine set] through the `MachineSet` YAML configuration file.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/creating-infrastructure-machinesets.adoc
4+
// * machine_management/creating_machinesets/creating-machineset-bare-metal.adoc
5+
6+
ifeval::["{context}" == "creating-infrastructure-machinesets"]
7+
:infra:
8+
endif::[]
9+
10+
:_content-type: REFERENCE
11+
[id="machineset-yaml-vsphere_{context}"]
12+
= Sample YAML for a compute machine set custom resource on bare metal
13+
14+
This sample YAML defines a compute machine set that runs on bare metal and 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+
creationTimestamp: null
29+
labels:
30+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
31+
ifndef::infra[]
32+
name: <infrastructure_id>-<role> <2>
33+
endif::infra[]
34+
ifdef::infra[]
35+
name: <infrastructure_id>-infra <2>
36+
endif::infra[]
37+
namespace: openshift-machine-api
38+
spec:
39+
replicas: 1
40+
selector:
41+
matchLabels:
42+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
43+
ifndef::infra[]
44+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role> <2>
45+
endif::infra[]
46+
ifdef::infra[]
47+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-infra <2>
48+
endif::infra[]
49+
template:
50+
metadata:
51+
creationTimestamp: null
52+
labels:
53+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
54+
ifndef::infra[]
55+
machine.openshift.io/cluster-api-machine-role: <role> <3>
56+
machine.openshift.io/cluster-api-machine-type: <role> <3>
57+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role> <2>
58+
endif::infra[]
59+
ifdef::infra[]
60+
machine.openshift.io/cluster-api-machine-role: <infra> <3>
61+
machine.openshift.io/cluster-api-machine-type: <infra> <3>
62+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-infra <2>
63+
endif::infra[]
64+
spec:
65+
metadata:
66+
creationTimestamp: null
67+
labels:
68+
ifndef::infra[]
69+
node-role.kubernetes.io/<role>: "" <3>
70+
endif::infra[]
71+
ifdef::infra[]
72+
node-role.kubernetes.io/infra: "" <3>
73+
taints: <4>
74+
- key: node-role.kubernetes.io/infra
75+
effect: NoSchedule
76+
endif::infra[]
77+
providerSpec:
78+
value:
79+
apiVersion: baremetal.cluster.k8s.io/v1alpha1
80+
hostSelector: {}
81+
image:
82+
checksum: http:/172.22.0.3:6181/images/rhcos-<version>.<architecture>.qcow2.<md5sum> <4>
83+
url: http://172.22.0.3:6181/images/rhcos-<version>.<architecture>.qcow2 <5>
84+
kind: BareMetalMachineProviderSpec
85+
metadata:
86+
creationTimestamp: null
87+
userData:
88+
name: worker-user-data
89+
----
90+
<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:
91+
+
92+
[source,terminal]
93+
----
94+
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
95+
----
96+
ifndef::infra[]
97+
<2> Specify the infrastructure ID and node label.
98+
<3> Specify the node label to add.
99+
<4> Edit the `checksum` URL to use the API VIP address.
100+
<5> Edit the `url` URL to use the API VIP address.
101+
endif::infra[]
102+
103+
ifeval::["{context}" == "creating-infrastructure-machinesets"]
104+
:!infra:
105+
endif::[]
106+
ifeval::["{context}" == "cluster-tasks"]
107+
:!infra:
108+
endif::[]

0 commit comments

Comments
 (0)