ALIYUN::EHPC::ClusterV2

ALIYUN::EHPC::ClusterV2类型用于创建新版弹性高性能计算集群。

语法

{
  "Type": "ALIYUN::EHPC::ClusterV2",
  "Properties": {
    "ClusterName": String,
    "SharedStorages": List,
    "VSwitchId": String,
    "VpcId": String,
    "AdditionalPackages": List,
    "Addons": List,
    "ClusterCredentials": Map,
    "ClusterMode": String,
    "ClusterCategory": String,
    "ClientVersion": String,
    "ClusterCustomConfiguration": Map,
    "ClusterDescription": String,
    "DeletionProtection": Boolean,
    "IsEnterpriseSecurityGroup": Boolean,
    "MaxCount": Integer,
    "Manager": Map,
    "MaxCoreCount": Integer,
    "Queues": List,
    "ResourceGroupId": String,
    "SecurityGroupId": String,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterName

String

集群名称。

长度为 2~128 个字符,支持英文、中文和数字。可以包含短划线(-)和下划线(_)。

SharedStorages

List

集群共享存储配置。

更多信息,请参考SharedStorages属性

VSwitchId

String

集群使用的虚拟交换机 ID。

VpcId

String

集群使用的专有网络 VPC ID。

AdditionalPackages

List

集群待安装的软件列表。

最多支持配置10组软件。更多信息,请参考AdditionalPackages属性

Addons

List

集群自定义服务组件配置。

仅支持一个组件。更多信息,请参考Addons属性

ClusterCredentials

Map

集群的安全凭证。

更多信息,请参考ClusterCredentials属性

ClusterMode

String

集群部署类型。

取值范围:

  • Integrated:公共云集群。

  • Hybrid:混合云集群。

  • Custom:自定义集群。

ClusterCategory

String

集群系列。

取值范围:

  • Standard:标准版。

  • Serverless:托管版。

ClientVersion

String

集群客户端版本。

默认使用最新版本。

ClusterCustomConfiguration

Map

集群后处理脚本。

更多信息,请参考ClusterCustomConfiguration属性

ClusterDescription

String

集群描述。

长度为 2~128 个字符,支持英文、中文和数字。可以包含短划线(-)和下划线(_)。

DeletionProtection

Boolean

集群删除保护属性。

取值:

  • true:开启集群删除保护。

  • false:关闭集群删除保护。

IsEnterpriseSecurityGroup

Boolean

是否使用企业级安全组。

取值:

  • true:自动创建并使用企业级安全组。

  • false:不使用企业级安全组,自动创建并使用普通安全组。

MaxCount

Integer

集群可管理的计算节点数量。

取值范围:0~5,000。

Manager

Map

集群管理节点配置。

更多信息,请参考Manager属性

MaxCoreCount

Integer

集群可管理的计算节点总核数。

取值范围:0~100000。

Queues

List

集群队列的配置。

队列数量支持 0~8 个。更多信息,请参考Queues属性

ResourceGroupId

String

资源组 ID。

SecurityGroupId

String

指定新创建集群所属的安全组 ID。

Tags

List

集群的标签列表。

更多信息,请参考Tags属性

ClusterCredentials语法

"ClusterCredentials": {
  "KeyPairName": String,
  "Password": String
}

ClusterCredentials属性

属性名称

类型

必须

允许更新

描述

约束

KeyPairName

String

密钥对名称。

长度为 2~128 个英文或中文字符。必须以大小写字母或中文开头,不能以http://https://开头。可以包含数字、半角冒号(:)、下划线(_)或者短划线(-)。

Password

String

登录节点的 root 密码。

长度为 8 至 20 个字符,必须同时包含大小写英文字母、数字和特殊符号中的三类字符。特殊符号可以是: () ~ ! @ # $ % ^ & * - = + { } [ ] : ; ‘ < > , . ? / 

AdditionalPackages语法

"AdditionalPackages": [
  {
    "Version": String,
    "Name": String
  }
]

AdditionalPackages属性

属性名称

类型

必须

允许更新

描述

约束

Version

String

待安装软件版本。

Name

String

待安装软件名称。

Addons语法

"Addons": [
  {
    "Version": String,
    "ServicesSpec": String,
    "ResourcesSpec": String,
    "Name": String
  }
]

Addons属性

属性名称

类型

必须

允许更新

描述

约束

Version

String

自定义服务组件的版本。

ServicesSpec

String

自定义服务组件的服务配置。

示例:

"[{\\"ServiceName\\": \\"SSH\\", \\"ServiceAccessType\\": null, \\"ServiceAccessUrl\\": null, \\"NetworkACL\\": [{\\"IpProtocol\\": \\"TCP\\", \\"Port\\": 22, \\"SourceCidrIp\\": \\"0.0.0.0/0\\"}]}, {\\"ServiceName\\": \\"VNC\\", \\"ServiceAccessType\\": null, \\"ServiceAccessUrl\\": null, \\"NetworkACL\\": [{\\"IpProtocol\\": \\"TCP\\", \\"Port\\": 12016, \\"SourceCidrIp\\": \\"0.0.0.0/0\\"}]}, {\\"ServiceName\\": \\"CLIENT\\", \\"ServiceAccessType\\": \\"URL\\", \\"ServiceAccessUrl\\": \\"\\", \\"NetworkACL\\": [{\\"IpProtocol\\": \\"TCP\\", \\"Port\\": 12011, \\"SourceCidrIp\\": \\"0.0.0.0/0\\"}]}]"

ResourcesSpec

String

自定义服务组件的资源配置。

示例:

"{\\"EipResource\\": {\\"AutoCreate\\": true}, \\"EcsResources\\": [{\\"InstanceType\\": \\"ecs.c7.xlarge\\", \\"ImageId\\": \\"centos_7_6_x64_20G_alibase_20211130.vhd\\", \\"SystemDisk\\": {\\"Category\\": \\"cloud_essd\\", \\"Size\\": 40, \\"Level\\": \\"PL0\\"}, \\"EnableHT\\": true, \\"InstanceChargeType\\": \\"PostPaid\\", \\"SpotStrategy\\": \\"NoSpot\\"}]}"

Name

String

自定义服务组件的名称。

Manager语法

"Manager": {
  "ManagerNode": Map,
  "Scheduler": Map,
  "DNS": Map,
  "DirectoryService": Map
}

Manager属性

属性名称

类型

必须

允许更新

描述

约束

ManagerNode

Map

管理节点的硬件配置信息。

更多信息,请参考ManagerNode属性

Scheduler

Map

调度器服务配置信息。

更多信息,请参考Scheduler属性

DNS

Map

域名解析服务配置信息。

更多信息,请参考DNS属性

DirectoryService

Map

域账号服务配置信息。

更多信息,请参考DirectoryService属性

ManagerNode语法

"ManagerNode": {
  "SystemDisk": Map,
  "AutoRenewPeriod": Integer,
  "EnableHT": Boolean,
  "DataDisks": List,
  "InstanceChargeType": String,
  "AutoRenew": Boolean,
  "ImageId": String,
  "Period": Integer,
  "InstanceType": String,
  "PeriodUnit": String
}

ManagerNode属性

属性名称

类型

必须

允许更新

描述

约束

SystemDisk

Map

节点系统盘配置详情。

更多信息,请参考SystemDisk属性

AutoRenewPeriod

Integer

单次自动续费的续费时长。

取值范围:

  • PeriodUnit=Week 时:1、2、3。

  • PeriodUnit=Month 时:1、2、3、6、12、24、36、48、60。

默认值:1。

EnableHT

Boolean

节点是否开启超线程。

可选范围:

  • true:开启

  • false:关闭

DataDisks

List

数据盘信息集合列表。

更多信息,请参考DataDisks属性。最多支持配置16组数据盘信息。

InstanceChargeType

String

实例的付费方式。

取值范围:

  • PrePaid:包年包月。

  • PostPaid:按量付费。

默认值:PostPaid。

AutoRenew

Boolean

是否要自动续费。

当参数 InstanceChargeType 取值 PrePaid 时才生效。取值范围:

  • true:自动续费。

  • false:不自动续费。

ImageId

String

镜像 ID。

Period

Integer

购买资源的时长。

单位由 PeriodUnit 指定。当参数 InstanceChargeType 取值为 PrePaid 时才生效且为必选值。一旦指定了 DedicatedHostId,则取值范围不能超过专有宿主机的订阅时长。取值范围:

  • PeriodUnit=Week 时,Period 取值:1、2、3、4。

  • PeriodUnit=Month 时,Period 取值:1、2、3、4、5、6、7、8、9、12、24、36、48、60。

InstanceType

String

ECS 实例的资源规格。

PeriodUnit

String

包年包月计费方式的时长单位。

取值范围:

  • Week。

  • Month(默认)。

SystemDisk语法

"SystemDisk": {
  "Category": String,
  "Size": Integer,
  "Level": String
}

SystemDisk属性

属性名称

类型

必须

允许更新

描述

约束

Category

String

系统盘的云盘种类。

取值范围:

  • cloud_efficiency:高效云盘。

  • cloud_ssd:SSD 云盘。

  • cloud_essd:ESSD 云盘。

  • cloud:普通云盘。

Size

Integer

系统盘大小。

内存单位为 GiB。取值范围:

  • cloud_efficiency:40~32768。

  • cloud_ssd:40~32768。

  • cloud_essd:具体取值范围与 DataDisk.N.PerformanceLevel 的取值有关。

    • PL0:40~65,536。

    • PL1:40~65,536。

    • PL2:461~65,536。

    • PL3:1261~65,536。

  • cloud:40~500。

Level

String

设置云盘的性能等级。

取值范围:

  • PL0:单盘最高随机读写 IOPS 1 万。

  • PL1(默认):单盘最高随机读写 IOPS 5 万。

  • PL2:单盘最高随机读写 IOPS 10 万。

  • PL3:单盘最高随机读写 IOPS 100 万。 有关如何选择 ESSD 性能等级,请参见ESSD云盘

DataDisks语法

"DataDisks": [
  {
    "Category": String,
    "Size": Integer,
    "DeleteWithInstance": Boolean,
    "Level": String,
    "MountDir": String
  }
]

DataDisks属性

属性名称

类型

必须

允许更新

描述

约束

Category

String

数据盘 N 的云盘种类。

取值范围:

  • cloud_efficiency:高效云盘。

  • cloud_ssd:SSD 云盘。

  • cloud_essd:ESSD 云盘。

Size

Integer

数据盘的容量大小

内存单位为 GiB。取值范围:

  • cloud_efficiency:40~32768。

  • cloud_ssd:40~32768。

  • cloud_essd:具体取值范围与 DataDisk.N.PerformanceLevel 的取值有关。

    • PL0:40~65,536。

    • PL1:40~65,536。

    • PL2:461~65,536。

    • PL3:1261~65,536。

DeleteWithInstance

Boolean

表示数据盘是否随实例释放。

取值范围:

  • true:数据盘随实例释放。

  • false:数据盘不随实例释放。

默认值为 true。

Level

String

设置云盘的性能等级。

取值范围:

  • PL0:单盘最高随机读写 IOPS 1 万。

  • PL1(默认):单盘最高随机读写 IOPS 5 万。

  • PL2:单盘最高随机读写 IOPS 10 万。

  • PL3:单盘最高随机读写 IOPS 100 万。 有关如何选择 ESSD 性能等级,请参见ESSD云盘

MountDir

String

数据磁盘的挂载目录。

该值必须以斜线 (/) 开头。

Scheduler语法

"Scheduler": {
  "Type": String,
  "Version": String
}

Scheduler属性

属性名称

类型

必须

允许更新

描述

约束

Type

String

调度器类型。

取值范围:

  • SLURM

  • PBS

  • OPENGRIDSCHEDULER

  • LSF_PLUGIN

  • PBS_PLUGIN

Version

String

调度器版本。

DNS语法

"DNS": {
  "Type": String,
  "Version": String
}

DNS属性

属性名称

类型

必须

允许更新

描述

约束

Type

String

域名解析类型。

取值

  • NIS

Version

String

域名解析版本。

DirectoryService语法

"DirectoryService": {
  "Type": String,
  "Version": String
}

DirectoryService属性

属性名称

类型

必须

允许更新

描述

约束

Type

String

域账号类型。

取值

  • NIS

Version

String

域账号版本。

SharedStorages语法

"SharedStorages": [
  {
    "MountDirectory": String,
    "MountTargetDomain": String,
    "ProtocolType": String,
    "FileSystemId": String,
    "MountOptions": String,
    "NASDirectory": String
  }
]

SharedStorages属性

属性名称

类型

必须

允许更新

描述

约束

FileSystemId

String

挂载的文件系统 ID。

MountTargetDomain

String

挂载的文件系统挂载点地址。

MountDirectory

String

挂载文件系统的本地挂载目录。

MountOptions

String

挂载的文件系统的存储挂载选项。

NASDirectory

String

挂载的文件系统需要挂载的远程目录。

ProtocolType

String

挂载的文件系统协议类型。

取值范围:

  • NFS

  • SMB

ClusterCustomConfiguration语法

"ClusterCustomConfiguration": {
  "Script": String,
  "Args": String
}

ClusterCustomConfiguration属性

属性名称

类型

必须

允许更新

描述

约束

Args

String

安装后脚本的执行参数。

Script

String

安装后处理脚本的下载地址。

Queues语法

"Queues": [
  {
    "VSwitchIds": List,
    "ComputeNodes": List,
    "InterConnect": String,
    "MaxCount": Integer,
    "KeepAliveNodes": List,
    "HostnamePrefix": String,
    "AllocationStrategy": String,
    "EnableScaleIn": Boolean,
    "MaxCountPerCycle": Integer,
    "HostnameSuffix": String,
    "RamRole": String,
    "EnableScaleOut": Boolean,
    "QueueName": String,
    "InitialCount": Integer,
    "MinCount": Integer
  }
]

Queues属性

属性名称

类型

必须

允许更新

描述

约束

QueueName

String

队列名称。

长度为 1~15 个字符,支持 Unicode 中 letter 分类下的字符(其中包括英文和数字等),可以包含半角句号(.)。

AllocationStrategy

String

队列自动扩容的策略。

ComputeNodes

List

队列中计算节点的硬件配置列表。

最多支持配置10组硬件配置。更多信息,请参考ComputeNodes属性

EnableScaleIn

Boolean

队列是否开启自动缩容。

取值范围:

  • true:开启

  • false:关闭

EnableScaleOut

Boolean

队列是否开启自动扩容。

取值范围:

  • true:开启

  • false:关闭

HostnamePrefix

String

队列中计算节点的主机名前缀。

HostnameSuffix

String

队列中计算节点的主机名后缀。

InterConnect

String

队列中计算节点间的网络类型。

取值:

  • vpc

  • eRDMA

InitialCount

Integer

队列保有的初始计算节点数量。

取值范围:0~5000。

KeepAliveNodes

List

队列中开启删除保护的节点列表。

取值范围:0~5000。

MaxCount

Integer

队列可保有的最大计算节点数量。

取值范围:0~5000。

MaxCountPerCycle

Integer

队列在每个扩容轮次中最大扩容的计算节点数量。

取值范围:0~5000。

MinCount

Integer

队列保有的最小计算节点数量。

取值范围:0~5000。

RamRole

String

队列中计算节点绑定的授权实例角色名称。

VSwitchIds

List

队列中计算节点可用的虚拟交换机列表。

最多支持配置5组交换机。

ComputeNodes语法

"ComputeNodes": [
  {
    "SystemDisk": Map,
    "EnableHT": Boolean,
    "DataDisks": List,
    "ImageId": String,
    "SpotPriceLimit": Number,
    "Duration": Integer,
    "InstanceType": String,
    "SpotStrategy": String
  }
]

ComputeNodes属性

属性名称

类型

必须

允许更新

描述

约束

ImageId

String

镜像 ID。

InstanceType

String

ECS 实例的资源规格。

SystemDisk

Map

节点系统盘配置详情。

更多信息,请参考SystemDisk属性

DataDisks

List

数据盘信息集合列表。

最多支持16组数据盘配置。更多信息,请参考DataDisks属性

Duration

Integer

抢占式实例的保留时长。

单位为小时。 默认值:1。取值范围:

  • 1:创建后阿里云会保证实例运行 1 小时不会被自动释放;超过 1 小时后,系统会自动比较出价与市场价格、检查资源库存,来决定实例的持有和回收。

  • 0:创建后,阿里云不保证实例运行 1 小时,系统会自动比较出价与市场价格、检查资源库存,来决定实例的持有和回收。

实例回收前 5 分钟阿里云会通过 ECS 系统事件向您发送通知。抢占式实例按秒计费,建议您结合具体任务执行耗时来选择合适的保留时长。

EnableHT

Boolean

节点是否开启超线程。

可选范围:

  • true:开启

  • false:关闭

SpotPriceLimit

Number

设置实例的每小时最高价格。

支持最大 3 位小数,参数 SpotStrategy 取值为 SpotWithPriceLimit 时生效。

SpotStrategy

String

按量付费实例的竞价策略。

当参数 InstanceChargeType 取值为 PostPaid 时生效。取值范围:

  • NoSpot:正常按量付费实例。

  • SpotWithPriceLimit:设置上限价格的抢占式实例。

  • SpotAsPriceGo:系统自动出价,跟随当前市场实际价格。

默认值:NoSpot。

Tags语法

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

ClusterId:集群ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VSwitchId:
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
      ZoneId: ${ZoneId}
    AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
    Type: String
    Description:
      en: The ID of the VSwitch used by the cluster
    Required: true
  SharedStorages:
    AssociationPropertyMetadata:
      Parameters:
        MountDirectory:
          Type: String
          Description:
            en: The local mount directory to mount the file system.
          Required: false
        MountTargetDomain:
          Type: String
          Description:
            en: The mount target domain of the file system.
          Required: true
        ProtocolType:
          Type: String
          Description:
            en: 'The protocol type of the file system. Valid values: NFS, SMB.'
          AllowedValues:
            - NFS
            - SMB
          Required: false
        FileSystemId:
          Type: String
          Description:
            en: The ID of the file system.
          Required: true
        MountOptions:
          Type: String
          Description:
            en: The mount options of the file system.
          Required: false
        NASDirectory:
          Type: String
          Description:
            en: Mounted filesystems require mounted remote directories.
          Required: false
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The list of shared storage configurations.
    Required: true
  VpcId:
    AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Type: String
    Description:
      en: The ID of the VPC used by the cluster.
    Required: true
  ClusterName:
    Type: String
    Description:
      en: Cluster name. The length is from 2 to 128 characters, and it supports English, Chinese and numbers. You can include a dash (-) and an underscore (_).
    Required: true
    MinLength: 2
    MaxLength: 128
Resources:
  ClusterV2:
    Type: ALIYUN::EHPC::ClusterV2
    Properties:
      VSwitchId:
        Ref: VSwitchId
      SharedStorages:
        Ref: SharedStorages
      VpcId:
        Ref: VpcId
      ClusterName:
        Ref: ClusterName
Outputs:
  ClusterId:
    Description: Cluster Id.
    Value:
      Fn::GetAtt:
        - ClusterV2
        - ClusterId

                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VSwitchId": {
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}",
        "ZoneId": "${ZoneId}"
      },
      "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
      "Type": "String",
      "Description": {
        "en": "The ID of the VSwitch used by the cluster"
      },
      "Required": true
    },
    "SharedStorages": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "MountDirectory": {
            "Type": "String",
            "Description": {
              "en": "The local mount directory to mount the file system."
            },
            "Required": false
          },
          "MountTargetDomain": {
            "Type": "String",
            "Description": {
              "en": "The mount target domain of the file system."
            },
            "Required": true
          },
          "ProtocolType": {
            "Type": "String",
            "Description": {
              "en": "The protocol type of the file system. Valid values: NFS, SMB."
            },
            "AllowedValues": [
              "NFS",
              "SMB"
            ],
            "Required": false
          },
          "FileSystemId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the file system."
            },
            "Required": true
          },
          "MountOptions": {
            "Type": "String",
            "Description": {
              "en": "The mount options of the file system."
            },
            "Required": false
          },
          "NASDirectory": {
            "Type": "String",
            "Description": {
              "en": "Mounted filesystems require mounted remote directories."
            },
            "Required": false
          }
        }
      },
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The list of shared storage configurations."
      },
      "Required": true
    },
    "VpcId": {
      "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
      "Type": "String",
      "Description": {
        "en": "The ID of the VPC used by the cluster."
      },
      "Required": true
    },
    "ClusterName": {
      "Type": "String",
      "Description": {
        "en": "Cluster name. The length is from 2 to 128 characters, and it supports English, Chinese and numbers. You can include a dash (-) and an underscore (_)."
      },
      "Required": true,
      "MinLength": 2,
      "MaxLength": 128
    }
  },
  "Resources": {
    "ClusterV2": {
      "Type": "ALIYUN::EHPC::ClusterV2",
      "Properties": {
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "SharedStorages": {
          "Ref": "SharedStorages"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "ClusterName": {
          "Ref": "ClusterName"
        }
      }
    }
  },
  "Outputs": {
    "ClusterId": {
      "Description": "Cluster Id.",
      "Value": {
        "Fn::GetAtt": [
          "ClusterV2",
          "ClusterId"
        ]
      }
    }
  }
}