зеркало из https://github.com/Azure/acs-engine.git
StorageProfile default is now ManagedDisks (#2833)
This commit is contained in:
Родитель
897fbbcbda
Коммит
cd14e015a8
|
@ -414,7 +414,7 @@ We consider `kubeletConfig`, `controllerManagerConfig`, `apiServerConfig`, and `
|
|||
|vmSize|yes|Describes a valid [Azure VM Sizes](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes/)|
|
||||
|publicKey|yes|The public SSH key used for authenticating access to the jumpbox. Here are instructions for [generating a public/private key pair](ssh.md#ssh-key-generation)|
|
||||
|osDiskSizeGB|no|Describes the OS Disk Size in GB. Defaults to `30`|
|
||||
|storageProfile|no|Specifies the storage profile to use. Valid values are [StorageAccount](../examples/disks-storageaccount) or [ManagedDisks](../examples/disks-managed). Defaults to `StorageAccount`|
|
||||
|storageProfile|no|Specifies the storage profile to use. Valid values are [ManagedDisks](../examples/disks-managed) or [StorageAccount](../examples/disks-storageaccount). Defaults to `ManagedDisks`|
|
||||
|username|no|Describes the admin username to be used on the jumpbox. Defaults to `azureuser`|
|
||||
|
||||
### masterProfile
|
||||
|
@ -446,7 +446,7 @@ A cluster can have 0 to 12 agent pool profiles. Agent Pool Profiles are used for
|
|||
|dnsPrefix|Required if agents are to be exposed publically with a load balancer|The dns prefix that forms the FQDN to access the loadbalancer for this agent pool. This must be a unique name among all agent pools. Not supported for Kubernetes clusters|
|
||||
|name|yes|This is the unique name for the agent pool profile. The resources of the agent pool profile are derived from this name|
|
||||
|ports|only required if needed for exposing services publically|Describes an array of ports need for exposing publically. A tcp probe is configured for each port and only opens to an agent node if the agent node is listening on that port. A maximum of 150 ports may be specified. Not supported for Kubernetes clusters|
|
||||
|storageProfile|no|Specifies the storage profile to use. Valid values are [StorageAccount](../examples/disks-storageaccount) or [ManagedDisks](../examples/disks-managed). Defaults to `StorageAccount`|
|
||||
|storageProfile|no|Specifies the storage profile to use. Valid values are [ManagedDisks](../examples/disks-managed) or [StorageAccount](../examples/disks-storageaccount). Defaults to `ManagedDisks`|
|
||||
|vmsize|yes|Describes a valid [Azure VM Sizes](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-sizes/). These are restricted to machines with at least 2 cores|
|
||||
|osDiskSizeGB|no|Describes the OS Disk Size in GB|
|
||||
|vnetSubnetId|no|Specifies the Id of an alternate VNET subnet. The subnet id must specify a valid VNET ID owned by the same subscription. ([bring your own VNET examples](../examples/vnet))|
|
||||
|
|
|
@ -289,11 +289,9 @@ container runtime by setting:
|
|||
```
|
||||
|
||||
You will need to make sure your agents are using a `vmSize` that [supports
|
||||
nested
|
||||
virtualization](https://azure.microsoft.com/en-us/blog/nested-virtualization-in-azure/).
|
||||
nested virtualization](https://azure.microsoft.com/en-us/blog/nested-virtualization-in-azure/).
|
||||
These are the `Dv3` or `Ev3` series nodes.
|
||||
|
||||
You will also need to attach a disk to those nodes for the device-mapper disk that clear containers will use.
|
||||
This should look like:
|
||||
|
||||
```
|
||||
|
@ -303,7 +301,6 @@ This should look like:
|
|||
"count": 3,
|
||||
"vmSize": "Standard_D4s_v3",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile": "ManagedDisks",
|
||||
"diskSizesGB": [1023]
|
||||
}
|
||||
],
|
||||
|
@ -340,7 +337,6 @@ To auto-provision a jumpbox with your acs-engine deployment use:
|
|||
"name": "my-jb",
|
||||
"vmSize": "Standard_D4s_v3",
|
||||
"osDiskSizeGB": 30,
|
||||
"storageProfile": "ManagedDisks",
|
||||
"username": "azureuser",
|
||||
"publicKey": "xxx"
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
},
|
||||
"count": 1,
|
||||
"dnsPrefix": "",
|
||||
"storageProfile": "ManagedDisks",
|
||||
"vmSize": "Standard_D2_v2"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
|
@ -22,7 +21,6 @@
|
|||
"name": "stretch",
|
||||
"resourceGroup": "debian"
|
||||
},
|
||||
"storageProfile": "ManagedDisks",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
}
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
## Overview
|
||||
|
||||
ACS-Engine enables you to create customized Docker enabled cluster on Microsoft Azure with [managed disks](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview).
|
||||
ACS-Engine enables you to create customized Docker enabled cluster on Microsoft Azure with [managed disks](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview).
|
||||
|
||||
These examples are provided as a reference, note that managed disks is the default storage account type if none is specified.
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
"count": 50,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"osType": "Linux",
|
||||
"storageProfile": "ManagedDisks",
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -8,23 +8,20 @@
|
|||
"masterProfile": {
|
||||
"count": 3,
|
||||
"dnsPrefix": "",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"vmSize": "Standard_D2_v2"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
{
|
||||
"name": "agentpool1",
|
||||
"count": 2,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
},
|
||||
{
|
||||
"name": "agentpool2",
|
||||
"count": 3,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
}
|
||||
],
|
||||
"linuxProfile": {
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
"masterProfile": {
|
||||
"count": 1,
|
||||
"dnsPrefix": "",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"vmSize": "Standard_D2_v2"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
{
|
||||
|
@ -17,15 +16,13 @@
|
|||
"count": 2,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks",
|
||||
"osType": "Windows"
|
||||
},
|
||||
{
|
||||
"name": "agentpool2",
|
||||
"count": 1,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
}
|
||||
],
|
||||
"windowsProfile": {
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
"masterProfile": {
|
||||
"count": 1,
|
||||
"dnsPrefix": "",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"vmSize": "Standard_D2_v2"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
{
|
||||
|
@ -17,6 +16,7 @@
|
|||
"count": 1,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile": "StorageAccount",
|
||||
"osType": "Windows"
|
||||
},
|
||||
{
|
||||
|
@ -24,7 +24,6 @@
|
|||
"count": 2,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks",
|
||||
"osType": "Windows"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -8,22 +8,21 @@
|
|||
"masterProfile": {
|
||||
"count": 1,
|
||||
"dnsPrefix": "",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"vmSize": "Standard_D2_v2"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
{
|
||||
"name": "agentpool1",
|
||||
"count": 1,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile": "StorageAccount"
|
||||
},
|
||||
{
|
||||
"name": "agentpool2",
|
||||
"count": 2,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
}
|
||||
],
|
||||
"linuxProfile": {
|
||||
|
|
|
@ -8,23 +8,20 @@
|
|||
"masterProfile": {
|
||||
"count": 3,
|
||||
"dnsPrefix": "",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"vmSize": "Standard_D2_v2"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
{
|
||||
"name": "agentpool1",
|
||||
"count": 2,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
},
|
||||
{
|
||||
"name": "agentpool2",
|
||||
"count": 1,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile" : "ManagedDisks"
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
}
|
||||
],
|
||||
"linuxProfile": {
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
"name": "my-jb",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"diskSizeGB": 30,
|
||||
"storageProfile": "ManagedDisks",
|
||||
"username": "azureuser",
|
||||
"publicKey": ""
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
"name": "my-jb",
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"diskSizeGB": 30,
|
||||
"storageProfile": "ManagedDisks",
|
||||
"username": "azureuser",
|
||||
"publicKey": ""
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
"count": 2,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet",
|
||||
"storageProfile": "ManagedDisks",
|
||||
"osType": "Windows"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -511,7 +511,7 @@ func setOrchestratorDefaults(cs *api.ContainerService) {
|
|||
}
|
||||
|
||||
if a.OrchestratorProfile.KubernetesConfig.PrivateJumpboxProvision() && a.OrchestratorProfile.KubernetesConfig.PrivateCluster.JumpboxProfile.StorageProfile == "" {
|
||||
a.OrchestratorProfile.KubernetesConfig.PrivateCluster.JumpboxProfile.StorageProfile = api.StorageAccount
|
||||
a.OrchestratorProfile.KubernetesConfig.PrivateCluster.JumpboxProfile.StorageProfile = api.ManagedDisks
|
||||
}
|
||||
|
||||
if a.OrchestratorProfile.KubernetesConfig.EnableRbac == nil {
|
||||
|
@ -716,11 +716,19 @@ func setAgentNetworkDefaults(a *api.Properties) {
|
|||
// setStorageDefaults for agents
|
||||
func setStorageDefaults(a *api.Properties) {
|
||||
if a.MasterProfile != nil && len(a.MasterProfile.StorageProfile) == 0 {
|
||||
a.MasterProfile.StorageProfile = api.StorageAccount
|
||||
if a.OrchestratorProfile.OrchestratorType == api.Kubernetes {
|
||||
a.MasterProfile.StorageProfile = api.ManagedDisks
|
||||
} else {
|
||||
a.MasterProfile.StorageProfile = api.StorageAccount
|
||||
}
|
||||
}
|
||||
for _, profile := range a.AgentPoolProfiles {
|
||||
if len(profile.StorageProfile) == 0 {
|
||||
profile.StorageProfile = api.StorageAccount
|
||||
if a.OrchestratorProfile.OrchestratorType == api.Kubernetes {
|
||||
profile.StorageProfile = api.ManagedDisks
|
||||
} else {
|
||||
profile.StorageProfile = api.StorageAccount
|
||||
}
|
||||
}
|
||||
if len(profile.AvailabilityProfile) == 0 {
|
||||
profile.AvailabilityProfile = api.VirtualMachineScaleSets
|
||||
|
|
|
@ -448,6 +448,39 @@ func TestNetworkPolicyDefaults(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestStorageProfile(t *testing.T) {
|
||||
// Test ManagedDisks default configuration
|
||||
mockCS := getMockBaseContainerService("1.8.10")
|
||||
properties := mockCS.Properties
|
||||
properties.OrchestratorProfile.OrchestratorType = "Kubernetes"
|
||||
properties.MasterProfile.Count = 1
|
||||
properties.OrchestratorProfile.KubernetesConfig.PrivateCluster = &api.PrivateCluster{
|
||||
Enabled: helpers.PointerToBool(true),
|
||||
JumpboxProfile: &api.PrivateJumpboxProfile{},
|
||||
}
|
||||
SetPropertiesDefaults(&mockCS, false)
|
||||
if properties.MasterProfile.StorageProfile != api.ManagedDisks {
|
||||
t.Fatalf("MasterProfile.StorageProfile did not have the expected configuration, got %s, expected %s",
|
||||
properties.MasterProfile.StorageProfile, api.ManagedDisks)
|
||||
}
|
||||
if !properties.MasterProfile.IsManagedDisks() {
|
||||
t.Fatalf("MasterProfile.StorageProfile did not have the expected configuration, got %t, expected %t",
|
||||
false, true)
|
||||
}
|
||||
if properties.AgentPoolProfiles[0].StorageProfile != api.ManagedDisks {
|
||||
t.Fatalf("AgentPoolProfile.StorageProfile did not have the expected configuration, got %s, expected %s",
|
||||
properties.AgentPoolProfiles[0].StorageProfile, api.ManagedDisks)
|
||||
}
|
||||
if !properties.AgentPoolProfiles[0].IsManagedDisks() {
|
||||
t.Fatalf("AgentPoolProfile.IsManagedDisks() did not have the expected configuration, got %t, expected %t",
|
||||
false, true)
|
||||
}
|
||||
if properties.OrchestratorProfile.KubernetesConfig.PrivateCluster.JumpboxProfile.StorageProfile != api.ManagedDisks {
|
||||
t.Fatalf("MasterProfile.StorageProfile did not have the expected configuration, got %s, expected %s",
|
||||
properties.OrchestratorProfile.KubernetesConfig.PrivateCluster.JumpboxProfile.StorageProfile, api.ManagedDisks)
|
||||
}
|
||||
}
|
||||
|
||||
func getMockAddon(name string) api.KubernetesAddon {
|
||||
return api.KubernetesAddon{
|
||||
Name: name,
|
||||
|
|
Загрузка…
Ссылка в новой задаче