2019-12-11 18:32:49 -03:00
|
|
|
{
|
2022-12-06 23:02:23 +01:00
|
|
|
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
|
|
|
|
"contentVersion": "1.0.0.0",
|
|
|
|
|
"parameters": {
|
|
|
|
|
"architecture": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The architecture of the Virtual Machines"
|
|
|
|
|
},
|
|
|
|
|
"defaultValue": "x64",
|
|
|
|
|
"allowedValues": [
|
|
|
|
|
"Arm64",
|
|
|
|
|
"x64"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"baseName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1,
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "Base name to be used in resource names (usually the cluster's Infra ID)"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"storageAccount": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The Storage Account name"
|
2020-02-08 00:17:22 -03:00
|
|
|
}
|
|
|
|
|
},
|
2022-12-06 23:02:23 +01:00
|
|
|
"vhdBlobURL": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "URL pointing to the blob where the VHD to be used to create master and worker machines is located"
|
2019-12-11 18:32:49 -03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2022-12-06 23:02:23 +01:00
|
|
|
"variables": {
|
|
|
|
|
"location": "[resourceGroup().location]",
|
|
|
|
|
"galleryName": "[concat('gallery_', replace(parameters('baseName'), '-', '_'))]",
|
|
|
|
|
"imageName": "[parameters('baseName')]",
|
|
|
|
|
"imageNameGen2": "[concat(parameters('baseName'), '-gen2')]",
|
|
|
|
|
"imageRelease": "1.0.0"
|
2019-12-11 18:32:49 -03:00
|
|
|
},
|
2022-12-06 23:02:23 +01:00
|
|
|
"resources": [
|
2019-12-11 18:32:49 -03:00
|
|
|
{
|
2022-12-06 23:02:23 +01:00
|
|
|
"apiVersion": "2021-10-01",
|
|
|
|
|
"type": "Microsoft.Compute/galleries",
|
|
|
|
|
"name": "[variables('galleryName')]",
|
|
|
|
|
"location": "[variables('location')]",
|
|
|
|
|
"resources": [
|
|
|
|
|
{
|
|
|
|
|
"apiVersion": "2021-10-01",
|
|
|
|
|
"type": "images",
|
|
|
|
|
"name": "[variables('imageName')]",
|
|
|
|
|
"location": "[variables('location')]",
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[variables('galleryName')]"
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"architecture": "[parameters('architecture')]",
|
|
|
|
|
"hyperVGeneration": "V1",
|
|
|
|
|
"identifier": {
|
|
|
|
|
"offer": "rhcos",
|
|
|
|
|
"publisher": "RedHat",
|
|
|
|
|
"sku": "basic"
|
|
|
|
|
},
|
2019-12-11 18:32:49 -03:00
|
|
|
"osState": "Generalized",
|
2022-12-06 23:02:23 +01:00
|
|
|
"osType": "Linux"
|
|
|
|
|
},
|
|
|
|
|
"resources": [
|
|
|
|
|
{
|
2025-11-10 11:01:46 +08:00
|
|
|
"apiVersion": "2022-03-03",
|
2022-12-06 23:02:23 +01:00
|
|
|
"type": "versions",
|
|
|
|
|
"name": "[variables('imageRelease')]",
|
|
|
|
|
"location": "[variables('location')]",
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[variables('imageName')]"
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"publishingProfile": {
|
|
|
|
|
"storageAccountType": "Standard_LRS",
|
|
|
|
|
"targetRegions": [
|
|
|
|
|
{
|
|
|
|
|
"name": "[variables('location')]",
|
|
|
|
|
"regionalReplicaCount": "1"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"storageProfile": {
|
|
|
|
|
"osDiskImage": {
|
|
|
|
|
"source": {
|
2025-11-10 11:01:46 +08:00
|
|
|
"storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccount'))]",
|
2022-12-06 23:02:23 +01:00
|
|
|
"uri": "[parameters('vhdBlobURL')]"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"apiVersion": "2021-10-01",
|
|
|
|
|
"type": "images",
|
|
|
|
|
"name": "[variables('imageNameGen2')]",
|
|
|
|
|
"location": "[variables('location')]",
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[variables('galleryName')]"
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"architecture": "[parameters('architecture')]",
|
|
|
|
|
"hyperVGeneration": "V2",
|
|
|
|
|
"identifier": {
|
|
|
|
|
"offer": "rhcos-gen2",
|
|
|
|
|
"publisher": "RedHat-gen2",
|
|
|
|
|
"sku": "gen2"
|
|
|
|
|
},
|
|
|
|
|
"osState": "Generalized",
|
|
|
|
|
"osType": "Linux"
|
|
|
|
|
},
|
|
|
|
|
"resources": [
|
|
|
|
|
{
|
2025-11-17 17:34:50 +08:00
|
|
|
"apiVersion": "2022-03-03",
|
2022-12-06 23:02:23 +01:00
|
|
|
"type": "versions",
|
|
|
|
|
"name": "[variables('imageRelease')]",
|
|
|
|
|
"location": "[variables('location')]",
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[variables('imageNameGen2')]"
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"publishingProfile": {
|
|
|
|
|
"storageAccountType": "Standard_LRS",
|
|
|
|
|
"targetRegions": [
|
|
|
|
|
{
|
|
|
|
|
"name": "[variables('location')]",
|
|
|
|
|
"regionalReplicaCount": "1"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"storageProfile": {
|
|
|
|
|
"osDiskImage": {
|
|
|
|
|
"source": {
|
2025-11-17 17:34:50 +08:00
|
|
|
"storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccount'))]",
|
2022-12-06 23:02:23 +01:00
|
|
|
"uri": "[parameters('vhdBlobURL')]"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2019-12-11 18:32:49 -03:00
|
|
|
}
|
2022-12-06 23:02:23 +01:00
|
|
|
]
|
2019-12-11 18:32:49 -03:00
|
|
|
}
|
|
|
|
|
]
|
2022-12-06 23:02:23 +01:00
|
|
|
}
|