Skip to content

Commit 330f4b6

Browse files
authored
Merge pull request #48797 from jeana-redhat/OSDOCS-2969-Azure-marketplace-machine-sets
[OSDOCS-2969]: Azure Marketplace images in machineset YAML
2 parents 3340560 + 5e60ee4 commit 330f4b6

File tree

4 files changed

+50
-9
lines changed

4 files changed

+50
-9
lines changed

machine_management/creating-infrastructure-machinesets.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ include::modules/machineset-yaml-azure.adoc[leveloffset=+3]
4040

4141
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.
4242

43+
[role="_additional-resources"]
44+
.Additional resources
45+
* xref:../machine_management/creating_machinesets/creating-machineset-azure.adoc#installation-azure-marketplace-subscribe_creating-machineset-azure[Selecting an Azure Marketplace image]
46+
4347
include::modules/machineset-yaml-azure-stack-hub.adoc[leveloffset=+3]
4448

4549
[NOTE]

machine_management/creating_machinesets/creating-machineset-azure.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ include::modules/machineset-yaml-azure.adoc[leveloffset=+1]
2020
//Creating a machine set
2121
include::modules/machineset-creating.adoc[leveloffset=+1]
2222

23+
//Selecting an Azure Marketplace image
24+
include::modules/installation-azure-marketplace-subscribe.adoc[leveloffset=+1]
25+
2326
//Machine sets that deploy machines as Spot VMs
2427
include::modules/machineset-non-guaranteed-instance.adoc[leveloffset=+1]
2528

modules/installation-azure-marketplace-subscribe.adoc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,30 @@
22
//
33
// * installing/installing_aws/installing-azure-customizations.adoc
44
// * installing/installing_aws/installing-azure-user-infra.adoc
5+
// * machine_management/creating-machineset-azure.adoc
56

67
ifeval::["{context}" == "installing-azure-customizations"]
78
:ipi:
89
endif::[]
910
ifeval::["{context}" == "installing-azure-user-infra"]
1011
:upi:
1112
endif::[]
13+
ifeval::["{context}" == "creating-machineset-azure"]
14+
:mapi:
15+
endif::[]
1216

1317
//mpytlak: The procedure differs depending on whether this module is used in an IPI or UPI assembly.
18+
//jrouth: Also some variations for when it appears in the machine management content (`mapi`).
1419

1520
:_content-type: PROCEDURE
1621
[id="installation-azure-marketplace-subscribe_{context}"]
1722
= Selecting an Azure Marketplace image
23+
ifndef::mapi[]
1824
If you are deploying an {product-title} cluster using the Azure Marketplace offering, you must first obtain the Azure Marketplace image. The installation program uses this image to deploy worker nodes. When obtaining your image, consider the following:
25+
endif::mapi[]
26+
ifdef::mapi[]
27+
You can create a machine set running on Azure that deploys machines that use the Azure Marketplace offering. To use this offering, you must first obtain the Azure Marketplace image. When obtaining your image, consider the following:
28+
endif::mapi[]
1929

2030
* While the images are the same, the Azure Marketplace publisher is different depending on your region. If you are located in North America, specify `redhat` as the publisher. If you are located in EMEA, specify `redhat-limited` as the publisher.
2131
* The offer includes a `rh-ocp-worker` SKU and a `rh-ocp-worker-gen1` SKU. The `rh-ocp-worker` SKU represents a Hyper-V generation version 2 VM image. The default instance types used in {product-title} are version 2 compatible. If you are going to use an instance type that is only version 1 compatible, use the image associated with the `rh-ocp-worker-gen1` SKU. The `rh-ocp-worker-gen1` SKU represents a Hyper-V version 1 VM image.
@@ -111,6 +121,9 @@ endif::ipi[]
111121
ifdef::upi[]
112122
. Record the image details of your offer. If you use the Azure Resource Manager (ARM) template to deploy your worker nodes, you can update `storageProfile.imageReference` by deleting the `id` parameter and adding the `offer`, `publisher`, `sku`, and `version` parameters using the values from your offer.
113123
endif::upi[]
124+
ifdef::mapi[]
125+
. Record the image details of your offer, specifically the values for `publisher`, `offer`, `sku`, and `version`.
126+
endif::mapi[]
114127

115128
ifdef::ipi[]
116129
.Sample `install-config.yaml` file with the Azure Marketplace worker nodes
@@ -133,10 +146,30 @@ compute:
133146
replicas: 3
134147
----
135148
endif::ipi[]
149+
ifdef::mapi[]
150+
. Add the following parameters to the `providerSpec` section of your machine set YAML file using the image details for your offer:
151+
+
152+
.Sample `providerSpec` image values for Azure Marketplace compute machines
153+
[source,yaml]
154+
----
155+
providerSpec:
156+
value:
157+
image:
158+
offer: rh-ocp-worker
159+
publisher: redhat
160+
resourceID: ""
161+
sku: rh-ocp-worker
162+
type: MarketplaceWithPlan
163+
version: 4.8.2021122100
164+
----
165+
endif::mapi[]
136166

137167
ifeval::["{context}" == "installing-azure-customizations"]
138168
:!ipi:
139169
endif::[]
140170
ifeval::["{context}" == "installing-azure-user-infra"]
141171
:!upi:
142172
endif::[]
173+
ifeval::["{context}" == "creating-machineset-azure"]
174+
:!mapi:
175+
endif::[]

modules/machineset-yaml-azure.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ endif::infra[]
8181
credentialsSecret:
8282
name: azure-cloud-credentials
8383
namespace: openshift-machine-api
84-
image:
84+
image: <5>
8585
offer: ""
8686
publisher: ""
87-
resourceID: /resourceGroups/<infrastructure_id>-rg/providers/Microsoft.Compute/images/<infrastructure_id> <5>
87+
resourceID: /resourceGroups/<infrastructure_id>-rg/providers/Microsoft.Compute/images/<infrastructure_id> <6>
8888
sku: ""
8989
version: ""
9090
internalLoadBalancer: ""
9191
kind: AzureMachineProviderSpec
92-
location: <region> <6>
92+
location: <region> <7>
9393
managedIdentity: <infrastructure_id>-identity <1>
9494
metadata:
9595
creationTimestamp: null
@@ -110,9 +110,9 @@ endif::infra[]
110110
name: worker-user-data <2>
111111
vmSize: Standard_D4s_v3
112112
vnet: <infrastructure_id>-vnet <1>
113-
zone: "1" <7>
113+
zone: "1" <8>
114114
ifdef::infra[]
115-
taints: <8>
115+
taints: <9>
116116
- key: node-role.kubernetes.io/infra
117117
effect: NoSchedule
118118
endif::infra[]
@@ -149,11 +149,12 @@ ifdef::infra[]
149149
<3> Specify the infrastructure ID, `<infra>` node label, and region.
150150
endif::infra[]
151151
<4> Optional: Specify the machine set name to enable the use of availability sets. This setting only applies to new compute machines.
152-
<5> Specify an image that is compatible with your instance type. The Hyper-V generation V2 images created by the installation program have a `-gen2` suffix, while V1 images have the same name without the suffix.
153-
<6> Specify the region to place machines on.
154-
<7> Specify the zone within your region to place machines on. Be sure that your region supports the zone that you specify.
152+
<5> Specify the image details for your machine set. If you want to use an Azure Marketplace image, see "Selecting an Azure Marketplace image".
153+
<6> Specify an image that is compatible with your instance type. The Hyper-V generation V2 images created by the installation program have a `-gen2` suffix, while V1 images have the same name without the suffix.
154+
<7> Specify the region to place machines on.
155+
<8> Specify the zone within your region to place machines on. Be sure that your region supports the zone that you specify.
155156
ifdef::infra[]
156-
<8> Specify a taint to prevent user workloads from being scheduled on infra nodes.
157+
<9> Specify a taint to prevent user workloads from being scheduled on infra nodes.
157158
endif::infra[]
158159

159160

0 commit comments

Comments
 (0)