Class AwsHostingOptions
Specifies the Amazon Web Services hosting settings.
Namespace: Neon.Kube.ClusterDef
Assembly: Neon.Kube.dll
Syntax
public class AwsHostingOptions
Constructors
AwsHostingOptions()
Constructor.
Declaration
public AwsHostingOptions()
Properties
AccessKeyId
The AWS access key ID that identifies the IAM key created for the IAM user assigned to NEONKUBE for management activities, including creating the cluster. This combined with SecretAccessKey will be used to confirm the identity.
Declaration
[JsonProperty(PropertyName = "AccessKeyId", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "accessKeyId", ApplyNamingConventions = false)]
public string AccessKeyId { get; set; }
Property Value
Type | Description |
---|---|
string |
AvailabilityZone
Specifies the AWS zone where the cluster will be provisioned. This is required.
Declaration
[JsonProperty(PropertyName = "AvailabilityZone", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "availabilityZone", ApplyNamingConventions = false)]
public string AvailabilityZone { get; set; }
Property Value
Type | Description |
---|---|
string |
ControlPlanePlacementPartitions
Specifies the number of control-plane placement group partitions the cluster control-plane node instances will be deployed to. This defaults to -1 which means that the number of partitions will equal the number of control-plane nodes. AWS supports a maximum of 7 placement partitions.
Declaration
[JsonProperty(PropertyName = "ControlPlanePlacementPartitions", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "controlPlanePlacementPartitions", ApplyNamingConventions = false)]
public int ControlPlanePlacementPartitions { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
AWS provides three different types of placement groups to user help manage where virtual machine instances are provisioned within an AWS availability zone to customize fault tolerance due to AWS hardware failures.
NEONKUBE provisions instances using two partition placement groups, one for the cluster control-plane nodes and the other for the workers. The idea is that control-plane nodes should be deployed on separate hardware for fault tolerance because if the majority of control-plane nodes go offline, the entire cluster will be dramatically impacted. In general, the number of ControlPlanePlacementPartitions partitions should equal the number of control-plane nodes.
Worker nodes are distributed across WorkerPlacementPartitions partitions in a separate placement group. The number of worker partitions defaults to 1, potentially limiting the resilience to AWS hardware failures while making it more likely that AWS will be able to actually satisfy the conditions to provision the cluster node instances.
Unfortunately, AWS may not have enough distinct hardware available to satisfy your requirements. In this case, we recommend that you try another availability zone first and if that doesn't work try reducing the number of partitions which can be as low as 1 partition.
DefaultEbsOptimized
Specifies whether the cluster instances should be EBS-optimized by default.
This defaults to false
and can be overidden for specific cluster nodes
via EbsOptimized.
Declaration
[JsonProperty(PropertyName = "DefaultEbsOptimized", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultEbsOptimized", ApplyNamingConventions = false)]
public bool DefaultEbsOptimized { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Non EBS optimized instances perform disk operation I/O to EBS volumes using the same network used for other network operations. This means that you may see some disk performance declines when your instance is busy serving web traffic or running database queries, etc.
EBS optimization can be enabled for some instance types. This provisions extra dedicated network bandwidth exclusively for EBS I/O. Exactly how this works, depends on the specific VM type.
More modern AWS VM types enable EBS optimization by default and you won't incur any additional charges for these instances and disabling EBS optimization here or via EbsOptimized won't have any effect.
Some AWS instance types can be optimized but this is disabled by default. When you
enable this by setting DefaultEbsOptimized=true
or
EbsOptimized=true
, you'll probably an additional
AWS hourly fee for these instances.
Some AWS instance types don't support EBS optimization. You'll need to be sure that this is disabled for those nodes.
DefaultInstanceType
Identifies the default AWS instance type to be provisioned for cluster nodes that don't specify an instance type. This defaults to c5.2xlarge which includes 8 virtual cores and 16 GiB RAM but can be overridden for specific cluster nodes via InstanceType.
note
NEONKUBE clusters cannot be deployed to ARM-based AWS instance types. You must specify an instance type 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 AWS instance type that satisfies these requirements.
Declaration
[JsonProperty(PropertyName = "DefaultInstanceType", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultInstanceType", ApplyNamingConventions = false)]
public string DefaultInstanceType { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultOpenEbsVolumeSize
Specifies the default AWS volume size to be used when creating OpenEBS cStor disks. This defaults to 128 GiB but can be overridden for specific cluster nodes via OpenEbsVolumeSize.
Declaration
[JsonProperty(PropertyName = "DefaultOpenEbsVolumeSize", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultOpenEbsVolumeSize", ApplyNamingConventions = false)]
public string DefaultOpenEbsVolumeSize { 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.
DefaultOpenEbsVolumeType
Specifies the default AWS volume type to use for OpenEBS cStor disks. This defaults to Gp2 which is SSD based and offers a reasonable compromise between performance and cost. This can be overridden for specific cluster nodes via OpenEbsVolumeType.
Declaration
[JsonProperty(PropertyName = "DefaultOpenEbsVolumeType", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultOpenEbsVolumeType", ApplyNamingConventions = false)]
public AwsVolumeType DefaultOpenEbsVolumeType { get; set; }
Property Value
Type | Description |
---|---|
AwsVolumeType |
DefaultVolumeSize
Specifies the default AWS volume size for the cluster node primary disks. This defaults to 128 GiB but can be overridden for specific cluster nodes via VolumeSize.
Declaration
[JsonProperty(PropertyName = "DefaultVolumeSize", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultVolumeSize", ApplyNamingConventions = false)]
public string DefaultVolumeSize { 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.
DefaultVolumeType
Specifies the default AWS volume type for cluster node primary disks. This defaults to Gp2 which is SSD based and offers a reasonable compromise between performance and cost. This can be overriden for specific cluster nodes via VolumeType.
Declaration
[JsonProperty(PropertyName = "DefaultVolumeType", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "defaultVolumeType", ApplyNamingConventions = false)]
public AwsVolumeType DefaultVolumeType { get; set; }
Property Value
Type | Description |
---|---|
AwsVolumeType |
Network
Specifies the AWS related cluster network options.
Declaration
[JsonProperty(PropertyName = "Network", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "network", ApplyNamingConventions = false)]
public AwsNetworkOptions Network { get; set; }
Property Value
Type | Description |
---|---|
AwsNetworkOptions |
Region
Returns the AWS region where the cluster will be provisioned. This is derived from AvailabilityZone by removing the last character, which is the zone suffix.
Declaration
[JsonIgnore]
[YamlIgnore]
public string Region { get; }
Property Value
Type | Description |
---|---|
string |
ResourceGroup
AWS resource group where all cluster components are to be provisioned. This defaults to "neon-" plus the cluster name but can be customized as required.
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 |
SecretAccessKey
The AWS secret used to confirm the AccessKeyId identity.
Declaration
[JsonProperty(PropertyName = "SecretAccessKey", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "secretAccessKey", ApplyNamingConventions = false)]
public string SecretAccessKey { get; set; }
Property Value
Type | Description |
---|---|
string |
WorkerPlacementPartitions
Specifies the number of worker placement group partitions the cluster worker node instances will be deployed to. This defaults to 1 trading off resilience to hardware failures against increasing the chance that AWS will actually be able to provision the cluster nodes. AWS supports a maximum of 7 placement partitions.
Declaration
[JsonProperty(PropertyName = "WorkerPlacementPartitions", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "workerPlacementPartitions", ApplyNamingConventions = false)]
public int WorkerPlacementPartitions { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
AWS provides three different types of placement groups to user help manage where virtual machine instances are provisioned within an AWS availability zone to customize fault tolerance due to AWS hardware failures.
NEONKUBE provisions instances using two partition placement groups, one for the cluster control-plane nodes and the other for the workers. The idea is that control-plane nodes should be deployed on separate hardware for fault tolerance because if the majority of control-plane nodes go offline, the entire cluster will be dramatically impacted. In general, the number of ControlPlanePlacementPartitions partitions should equal the number of control-plane nodes.
Worker nodes are distributed across WorkerPlacementPartitions partitions in a separate placement group. The number of worker partitions defaults to 1, potentially limiting the resilience to AWS hardware failures while making it more likely that AWS will be able to actually satisfy the conditions to provision the cluster node instances.
Unfortunately, AWS may not have enough distinct hardware available to satisfy your requirements. In this case, we recommend that you try another availability zone first and if that doesn't work try reducing the number of partitions which can be as low as 1 partition.
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. |