Skip to content

Commit 3554ecf

Browse files
authored
Merge pull request #40879 from jeana-redhat/OSDOCS-2333
OSDOCS-2333: Azure Stack Hub MAPI integration
2 parents 315443a + 91e226b commit 3554ecf

9 files changed

+225
-3
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,6 +1669,8 @@ Topics:
16691669
File: creating-machineset-aws
16701670
- Name: Creating a machine set on Azure
16711671
File: creating-machineset-azure
1672+
- Name: Creating a machine set on Azure Stack Hub
1673+
File: creating-machineset-azure-stack-hub
16721674
- Name: Creating a machine set on GCP
16731675
File: creating-machineset-gcp
16741676
- Name: Creating a machine set on OpenStack

machine_management/creating-infrastructure-machinesets.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You can use infrastructure machine sets to create machines that host only infras
1313

1414
include::modules/infrastructure-components.adoc[leveloffset=+1]
1515

16-
For information on infrastructure nodes and which components can run on infrastructure nodes, see the "Red Hat OpenShift control plane and infrastructure nodes" section in the link:https://www.redhat.com/en/resources/openshift-subscription-sizing-guide[OpenShift sizing and subscription guide for enterprise Kubernetes] document.
16+
For information about infrastructure nodes and which components can run on infrastructure nodes, see the "Red Hat OpenShift control plane and infrastructure nodes" section in the link:https://www.redhat.com/en/resources/openshift-subscription-sizing-guide[OpenShift sizing and subscription guide for enterprise Kubernetes] document.
1717

1818
[id="creating-infrastructure-machinesets-production"]
1919
== Creating infrastructure machine sets for production environments
@@ -34,6 +34,13 @@ include::modules/machineset-yaml-azure.adoc[leveloffset=+3]
3434

3535
Machine sets running on Azure support non-guaranteed xref:../machine_management/creating_machinesets/creating-machineset-azure.adoc#machineset-non-guaranteed-instance_creating-machineset-azure[Spot VMs]. You can save on costs by using Spot VMs at a lower price compared to standard VMs on Azure. You can xref:../machine_management/creating_machinesets/creating-machineset-azure.adoc#machineset-creating-non-guaranteed-instance_creating-machineset-azure[configure Spot VMs] by adding `spotVMOptions` to the `MachineSet` YAML file.
3636

37+
include::modules/machineset-yaml-azure-stack-hub.adoc[leveloffset=+3]
38+
39+
[NOTE]
40+
====
41+
Machine sets running on Azure Stack Hub do not support non-guaranteed Spot VMs.
42+
====
43+
3744
include::modules/machineset-yaml-gcp.adoc[leveloffset=+3]
3845

3946
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
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[id="creating-machineset-azure-stack-hub"]
2+
= Creating a machine set on Azure Stack Hub
3+
include::modules/common-attributes.adoc[]
4+
:context: creating-machineset-azure-stack-hub
5+
6+
toc::[]
7+
8+
You can create a different machine set to serve a specific purpose in your {product-title} cluster on Microsoft Azure Stack Hub. For example, you might create infrastructure machine sets and related machines so that you can move supporting workloads to the new machines.
9+
10+
//[IMPORTANT] admonition for UPI
11+
include::modules/machine-user-provisioned-limitations.adoc[leveloffset=+1]
12+
13+
//Machine API overview
14+
include::modules/machine-api-overview.adoc[leveloffset=+1]
15+
16+
//Sample YAML for a machine set custom resource on Azure Stack Hub
17+
include::modules/machineset-yaml-azure-stack-hub.adoc[leveloffset=+1]
18+
19+
//Creating a machine set
20+
include::modules/machineset-creating.adoc[leveloffset=+1]
21+
22+
//Enabling customer-managed encryption keys for a machine set
23+
include::modules/machineset-customer-managed-encryption-azure.adoc[leveloffset=+1]

modules/machine-api-overview.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// * machine_management/creating_machinesets/creating-machineset-aws.adoc
44
// * machine_management/creating_machinesets/creating-machineset-azure.adoc
5+
// * machine_management/creating_machinesets/creating-machineset-azure-stack-hub.adoc
56
// * machine_management/creating_machinesets/creating-machineset-gcp.adoc
67
// * machine_management/creating_machinesets/creating-machineset-osp.adoc
78
// * machine_management/creating_machinesets/creating-machineset-vsphere.adoc

modules/machine-user-provisioned-limitations.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// * machine_management/creating-infrastructure-machinesets.adoc
44
// * machine_management/creating_machinesets/creating-machineset-aws.adoc
55
// * machine_management/creating_machinesets/creating-machineset-azure.adoc
6+
// * machine_management/creating_machinesets/creating-machineset-azure-stack-hub.adoc
67
// * machine_management/creating_machinesets/creating-machineset-gcp.adoc
78
// * machine_management/creating_machinesets/creating-machineset-osp.adoc
89
// * machine_management/creating_machinesets/creating-machineset-rhv.adoc

modules/machineset-creating.adoc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// * machine_management/creating-infrastructure-machinesets.adoc
44
// * machine_management/creating_machinesets/creating-machineset-aws.adoc
55
// * machine_management/creating_machinesets/creating-machineset-azure.adoc
6+
// * machine_management/creating_machinesets/creating-machineset-azure-stack-hub.adoc
67
// * machine_management/creating_machinesets/creating-machineset-gcp.adoc
78
// * machine_management/creating_machinesets/creating-machineset-osp.adoc
89
// * machine_management/creating_machinesets/creating-machineset-vsphere.adoc
@@ -17,10 +18,12 @@ endif::[]
1718
ifeval::["{context}" == "creating-windows-machineset-azure"]
1819
:win:
1920
endif::[]
21+
ifeval::["{context}" == "creating-machineset-azure-stack-hub"]
22+
:ash:
23+
endif::[]
2024
ifeval::["{context}" == "creating-windows-machineset-vsphere"]
2125
:win:
2226
endif::[]
23-
2427
ifeval::["{context}" == "creating-machineset-vsphere"]
2528
:vsphere:
2629
endif::[]
@@ -39,12 +42,20 @@ ifdef::vsphere[]
3942
* Create a tag inside your vCenter instance based on the cluster API name. This tag is utilized by the machine set to associate the {product-title} nodes to the provisioned virtual machines (VM). For directions on creating tags in vCenter, see the VMware documentation for link:https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vcenterhost.doc/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html[vSphere Tags and Attributes].
4043
* Have the necessary permissions to deploy VMs in your vCenter instance and have the required access to the datastore specified.
4144
endif::vsphere[]
45+
ifdef::ash[]
46+
* Create an availability set in which to deploy Azure Stack Hub machines.
47+
endif::ash[]
4248

4349
.Procedure
4450

4551
. Create a new YAML file that contains the machine set custom resource (CR) sample and is named `<file_name>.yaml`.
4652
+
53+
ifndef::ash[]
4754
Ensure that you set the `<clusterID>` and `<role>` parameter values.
55+
endif::ash[]
56+
ifdef::ash[]
57+
Ensure that you set the `<availabilitySet>`, `<clusterID>`, and `<role>` parameter values.
58+
endif::ash[]
4859

4960
.. If you are not sure which value to set for a specific field, you can check an existing machine set from your cluster:
5061
+

modules/machineset-customer-managed-encryption-azure.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Module included in the following assemblies:
22
//
33
// * machine_management/creating_machinesets/creating-machineset-gcp.adoc
4+
// * machine_management/creating_machinesets/creating-machineset-azure-stack-hub.adoc
45

56
[id="machineset-enabling-customer-managed-encryption-azure_{context}"]
67
= Enabling customer-managed encryption keys for a machine set
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/creating-infrastructure-machinesets.adoc
4+
// * machine_management/creating_machinesets/creating-machineset-azure-stack-hub.adoc
5+
// * post_installation_configuration/cluster-tasks.adoc
6+
7+
ifeval::["{context}" == "creating-infrastructure-machinesets"]
8+
:infra:
9+
endif::[]
10+
ifeval::["{context}" == "post-install-cluster-tasks"]
11+
:infra:
12+
endif::[]
13+
14+
[id="machineset-yaml-azure-stack-hub_{context}"]
15+
= Sample YAML for a machine set custom resource on Azure Stack Hub
16+
17+
This sample YAML defines a machine set that runs in the `1` Microsoft Azure zone in a region and creates nodes that are labeled with
18+
ifndef::infra[`node-role.kubernetes.io/<role>: ""`.]
19+
ifdef::infra[`node-role.kubernetes.io/infra: ""`.]
20+
21+
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
22+
ifndef::infra[`<role>`]
23+
ifdef::infra[`<infra>`]
24+
is the node label to add.
25+
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+
ifndef::infra[]
34+
machine.openshift.io/cluster-api-machine-role: <role> <2>
35+
machine.openshift.io/cluster-api-machine-type: <role> <2>
36+
name: <infrastructure_id>-<role>-<region> <3>
37+
endif::infra[]
38+
ifdef::infra[]
39+
machine.openshift.io/cluster-api-machine-role: <infra> <2>
40+
machine.openshift.io/cluster-api-machine-type: <infra> <2>
41+
name: <infrastructure_id>-infra-<region> <3>
42+
endif::infra[]
43+
namespace: openshift-machine-api
44+
spec:
45+
replicas: 1
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>-<region> <3>
51+
endif::infra[]
52+
ifdef::infra[]
53+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-infra-<region> <3>
54+
endif::infra[]
55+
template:
56+
metadata:
57+
creationTimestamp: null
58+
labels:
59+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
60+
ifndef::infra[]
61+
machine.openshift.io/cluster-api-machine-role: <role> <2>
62+
machine.openshift.io/cluster-api-machine-type: <role> <2>
63+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>-<region> <3>
64+
endif::infra[]
65+
ifdef::infra[]
66+
machine.openshift.io/cluster-api-machine-role: <infra> <2>
67+
machine.openshift.io/cluster-api-machine-type: <infra> <2>
68+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-infra-<region> <3>
69+
endif::infra[]
70+
spec:
71+
metadata:
72+
creationTimestamp: null
73+
labels:
74+
ifndef::infra[]
75+
node-role.kubernetes.io/<role>: "" <2>
76+
endif::infra[]
77+
ifdef::infra[]
78+
node-role.kubernetes.io/infra: "" <2>
79+
taints: <4>
80+
- key: node-role.kubernetes.io/infra
81+
effect: NoSchedule
82+
endif::infra[]
83+
providerSpec:
84+
value:
85+
apiVersion: machine.openshift.io/v1beta1
86+
availabilitySet: <availability_set> <6>
87+
credentialsSecret:
88+
name: azure-cloud-credentials
89+
namespace: openshift-machine-api
90+
image:
91+
offer: ""
92+
publisher: ""
93+
resourceID: /resourceGroups/<infrastructure_id>-rg/providers/Microsoft.Compute/images/<infrastructure_id> <1>
94+
sku: ""
95+
version: ""
96+
internalLoadBalancer: ""
97+
kind: AzureMachineProviderSpec
98+
ifndef::infra[]
99+
location: <region> <4>
100+
endif::infra[]
101+
ifdef::infra[]
102+
location: <region> <5>
103+
endif::infra[]
104+
managedIdentity: <infrastructure_id>-identity <1>
105+
metadata:
106+
creationTimestamp: null
107+
natRule: null
108+
networkResourceGroup: ""
109+
osDisk:
110+
diskSizeGB: 128
111+
managedDisk:
112+
storageAccountType: Premium_LRS
113+
osType: Linux
114+
publicIP: false
115+
publicLoadBalancer: ""
116+
resourceGroup: <infrastructure_id>-rg <1>
117+
sshPrivateKey: ""
118+
sshPublicKey: ""
119+
subnet: <infrastructure_id>-<role>-subnet <1> <2>
120+
userDataSecret:
121+
name: worker-user-data <2>
122+
vmSize: Standard_DS4_v2
123+
vnet: <infrastructure_id>-vnet <1>
124+
ifndef::infra[]
125+
zone: "1" <5>
126+
endif::infra[]
127+
ifdef::infra[]
128+
zone: "1" <7>
129+
endif::infra[]
130+
----
131+
<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:
132+
+
133+
[source,terminal]
134+
----
135+
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
136+
----
137+
+
138+
You can obtain the subnet by running the following command:
139+
+
140+
[source,terminal]
141+
----
142+
$ oc -n openshift-machine-api \
143+
-o jsonpath='{.spec.template.spec.providerSpec.value.subnet}{"\n"}' \
144+
get machineset/<infrastructure_id>-worker-centralus1
145+
----
146+
You can obtain the vnet by running the following command:
147+
+
148+
[source,terminal]
149+
----
150+
$ oc -n openshift-machine-api \
151+
-o jsonpath='{.spec.template.spec.providerSpec.value.vnet}{"\n"}' \
152+
get machineset/<infrastructure_id>-worker-centralus1
153+
----
154+
ifndef::infra[]
155+
<2> Specify the node label to add.
156+
<3> Specify the infrastructure ID, node label, and region.
157+
<4> Specify the region to place machines on.
158+
<5> Specify the zone within your region to place machines on. Be sure that your region supports the zone that you specify.
159+
<6> Specify the availability set for the cluster.
160+
endif::infra[]
161+
ifdef::infra[]
162+
<2> Specify the `<infra>` node label.
163+
<3> Specify the infrastructure ID, `<infra>` node label, and region.
164+
<4> Specify a taint to prevent user workloads from being scheduled on infra nodes.
165+
<5> Specify the region to place machines on.
166+
<6> Specify the availability set for the cluster.
167+
<7> Specify the zone within your region to place machines on. Be sure that your region supports the zone that you specify.
168+
endif::infra[]
169+
170+
171+
ifeval::["{context}" == "creating-infrastructure-machinesets"]
172+
:!infra:
173+
endif::[]
174+
ifeval::["{context}" == "cluster-tasks"]
175+
:!infra:
176+
endif::[]

modules/machineset-yaml-azure.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ifeval::["{context}" == "post-install-cluster-tasks"]
1212
endif::[]
1313

1414
[id="machineset-yaml-azure_{context}"]
15-
= Sample YAML for a machine set custom resource on Azure
15+
= Sample YAML for a machine set custom resource on Azure
1616

1717
This sample YAML defines a machine set that runs in the `1` Microsoft Azure zone in a region and creates nodes that are labeled with
1818
ifndef::infra[`node-role.kubernetes.io/<role>: ""`.]

0 commit comments

Comments
 (0)