зеркало из https://github.com/microsoft/oe-engine.git
added 'diskSizeGB' template parameter
This commit is contained in:
Родитель
7d21547352
Коммит
e45774eabb
|
@ -61,6 +61,12 @@
|
|||
},
|
||||
"type": "string"
|
||||
},
|
||||
"diskSizeGB": {
|
||||
"metadata": {
|
||||
"description": "OS disk size in GB"
|
||||
},
|
||||
"type": "string"
|
||||
},
|
||||
"storageAccountType": {
|
||||
{{GetStorageAccountTypes}}
|
||||
"metadata": {
|
||||
|
|
|
@ -223,9 +223,7 @@
|
|||
"osDisk": {
|
||||
"caching": "ReadWrite",
|
||||
"createOption": "FromImage",
|
||||
{{if ne .MasterProfile.OSDiskSizeGB 0}}
|
||||
"diskSizeGB": {{.MasterProfile.OSDiskSizeGB}},
|
||||
{{end}}
|
||||
"diskSizeGB": "[parameters('diskSizeGB')]",
|
||||
"managedDisk": {
|
||||
"storageAccountType": "[parameters('storageAccountType')]"
|
||||
}
|
||||
|
|
|
@ -22,9 +22,11 @@ const (
|
|||
// DefaultSubnet specifies default subnet
|
||||
DefaultSubnet = "10.0.0.0/24"
|
||||
// DefaultStorageAccountType specifies default storage account type
|
||||
DefaultStorageAccountType = "Standard_LRS"
|
||||
DefaultStorageAccountType = "Premium_LRS"
|
||||
// DefaultPackageBaseURL specifies default package base URL
|
||||
DefaultPackageBaseURL = "https://oedownload.blob.core.windows.net/binaries"
|
||||
// DefaultOSDiskSizeGB specifies default OS disk size
|
||||
DefaultOSDiskSizeGB = 30
|
||||
)
|
||||
|
||||
// OSImage represents Azure OS Image
|
||||
|
@ -68,9 +70,9 @@ var AllowedVMSizes = []string{
|
|||
|
||||
// AllowedStorageAccountTypes provides supported storage account types
|
||||
var AllowedStorageAccountTypes = []string{
|
||||
"Standard_LRS",
|
||||
"Premium_LRS",
|
||||
"Standard_RAGRS",
|
||||
"StandardSSD_LRS",
|
||||
"Standard_LRS",
|
||||
}
|
||||
|
||||
func getAllowedValues(vals []string) string {
|
||||
|
|
|
@ -23,6 +23,9 @@ func setPropertiesDefaults(oe *api.OpenEnclave, isUpgrade bool) {
|
|||
if len(oe.Properties.MasterProfile.OSImageName) == 0 {
|
||||
oe.Properties.MasterProfile.OSImageName = api.OsImageDefault
|
||||
}
|
||||
if oe.Properties.MasterProfile.OSDiskSizeGB == 0 {
|
||||
oe.Properties.MasterProfile.OSDiskSizeGB = api.DefaultOSDiskSizeGB
|
||||
}
|
||||
setMasterNetworkDefaults(oe.Properties, isUpgrade)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package engine
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/Microsoft/oe-engine/pkg/api"
|
||||
)
|
||||
|
||||
|
@ -28,6 +30,7 @@ func getParameters(cs *api.OpenEnclave, generatorCode string) (paramsMap, error)
|
|||
addValue(parametersMap, "vmName", properties.MasterProfile.VMName)
|
||||
addValue(parametersMap, "vmSize", properties.MasterProfile.VMSize)
|
||||
addValue(parametersMap, "osImageName", properties.MasterProfile.OSImageName)
|
||||
addValue(parametersMap, "diskSizeGB", strconv.Itoa(properties.MasterProfile.OSDiskSizeGB))
|
||||
|
||||
if properties.LinuxProfile != nil {
|
||||
addValue(parametersMap, "sshRSAPublicKey", properties.LinuxProfile.SSH.PublicKeys[0].KeyData)
|
||||
|
|
Загрузка…
Ссылка в новой задаче