Skip to content

Commit 9200f3e

Browse files
authored
Merge pull request #78800 from jeana-redhat/OSDOCS-10292-azure-reserved-capacity
OSDOCS-10292: Azure Capacity Reservation with MAPI
2 parents d304256 + 69f16f0 commit 9200f3e

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

machine_management/control_plane_machine_management/cpmso_provider_configurations/cpmso-config-options-azure.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ include::modules/machineset-azure-confidential-vms.adoc[leveloffset=+2]
6161
// Accelerated Networking for Microsoft Azure VMs
6262
include::modules/machineset-azure-accelerated-networking.adoc[leveloffset=+2]
6363

64+
//Configuring Capacity Reservation by using machine sets
65+
include::modules/machineset-azure-capacity-reservation.adoc[leveloffset=+2]
66+
6467
//Not applicable for 4.12, possibly 4.13?
6568
//[role="_additional-resources"]
6669
//.Additional resources

machine_management/creating_machinesets/creating-machineset-azure.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ include::modules/machineset-azure-confidential-vms.adoc[leveloffset=+1]
6262
// Accelerated Networking for Microsoft Azure VMs
6363
include::modules/machineset-azure-accelerated-networking.adoc[leveloffset=+1]
6464

65+
//Configuring Capacity Reservation by using machine sets
66+
include::modules/machineset-azure-capacity-reservation.adoc[leveloffset=+1]
67+
6568
//Adding a GPU node to a machine set (stesmith)
6669
include::modules/nvidia-gpu-azure-adding-a-gpu-node.adoc[leveloffset=+1]
6770

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/creating_machinesets/creating-machineset-azure.adoc
4+
// * machine_management/control_plane_machine_management/cpmso_provider_configurations/cpmso-config-options-azure.adoc
5+
6+
ifeval::["{context}" == "cpmso-config-options-azure"]
7+
:cpmso:
8+
endif::[]
9+
10+
:_mod-docs-content-type: PROCEDURE
11+
[id="machineset-azure-capacity-reservation_{context}"]
12+
= Configuring Capacity Reservation by using machine sets
13+
14+
//Note: This is in 4.16.3, and might be backported through 4.14.z at a later date.
15+
//Earlier versions of OCP should get an update .z version here. OCP 4.17 docs should use {product-version}.
16+
{product-title} version 4.16.3 and later supports on-demand Capacity Reservation with Capacity Reservation groups on {azure-full} clusters.
17+
18+
You can configure a machine set to deploy machines on any available resources that match the parameters of a capacity request that you define.
19+
These parameters specify the VM size, region, and number of instances that you want to reserve.
20+
If your {azure-short} subscription quota can accommodate the capacity request, the deployment succeeds.
21+
22+
For more information, including limitations and suggested use cases for this {azure-short} instance type, see the {azure-full} documentation about link:https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview[On-demand Capacity Reservation].
23+
24+
[NOTE]
25+
====
26+
You cannot change an existing Capacity Reservation configuration for a machine set.
27+
To use a different Capacity Reservation group, you must replace the machine set and the machines that the previous machine set deployed.
28+
====
29+
30+
.Prerequisites
31+
32+
* You have access to the cluster with `cluster-admin` privileges.
33+
* You installed the {oc-first}.
34+
* You created a Capacity Reservation group.
35+
+
36+
For more information, see the {azure-full} documentation link:https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create[Create a Capacity Reservation].
37+
38+
.Procedure
39+
40+
. In a text editor, open the YAML file for an existing machine set or create a new one.
41+
42+
. Edit the following section under the `providerSpec` field:
43+
+
44+
--
45+
.Sample configuration
46+
[source,yaml]
47+
----
48+
ifndef::cpmso[]
49+
apiVersion: machine.openshift.io/v1beta1
50+
kind: MachineSet
51+
endif::cpmso[]
52+
ifdef::cpmso[]
53+
apiVersion: machine.openshift.io/v1
54+
kind: ControlPlaneMachineSet
55+
endif::cpmso[]
56+
# ...
57+
spec:
58+
template:
59+
spec:
60+
providerSpec:
61+
value:
62+
capacityReservationGroupID: <capacity-reservation-group> # <1>
63+
# ...
64+
----
65+
<1> Specify the ID of the Capacity Reservation group that you want the machine set to deploy machines on.
66+
--
67+
68+
.Verification
69+
70+
* To verify machine deployment, list the machines that the machine set created by running the following command:
71+
+
72+
[source,terminal]
73+
----
74+
ifndef::cpmso[]
75+
$ oc oc get machines.machine.openshift.io \
76+
-n openshift-machine-api \
77+
-l machine.openshift.io/cluster-api-machineset=<machine_set_name>
78+
endif::cpmso[]
79+
ifdef::cpmso[]
80+
$ oc get machine \
81+
-n openshift-machine-api \
82+
-l machine.openshift.io/cluster-api-machine-role=master
83+
endif::cpmso[]
84+
----
85+
ifndef::cpmso[]
86+
+
87+
where `<machine_set_name>` is the name of the compute machine set.
88+
endif::cpmso[]
89+
+
90+
In the output, verify that the characteristics of the listed machines match the parameters of your Capacity Reservation.
91+
92+
ifeval::["{context}" == "cpmso-config-options-azure"]
93+
:!cpmso:
94+
endif::[]

0 commit comments

Comments
 (0)