Class AzureHostingOptions
Specifies the Microsoft Azure cluster hosting settings.
Namespace: Neon.Kube.ClusterDef
Assembly: Neon.Kube.dll
Syntax
public class AzureHostingOptions
Constructors
AzureHostingOptions()
Constructor.
Declaration
public AzureHostingOptions()
Properties
ClientId
Client/Application ID for the application created to manage Azure access to NEONKUBE provisioning and management tools..
Declaration
[JsonProperty(PropertyName = "ClientId", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "clientId", ApplyNamingConventions = false)]
public string ClientId { get; set; }
Property Value
Type | Description |
---|---|
string |
ClientSecret
ClientSecret/AppPassword generated when creating the neon tool's Azure service principal.
Declaration
[JsonProperty(PropertyName = "ClientSecret", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "clientSecret", ApplyNamingConventions = false)]
public string ClientSecret { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultDiskSize
Specifies the default Azure disk size to be used when cluster node primary disks. This defaults to 128 GiB but this can be overridden for specific cluster nodes via OpenEbsDiskSize.
Declaration
[JsonProperty(PropertyName = "DefaultDiskSize", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultDiskSize", ApplyNamingConventions = false)]
public string DefaultDiskSize { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
StandardHDD, StandardSSD, and PremiumSSD disks may be provisioned in these sizes: 4GiB, 8GiB, 16GiB, 32GiB, 64GiB, 128GiB, 256GiB, 512GiB, 1TiB, 2TiB, 4TiB, 8TiB, 16TiB, or 32TiB.
UltraSSD based disks can be provisioned in these sizes: 4 GiB,8 GiB, GiB,16 GiB,32 GiB,64 GiB,128 GiB,256 GiB,512 GiB, or from 1 TiB to 64TiB in increments of 1 TiB.
note
Node disks smaller than 32 GiB are not supported by NEONKUBE. We'll automatically upgrade the disk size when necessary.
note
This size will be rounded up to the next valid disk size for the given storage type and set to the maximum allowed size, when necessary.
note
The Azure disk sizes listed above may become out-of-date as Azure enhances their services. Review the Azure documentation for more information about what is currently supported.
DefaultOpenEbsDiskSize
Specifies the default size for cluster node primary disks. This defaults to 128 GiB but can be overridden for specific cluster nodes via OpenEbsDiskSize.
Declaration
[JsonProperty(PropertyName = "DefaultOpenEbsDiskSize", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultOpenEbsDiskSize", ApplyNamingConventions = false)]
public string DefaultOpenEbsDiskSize { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
note
Node disks smaller than 32 GiB are not supported by NEONKUBE. We'll automatically round up the disk size when necessary.
DefaultOpenEbsStorageType
Specifies the default Azure storage type of be used for the cluster node primary disks. This defaults to StandardHDD but this can be overridden for specific cluster nodes via OpenEbsStorageType.
Declaration
[JsonProperty(PropertyName = "OpenEbsStorageType", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "openEbstorageType", ApplyNamingConventions = false)]
public AzureStorageType DefaultOpenEbsStorageType { get; set; }
Property Value
Type | Description |
---|---|
AzureStorageType |
DefaultStorageType
Specifies the default Azure storage type for cluster node primary disks. This defaults to StandardSSD and be overridden for specific cluster nodes via StorageType.
Declaration
[JsonProperty(PropertyName = "DefaultStorageType", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultStorageType", ApplyNamingConventions = false)]
public AzureStorageType DefaultStorageType { get; set; }
Property Value
Type | Description |
---|---|
AzureStorageType |
Remarks
note
UltraSSD storage is still relatively new and your region may not be able to attach ultra drives to all VM instance types. See this note for more information.
Note also that Azure does not support OS disks with UltraSSD. NEONKUBE automatically provisions OS disks with PremiumSSD when UltraSSD is specified while provisioning data disks with UltraSSD.
DefaultVmSize
Specifies the default Azure virtual machine size. You the available VM sizes are listed here.
note
This defaults to Standard_D4as_v4 which includes includes 4 virtual CPUs and 16 GiB RAM. You can override this for specific cluster nodfes via VmSize.
note
NEONKUBE clusters cannot be deployed to ARM-based Azure VM sizes at this time. You must specify an VM size using a Intel or AMD 64-bit processor.
note
NEONKUBE requires control-plane and worker instances to have at least 4 CPUs and 8GiB RAM. Choose an Azure VM size instance type that satisfies these requirements.
Declaration
[JsonProperty(PropertyName = "DefaultVmSize", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultVmSize", ApplyNamingConventions = false)]
public string DefaultVmSize { get; set; }
Property Value
Type | Description |
---|---|
string |
DisableProximityPlacement
NEONKUBE cluster VMs are all deployed within the same Azure placement group by default. This ensures the smallest possible network latency between the cluster VMs.
note
Proximity placement groups have one downside: they make it more likely that Azure may not be able to find enough unused VMs to satisfy the proximity constraints. This can happen when you first provision a cluster or later on when you try to scale one.
For NEONKUBE clusters the additional risk of an Azure provisioning failure is going to be very low due to how we use availability sets, which is as similar deployment constraint: control-plane nodes are deployed to one availability set and workers to another. Without a proximity placement group, Azure could deploy the control-plane nodes to one datacenter and the workers to another. This wasn't that likely in the past but as Azure has added more datacenters, the chance of this happening has increased.
Adding the proximity placement constrain, requires that Azure deploy both the control-plane nodes and workers in the same datacenter. So say your cluster has 3 control-plane nodes and 50 workers. With proximity placement enabled, the Azure region will need to have a datacenter with 53 VMs available with the specified sizes. With proximity placement disabled, Azure could deploy the 3 control-plane nodes in one datacenter and the 50 workers in another.
This property defaults to false
. You can disable the proximity placement
constraint by setting this to true
.
Declaration
[JsonProperty(PropertyName = "DisableProximityPlacement", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "disableProximityPlacement", ApplyNamingConventions = false)]
public bool DisableProximityPlacement { get; set; }
Property Value
Type | Description |
---|---|
bool |
DomainLabel
The DNS domain prefix for the public IP address to be assigned to the cluster. This defaults to "neon-UUID" where UUID is generated.
Declaration
[JsonProperty(PropertyName = "DomainLabel", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "domainLabel", ApplyNamingConventions = false)]
public string DomainLabel { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
note
Recomendation: To ensure that there's no conflicts with other services deployed to Azure by you or other companies, we recommend that you generate a GUID and assign it to this property.
This must be unique across all services deployed to an Azure region (your services as well as any other Azure cluster). The IP address will be exposed by the Azure DNS like:
DOMAINLABEL.AZURE-REGION.cloudapp.azure.com
For example, a public IP address with the mycluster deployed to the Azure westus region would have this DNS name:
mycluster.westus.cloudapp.azure.com
Labels can be up to 80 characters in length and may include letters, digits, dashes, underscores, and periods.
Environment
Specifies the target Azure environment. This defaults to the normal public Azure cloud. See AzureCloudEnvironment for other possibilities.
Declaration
[JsonProperty(PropertyName = "Environment", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "environment", ApplyNamingConventions = false)]
public AzureCloudEnvironment Environment { get; set; }
Property Value
Type | Description |
---|---|
AzureCloudEnvironment |
FaultDomains
Specifies the number of Azure fault domains the worker nodes should be distributed across. This defaults to 3 which should not be increased without making sure that your subscription supports the increase (most won't).
note
Manager nodes will always be provisioned in three fault domains to ensure that there will always be a quorum after any single fault domain failure.
Declaration
[JsonProperty(PropertyName = "FaultDomains", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "faultDomains", ApplyNamingConventions = false)]
public int FaultDomains { get; set; }
Property Value
Type | Description |
---|---|
int |
Network
Specifies the Azure related cluster network options.
Declaration
[JsonProperty(PropertyName = "Network", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "network", ApplyNamingConventions = false)]
public AzureNetworkOptions Network { get; set; }
Property Value
Type | Description |
---|---|
AzureNetworkOptions |
Region
Identifies the target Azure region (e.g. westus).
Declaration
[JsonProperty(PropertyName = "Region", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "region", ApplyNamingConventions = false)]
public string Region { get; set; }
Property Value
Type | Description |
---|---|
string |
ResourceGroup
Azure resource group where all cluster components are to be provisioned. This defaults to "neon-" plus the cluster name but can be customized as required.
note
IMPORTANT: Everything in this resource group will be deleted when the cluster is removed. This means that you must be very careful when adding other resources to this group because these will be deleted as well.
Declaration
[JsonProperty(PropertyName = "ResourceGroup", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "resourceGroup", ApplyNamingConventions = false)]
public string ResourceGroup { get; set; }
Property Value
Type | Description |
---|---|
string |
SubscriptionId
Azure account subscription ID obtained from the Azure portal.
Declaration
[JsonProperty(PropertyName = "SubscriptionId", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "subscriptionId", ApplyNamingConventions = false)]
public string SubscriptionId { get; set; }
Property Value
Type | Description |
---|---|
string |
TenantId
Tenant ID generated when creating the neon tool's Azure service principal.
Declaration
[JsonProperty(PropertyName = "TenantId", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "tenantId", ApplyNamingConventions = false)]
public string TenantId { get; set; }
Property Value
Type | Description |
---|---|
string |
UpdateDomains
Specifies the number of Azure update domains the cluster workers will distributed across. This defaults to 20 You may customize this with a value in the range of 2...20.
Azure automatically distributes VMs across the specified number of update domains and when it's necessary to perform planned maintenance on the underlying hardware or to relocate a VM to another host, Azure guarantees that it will reboot hosts in only one update domain at a time and then wait 30 minutes between update domains to give the application a chance to stabilize.
A value of 2 indicates that one half of the cluster servers may be rebooted at the same time during an update domain upgrade. A value of 20 indicates that one twentieth of your VMs may be rebooted at a time.
note
There's no way to specifically assign cluster nodes to specific update domains in Azure. This would have been nice for a cluster hosting replicated database nodes where we'd like to assign replica nodes to different update domains such that all data would still be available while an update domain was being rebooted.
I imagine Azure doesn't allow this due to the difficuilty of ensuring these constraints across a very large number of customer deployments. Azure also mentions that the disruption of a VM for planned maintenance can be slight because VMs can be relocated from one host to another while still running.
note
Manager nodes are always deployed with 20 update domains and since no cluster should ever need anywhere close this number of managers, we'll be ensured that only a single manager will be rebooted together during planned Azure maintenance and the 30 minutes Azure waits after rebooting an update domain gives the rebooted manager a chance to rejoin the other managers and catch up on any changes that happened while it was offline.
note
NEONKUBE deploys manager and worker nodes in separate Azure availability zones. This means that there will always be a quorum of managers available as any one update zone is rebooted.
Declaration
[JsonProperty(PropertyName = "UpdateDomains", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "updateDomains", ApplyNamingConventions = false)]
public int UpdateDomains { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
ClearSecrets()
Clears all hosting related secrets.
Declaration
public void ClearSecrets()
Validate(ClusterDefinition)
Validates the options and also ensures that all null
properties are
initialized to their default values.
Declaration
public void Validate(ClusterDefinition clusterDefinition)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
Exceptions
Type | Condition |
---|---|
ClusterDefinitionException | Thrown if the definition is not valid. |