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 | 否 | 否 | 集群部署类型。 | 取值范围:
|
ClusterCategory | String | 否 | 否 | 集群系列。 | 取值范围:
|
ClientVersion | String | 否 | 是 | 集群客户端版本。 | 默认使用最新版本。 |
ClusterCustomConfiguration | Map | 否 | 是 | 集群后处理脚本。 | 更多信息,请参考ClusterCustomConfiguration属性。 |
ClusterDescription | String | 否 | 是 | 集群描述。 | 长度为 2~128 个字符,支持英文、中文和数字。可以包含短划线(-)和下划线(_)。 |
DeletionProtection | Boolean | 否 | 是 | 集群删除保护属性。 | 取值:
|
IsEnterpriseSecurityGroup | Boolean | 否 | 否 | 是否使用企业级安全组。 | 取值:
|
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 个英文或中文字符。必须以大小写字母或中文开头,不能以 |
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 | 否 | 否 | 自定义服务组件的服务配置。 | 示例:
|
ResourcesSpec | String | 否 | 否 | 自定义服务组件的资源配置。 | 示例:
|
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 | 否 | 否 | 单次自动续费的续费时长。 | 取值范围:
默认值:1。 |
EnableHT | Boolean | 否 | 否 | 节点是否开启超线程。 | 可选范围:
|
DataDisks | List | 否 | 否 | 数据盘信息集合列表。 | 更多信息,请参考DataDisks属性。最多支持配置16组数据盘信息。 |
InstanceChargeType | String | 否 | 否 | 实例的付费方式。 | 取值范围:
默认值:PostPaid。 |
AutoRenew | Boolean | 否 | 否 | 是否要自动续费。 | 当参数 InstanceChargeType 取值 PrePaid 时才生效。取值范围:
|
ImageId | String | 是 | 否 | 镜像 ID。 | 无 |
Period | Integer | 否 | 否 | 购买资源的时长。 | 单位由 PeriodUnit 指定。当参数 InstanceChargeType 取值为 PrePaid 时才生效且为必选值。一旦指定了 DedicatedHostId,则取值范围不能超过专有宿主机的订阅时长。取值范围:
|
InstanceType | String | 是 | 否 | ECS 实例的资源规格。 | 无 |
PeriodUnit | String | 否 | 否 | 包年包月计费方式的时长单位。 | 取值范围:
|
SystemDisk语法
"SystemDisk": {
"Category": String,
"Size": Integer,
"Level": String
}
SystemDisk属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Category | String | 是 | 否 | 系统盘的云盘种类。 | 取值范围:
|
Size | Integer | 是 | 否 | 系统盘大小。 | 内存单位为 GiB。取值范围:
|
Level | String | 否 | 否 | 设置云盘的性能等级。 | 取值范围:
|
DataDisks语法
"DataDisks": [
{
"Category": String,
"Size": Integer,
"DeleteWithInstance": Boolean,
"Level": String,
"MountDir": String
}
]
DataDisks属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Category | String | 是 | 否 | 数据盘 N 的云盘种类。 | 取值范围:
|
Size | Integer | 是 | 否 | 数据盘的容量大小 | 内存单位为 GiB。取值范围:
|
DeleteWithInstance | Boolean | 否 | 否 | 表示数据盘是否随实例释放。 | 取值范围:
默认值为 true。 |
Level | String | 否 | 否 | 设置云盘的性能等级。 | 取值范围:
|
MountDir | String | 否 | 否 | 数据磁盘的挂载目录。 | 该值必须以斜线 (/) 开头。 |
Scheduler语法
"Scheduler": {
"Type": String,
"Version": String
}
Scheduler属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Type | String | 否 | 否 | 调度器类型。 | 取值范围:
|
Version | String | 否 | 否 | 调度器版本。 | 无 |
DNS语法
"DNS": {
"Type": String,
"Version": String
}
DNS属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Type | String | 否 | 否 | 域名解析类型。 | 取值:
|
Version | String | 否 | 否 | 域名解析版本。 | 无 |
DirectoryService语法
"DirectoryService": {
"Type": String,
"Version": String
}
DirectoryService属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Type | String | 否 | 否 | 域账号类型。 | 取值:
|
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 | 否 | 否 | 挂载的文件系统协议类型。 | 取值范围:
|
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 | 否 | 否 | 队列是否开启自动缩容。 | 取值范围:
|
EnableScaleOut | Boolean | 否 | 否 | 队列是否开启自动扩容。 | 取值范围:
|
HostnamePrefix | String | 否 | 否 | 队列中计算节点的主机名前缀。 | 无 |
HostnameSuffix | String | 否 | 否 | 队列中计算节点的主机名后缀。 | 无 |
InterConnect | String | 否 | 否 | 队列中计算节点间的网络类型。 | 取值:
|
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。取值范围:
实例回收前 5 分钟阿里云会通过 ECS 系统事件向您发送通知。抢占式实例按秒计费,建议您结合具体任务执行耗时来选择合适的保留时长。 |
EnableHT | Boolean | 否 | 否 | 节点是否开启超线程。 | 可选范围:
|
SpotPriceLimit | Number | 否 | 否 | 设置实例的每小时最高价格。 | 支持最大 3 位小数,参数 SpotStrategy 取值为 SpotWithPriceLimit 时生效。 |
SpotStrategy | String | 否 | 否 | 按量付费实例的竞价策略。 | 当参数 InstanceChargeType 取值为 PostPaid 时生效。取值范围:
默认值: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"
]
}
}
}
}