-
Notifications
You must be signed in to change notification settings - Fork 1.5k
OCPBUGS-4654: azure: upi: use Image Gallery in ARM templates #6684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,153 @@ | ||
| { | ||
| "$schema" : "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
| "contentVersion" : "1.0.0.0", | ||
| "parameters" : { | ||
| "baseName" : { | ||
| "type" : "string", | ||
| "minLength" : 1, | ||
| "metadata" : { | ||
| "description" : "Base name to be used in resource names (usually the cluster's Infra ID)" | ||
| "$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" | ||
| } | ||
| }, | ||
| "vhdBlobURL" : { | ||
| "type" : "string", | ||
| "metadata" : { | ||
| "description" : "URL pointing to the blob where the VHD to be used to create master and worker machines is located" | ||
| "vhdBlobURL": { | ||
| "type": "string", | ||
| "metadata": { | ||
| "description": "URL pointing to the blob where the VHD to be used to create master and worker machines is located" | ||
| } | ||
| } | ||
| }, | ||
| "variables" : { | ||
| "location" : "[resourceGroup().location]", | ||
| "imageName" : "[concat(parameters('baseName'), '-image')]" | ||
| "variables": { | ||
| "location": "[resourceGroup().location]", | ||
| "galleryName": "[concat('gallery_', replace(parameters('baseName'), '-', '_'))]", | ||
|
||
| "imageName": "[parameters('baseName')]", | ||
| "imageNameGen2": "[concat(parameters('baseName'), '-gen2')]", | ||
| "imageRelease": "1.0.0" | ||
| }, | ||
| "resources" : [ | ||
| "resources": [ | ||
| { | ||
| "apiVersion" : "2018-06-01", | ||
| "type": "Microsoft.Compute/images", | ||
| "name": "[variables('imageName')]", | ||
| "location" : "[variables('location')]", | ||
| "properties": { | ||
| "storageProfile": { | ||
| "osDisk": { | ||
| "osType": "Linux", | ||
| "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" | ||
| }, | ||
| "osState": "Generalized", | ||
| "blobUri": "[parameters('vhdBlobURL')]", | ||
| "storageAccountType": "Standard_LRS" | ||
| } | ||
| "osType": "Linux" | ||
| }, | ||
| "resources": [ | ||
| { | ||
| "apiVersion": "2021-10-01", | ||
| "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": { | ||
| "id": "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccount'))]", | ||
| "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": [ | ||
| { | ||
| "apiVersion": "2021-10-01", | ||
| "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": { | ||
| "id": "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccount'))]", | ||
| "uri": "[parameters('vhdBlobURL')]" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.