ALIYUN::EHPC::AutoScaleConfig

更新时间:
复制 MD 格式

Configures auto scaling for a specified E-HPC cluster.

Syntax

{
  "Type": "ALIYUN::EHPC::AutoScaleConfig",
  "Properties": {
    "ExtraNodesGrowRatio": Integer,
    "EnableAutoGrow": Boolean,
    "ClusterId": String,
    "ShrinkIdleTimes": Integer,
    "MaxNodesInCluster": Integer,
    "EnableAutoShrink": Boolean,
    "GrowRatio": Integer,
    "GrowIntervalInMinutes": Integer,
    "GrowTimeoutInMinutes": Integer,
    "ImageId": String,
    "ShrinkIntervalInMinutes": Integer,
    "SpotPriceLimit": Number,
    "Queues": List,
    "ExcludeNodes": String,
    "SpotStrategy": String
  }
}

Properties

PropertyTypeRequiredUpdate allowedDescriptionConstraints
ExtraNodesGrowRatioIntegerNoYesThe percentage of extra nodes.Example: If a job needs 100 nodes and this value is 2, 102 nodes are added.

Valid values: 0 to 100.

Default value: 0.

EnableAutoGrowBooleanNoYesEnables or disables auto scale-out.Valid values:
  • true: Enables scale-out.
  • false (default): Disables scale-out.
ClusterIdStringYesNoThe cluster ID.None
ShrinkIdleTimesIntegerNoYesConsecutive idle count before a node is considered for release. A node is idle when not running jobs.Number of consecutive idle checks before scale-in.

Valid values: 2 to 5.

Default value: 3.

Example: With ShrinkIdleTimes set to 3 and the default ShrinkIntervalInMinutes of 2 minutes, a node is released after being idle for 6+ minutes.
MaxNodesInClusterIntegerNoYesMaximum compute nodes allowed in the cluster.Valid values: 0 to 500.

Default value: 100.

EnableAutoShrinkBooleanNoYesEnables or disables auto scale-in.Valid values:
  • true: Enables scale-in.
  • false (default): Disables scale-in.
GrowRatioIntegerNoYesThe scale-out ratio.Example: If a job needs 10 nodes and this value is 50, nodes are added at 50% per round.

Valid values: 1 to 100.

Default value: 100.

GrowIntervalInMinutesIntegerNoYesInterval between consecutive scale-out rounds.Unit: minutes.

Valid values: 2 to 10.

Default value: 2.

Note A scale-out task may span multiple rounds. This parameter controls the interval between rounds.
GrowTimeoutInMinutesIntegerNoYesThe scale-out timeout period.Unit: minutes.

Valid values: 10 to 60.

Default value: 20.

Nodes not running after the timeout are released.
ImageIdStringNoYesThe image ID.
Note
  • If you set both QueueImageId and ImageId, QueueImageId is used by default.
  • If you set QueueImageId or ImageId, the specified image is used.
  • If you leave both QueueImageId and ImageId empty, the image used in the last scale-out is used. If no scale-out has been performed, the image used to create the cluster is used.
ShrinkIntervalInMinutesIntegerNoYesInterval between consecutive scale-in rounds.Unit: minutes.

Valid values: 2 to 10.

Default value: 2.

SpotPriceLimitNumberNoYesThe maximum hourly price for the nodes.The value can be accurate to three decimal places.

This parameter takes effect only when SpotStrategy is set to SpotWithPriceLimit.

QueuesListNoYesQueue configurations for scale-out.Queues properties.
ExcludeNodesStringNoYesNodes excluded from auto scaling.Separate multiple nodes with commas (,).
Note Excluded nodes are never released during scale-in.
SpotStrategyStringNoYesThe preemption policy for compute nodes.Valid values:
  • NoSpot (default): The nodes are pay-as-you-go instances.
  • SpotWithPriceLimit: The nodes are preemptible instances with a user-defined maximum hourly price.
  • SpotAsPriceGo: The nodes are preemptible instances for which the system automatically bids based on the current market price.

Queues syntax

"Queues": [
  {
    "HostNameSuffix": String,
    "MinNodesInQueue": Integer,
    "MaxNodesInQueue": Integer,
    "EnableAutoGrow": Boolean,
    "DataDisks": List,
    "SystemDiskSize": Integer,
    "SystemDiskLevel": String,
    "QueueImageId": String,
    "MinNodesPerCycle": Integer,
    "MaxNodesPerCycle": Integer,
    "EnableAutoShrink": Boolean,
    "SystemDiskCategory": String,
    "HostNamePrefix": String,
    "SpotPriceLimit": Number,
    "InstanceTypes": List,
    "InstanceType": String,
    "QueueName": String,
    "SpotStrategy": String
  }
]

Queues properties

Property NameTypeRequiredUpdate allowedDescriptionConstraints
HostNameSuffixStringNoYesHostname suffix for scaled-out nodes.None
MinNodesInQueueIntegerNoYesMinimum node count after scale-in.Valid values: 0 to 50.

Default value: 0.

MaxNodesInQueueIntegerNoYesMaximum node count after scale-out.Valid values: 0 to 500.

Default value: 100.

EnableAutoGrowBooleanNoYesEnables or disables queue-level auto scale-out.Valid values:
  • true: Enables scale-out.
  • false (default): Disables scale-out.
DataDisksListNoYesData disk configurations.DataDisks properties.
SystemDiskSizeIntegerNoYesSystem disk size for scaled-out nodes.Unit: GB.

Valid values: 40 to 500.

Default value: 40.

SystemDiskLevelStringNoYesSystem disk performance level for scaled-out nodes.Valid values:
  • PL0: A single disk can deliver up to 10,000 random read/write input/output operations per second (IOPS).
  • PL1 (default): A single disk can deliver up to 50,000 random read/write IOPS.
  • PL2: A single disk can deliver up to 100,000 random read/write IOPS.
  • PL3: A single disk can deliver up to 1,000,000 random read/write IOPS.
QueueImageIdStringNoYesImage ID for queue scale-out.
Note
  • If you set both QueueImageId and ImageId, QueueImageId is used by default.
  • If you set QueueImageId or ImageId, the specified image is used.
  • If you leave both QueueImageId and ImageId empty, the image used in the last scale-out is used. If no scale-out has been performed, the image used to create the cluster is used.
MinNodesPerCycleIntegerNoYesMinimum nodes to add per scale-out round.Valid values: 1 to 99.

Default value: 1.

If the required count is less than this minimum, auto scaling adjusts upward to ensure resource delivery.
Note This adjustment applies to the current cycle only.
MaxNodesPerCycleIntegerNoYesMaximum nodes to add per scale-out round.Valid values: 0 to 99.

Default value: 0.

EnableAutoShrinkBooleanNoYesEnables or disables queue-level auto scale-in.Valid values:
  • true: Enables scale-in.
  • false (default): Disables scale-in.
SystemDiskCategoryStringNoYesSystem disk type for scaled-out nodes.Valid values:
  • cloud_efficiency (default): Ultra Disk.
  • cloud_ssd: Standard SSD.
  • cloud_essd: enterprise SSD.
  • cloud: basic disk. This disk type is discontinued.
HostNamePrefixStringNoYesHostname prefix for scaled-out nodes.None
SpotPriceLimitNumberNoYesMaximum hourly price for auto-scaled nodes.The value can be accurate to three decimal places.

This parameter takes effect only when Queues.N.SpotStrategy is set to SpotWithPriceLimit.

InstanceTypesListNoYesInstance type configurations for auto-scaled nodes.InstanceTypes properties.
InstanceTypeStringNoYesInstance type for auto-scaled nodes in the queue.None
QueueNameStringNoYesThe name of the queue.You can set the names of N queues simultaneously.
SpotStrategyStringNoYesPreemption policy for auto-scaled nodes in the queue.Valid values:
  • NoSpot (default): The nodes are pay-as-you-go instances.
  • SpotWithPriceLimit: The nodes are preemptible instances with a user-defined maximum hourly price.
  • SpotAsPriceGo: The nodes are preemptible instances for which the system automatically bids based on the current market price.

DataDisks syntax

"DataDisks": [
  {
    "DataDiskKMSKeyId": String,
    "DataDiskPerformanceLevel": String,
    "DataDiskEncrypted": Boolean,
    "DataDiskDeleteWithInstance": Boolean,
    "DataDiskSize": Integer,
    "DataDiskCategory": String
  }
]

DataDisks properties

Property NameTypeRequiredUpdate allowedDescriptionConstraints
DataDiskKMSKeyIdStringNoYesKMS key ID for the data disk.None
DataDiskPerformanceLevelStringNoYesPerformance level of the data disk (ESSD only).Valid only when DataDiskCategory is set to cloud_essd.

Valid values:

  • PL0: A single disk can deliver up to 10,000 random read/write IOPS.
  • PL1 (default): A single disk can deliver up to 50,000 random read/write IOPS.
  • PL2: A single disk can deliver up to 100,000 random read/write IOPS.
  • PL3: A single disk can deliver up to 1,000,000 random read/write IOPS.
DataDiskEncryptedBooleanNoYesSpecifies whether to encrypt the data disk.Valid values:
  • true: Encrypts the data disk.
  • false (default): Does not encrypt the data disk.
DataDiskDeleteWithInstanceBooleanNoYesSpecifies whether to release the data disk with the instance.Valid values:
  • true (default): Releases the data disk with the instance.
  • false: Retains the data disk when the instance is released.
DataDiskSizeIntegerNoYesSize of the data disk.Unit: GB.

Valid values: 40 to 500.

Default value: 40.
DataDiskCategoryStringNoYesType of the data disk.Valid values:
  • cloud_efficiency (default): ultra disk.
  • cloud_ssd: Standard SSD.
  • cloud_essd: enterprise SSD.
  • cloud: basic disk.

InstanceTypes syntax

"InstanceTypes": [
  {
    "ZoneId": String,
    "VSwitchId": String,
    "SpotPriceLimit": Number,
    "InstanceType": String,
    "SpotStrategy": String
  }
]

InstanceTypes properties

Property NameTypeRequiredUpdate allowedDescriptionConstraints
ZoneIdStringYesNoZone ID for auto-scaled nodes.

Takes effect during queue scale-out.

N ranges from 0 to 500.

VSwitchIdStringYesNovSwitch ID for auto-scaled nodes.

Takes effect during queue scale-out.

N ranges from 0 to 500.

SpotPriceLimitNumberNoYesMaximum hourly price for auto-scaled nodes.The value can be accurate to three decimal places.

Valid only when SpotStrategy is set to SpotWithPriceLimit.

Takes effect during queue scale-out.

N ranges from 0 to 500.

InstanceTypeStringYesYesInstance type for auto-scaled nodes.

Takes effect during queue scale-out.

N ranges from 0 to 500.

SpotStrategyStringNoYesPreemption policy for auto-scaled nodes.Valid values:
  • NoSpot (default): The nodes are pay-as-you-go instances.
  • SpotWithPriceLimit: The nodes are preemptible instances with a user-defined maximum hourly price.
  • SpotAsPriceGo: The nodes are preemptible instances for which the system automatically bids based on the current market price.

You can configure the bidding strategy for N compute nodes simultaneously.

Takes effect during queue scale-out.

Up to 500 instance types can be specified.

Return value

Fn::GetAtt

ClusterId: the cluster ID.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ClusterId": {
          "Type": "String",
          "Description": "The cluster ID."
        },
        "Queues": {
          "Type": "Json",
          "Description": "",
          "MaxLength": 8
        }
      },
      "Resources": {
        "AutoScaleConfig": {
          "Type": "ALIYUN::EHPC::AutoScaleConfig",
          "Properties": {
            "ClusterId": {
              "Ref": "ClusterId"
            },
            "Queues": {
              "Ref": "Queues"
            }
          }
        }
      },
      "Outputs": {
        "ClusterId": {
          "Description": "The cluster ID.",
          "Value": {
            "Fn::GetAtt": [
              "AutoScaleConfig",
              "ClusterId"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ClusterId:
        Type: String
        Description: The cluster ID.
      Queues:
        Type: Json
        Description: ''
        MaxLength: 8
    Resources:
      AutoScaleConfig:
        Type: ALIYUN::EHPC::AutoScaleConfig
        Properties:
          ClusterId:
            Ref: ClusterId
          Queues:
            Ref: Queues
    Outputs:
      ClusterId:
        Description: The cluster ID.
        Value:
          Fn::GetAtt:
            - AutoScaleConfig
            - ClusterId