зеркало из https://github.com/microsoft/oe-engine.git
added support for Windows Custom Image URL
This commit is contained in:
Родитель
f487a96775
Коммит
78f10200cd
|
@ -204,7 +204,18 @@
|
|||
{{end}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
{{if .IsWindows}}{{if .WindowsProfile.HasSecrets}}
|
||||
{{if .IsWindows}}
|
||||
{{if HasWindowsCustomImage}}
|
||||
,
|
||||
"windowsImageSourceUrl": {
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "The source of the generalized blob which will be used to create a custom windows image."
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
{{end}}
|
||||
{{if .WindowsProfile.HasSecrets}}
|
||||
{{range $vIndex, $vault := .WindowsProfile.Secrets}}
|
||||
,
|
||||
"windowsKeyVaultID{{$vIndex}}": {
|
||||
|
@ -229,4 +240,5 @@
|
|||
}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}} {{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -79,6 +79,23 @@
|
|||
},
|
||||
"type": "Microsoft.Network/networkInterfaces"
|
||||
},
|
||||
{{if HasWindowsCustomImage}}
|
||||
{"type": "Microsoft.Compute/images",
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"name": "CustomWindowsImage",
|
||||
"location": "[parameters('location')]",
|
||||
"properties": {
|
||||
"storageProfile": {
|
||||
"osDisk": {
|
||||
"osType": "Windows",
|
||||
"osState": "Generalized",
|
||||
"blobUri": "[parameters('windowsImageSourceUrl')]",
|
||||
"storageAccountType": "Standard_LRS"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{{end}}
|
||||
{
|
||||
"apiVersion": "[variables('apiVersionDefault')]",
|
||||
"dependsOn": [
|
||||
|
@ -115,7 +132,13 @@
|
|||
{{end}}{{end}}
|
||||
},
|
||||
"storageProfile": {
|
||||
{{if HasWindowsCustomImage}}
|
||||
"imageReference": {
|
||||
"id": "[resourceId('Microsoft.Compute/images','CustomWindowsImage')]"
|
||||
},
|
||||
{{else}}
|
||||
"imageReference": "[variables('imageReference')[parameters('osImageName')]]",
|
||||
{{end}}
|
||||
"osDisk": {
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage",
|
||||
|
|
|
@ -45,6 +45,9 @@ func getParameters(cs *api.OpenEnclave, generatorCode string) (paramsMap, error)
|
|||
addValue(parametersMap, "authenticationType", "password")
|
||||
addValue(parametersMap, "adminUsername", properties.WindowsProfile.AdminUsername)
|
||||
addValue(parametersMap, "adminPasswordOrKey", properties.WindowsProfile.AdminPassword)
|
||||
if properties.WindowsProfile.HasCustomImage() {
|
||||
addValue(parametersMap, "windowsImageSourceUrl", properties.WindowsProfile.WindowsImageSourceURL)
|
||||
}
|
||||
}
|
||||
|
||||
if properties.LinuxProfile != nil && !cs.OeSdkExcluded {
|
||||
|
|
Загрузка…
Ссылка в новой задаче