ALIYUN::EHPC::Cluster类型用于创建一个弹性高性能计算集群。
语法
{
"Type": "ALIYUN::EHPC::Cluster",
"Properties": {
"EcsOrderComputeCount": Integer,
"OsTag": String,
"HaEnable": Boolean,
"VolumeType": String,
"VolumeId": String,
"EcsOrderManagerCount": Integer,
"EcsOrderManagerInstanceType": String,
"EcsOrderComputeInstanceType": String,
"Application": List,
"KeyPairName": String,
"PeriodUnit": String,
"Description": String,
"AutoRenewPeriod": Integer,
"JobQueue": String,
"ImageId": String,
"AutoRenew": Boolean,
"EhpcVersion": String,
"VSwitchId": String,
"Password": String,
"Name": String,
"SchedulerType": String,
"SccClusterId": String,
"EcsChargeType": String,
"ZoneId": String,
"EcsOrderLoginCount": Integer,
"DeployMode": String,
"ImageOwnerAlias": String,
"RemoteDirectory": String,
"ComputeSpotPriceLimit": String,
"ComputeSpotStrategy": String,
"SecurityGroupName": String,
"KeyPairName": String,
"VolumeProtocol": String,
"SecurityGroupId": String,
"Period": Integer,
"PostInstallScript": List,
"AccountType": String,
"VolumeMountpoint": String,
"EcsOrderLoginInstanceType": String,
"SystemDiskLevel": String,
"IsComputeEss": Boolean,
"SystemDiskSize": Integer,
"SystemDiskType": String,
"AdditionalVolumes": List,
"RemoteVisEnable": Boolean,
"InputFileUrl": String,
"WithoutElasticIp": Boolean,
"ResourceGroupId": String,
"ClientVersion": String,
"ComputeEnableHt": Boolean
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
EcsOrderComputeCount | Integer | 是 | 否 | 集群计算节点数量。 | 取值范围:1~99 |
OsTag | String | 是 | 否 | 操作系统镜像标签。 | 取值示例:CentOS_7.2_64。 |
HaEnable | Boolean | 否 | 否 | 是否开启高可用。 | 取值:
|
VolumeType | String | 否 | 否 | 共享存储类型。 | 取值:NAS,表文件系统类型。 |
KeyPairName | String | 否 | 否 | 密钥对。 | Password和KeyPairName需至少指定其中一个参数。如果二者都指定,则Password优先级更高。 |
VolumeId | String | 否 | 否 | 阿里云NAS实例ID。 | 无 |
EcsOrderManagerCount | Integer | 否 | 否 | 集群管控节点的实例数量。 | 取值:
|
EcsOrderManagerInstanceType | String | 是 | 否 | 集群管控节点的实例规格。 | 无 |
Application | List | 否 | 否 | 应用软件。 | 更多信息,请参见Application属性。 |
EcsOrderComputeInstanceType | String | 是 | 否 | 集群计算节点的实例规格。 | 无 |
PeriodUnit | String | 否 | 否 | 购买集群节点的时长单位。 | 取值:
|
Description | String | 否 | 是 | 集群的描述信息。 | 长度为2~128个字符。 |
AutoRenewPeriod | Integer | 否 | 否 | 每次自动续费的时长。 | 当AutoRenew取值为true时,该参数有效。 |
JobQueue | String | 否 | 否 | 计算节点加入的队列。 | 无 |
ImageId | String | 否 | 否 | 镜像ID。 | 当ImageOwnerAlias取值为self、others或marketplace时,必须指定该参数。
说明 如果ImageOwnerAlias取值为system, 则只根据OsTag来决定基础镜像ID。
|
AutoRenew | Boolean | 否 | 否 | 是否自动续费。 | 取值:
|
EhpcVersion | String | 否 | 否 | E-HPC产品版本。 | 默认为最新版本。 |
VSwitchId | String | 是 | 否 | 交换机ID。 | E-HPC当前仅支持VPC网络。 |
Password | String | 否 | 否 | 登录节点的root密码。 | 长度为8~30个字符,必须同时包含大写英文字母、小写英文字母、数字和特殊字符其中三项。支持的特殊字符为:( ) ` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ‘ < > , . ? / 。
Password和KeyPairName需至少指定其中一个参数。如果二者都指定,则Password优先级更高。 |
Name | String | 是 | 是 | 集群名称。 | 长度为2~64个字符,必须以英文字母或汉字开头。可包含英文字母、汉字、数字、短划线(-)和下划线(_)。 |
SchedulerType | String | 否 | 否 | 调度器类型。 | 取值:
|
SccClusterId | String | 否 | 否 | SCC实例ID。 | 如果配置该参数,则将已有的SCC实例纳管到新创建的SCC集群中。 |
EcsChargeType | String | 否 | 否 | 集群使用ECS实例的付费类型。 | 取值:
|
ZoneId | String | 否 | 否 | 可用区ID。 | 无 |
EcsOrderLoginCount | Integer | 是 | 否 | 集群登录节点数量。 | 取值范围:1~99。 |
DeployMode | String | 否 | 否 | 部署模式。 | 取值:
|
ImageOwnerAlias | String | 否 | 否 | 镜像类型。 | 取值:
|
RemoteDirectory | String | 否 | 否 | 挂载共享存储的远程目录。 | 最终挂载路径为挂载点与远程目录组合:NasMountpoint:/RemoteDirectory 。
|
ComputeSpotPriceLimit | String | 否 | 否 | 计算节点的每小时最高价格。 | 取值是浮点数,为当前的价格区间。 |
ComputeSpotStrategy | String | 否 | 否 | 计算节点的竞价策略。 | 取值:
|
SecurityGroupName | String | 否 | 否 | 安全组名称。 | 如果不使用已有安全组,则使用此名称创建新安全组,应用默认安全组策略。 |
VolumeProtocol | String | 否 | 否 | 共享存储的协议类型。 | 取值:
|
SecurityGroupId | String | 否 | 否 | 安全组ID。 | 无 |
Period | Integer | 否 | 否 | 购买集群节点的时长。 | EcsChargeType取值为PrePaid时,必须指定该参数。 |
PostInstallScript | List | 否 | 否 | 脚本的下载地址和执行参数。 | 最多指定16组下载地址和执行参数。更多信息,请参见PostInstallScript属性。 |
AccountType | String | 否 | 否 | 域账号服务类型。 | 取值:
|
VolumeMountpoint | String | 否 | 否 | NAS的VPC挂载点。 | 取值与VolumeId相关,具体如下:
|
EcsOrderLoginInstanceType | String | 是 | 否 | 集群登录节点实例规格。 | 无 |
SystemDiskLevel | String | 否 | 否 | 创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。 | 取值:
|
IsComputeEss | Boolean | 否 | 否 | 是否启用自动伸缩。 | 取值:
|
SystemDiskSize | Integer | 否 | 否 | 系统盘大小。 | 取值范围:40~500。
单位:GB。 默认值:40。 |
SystemDiskType | String | 否 | 否 | 系统盘的类型。 | 取值:
|
AdditionalVolumes | List | 否 | 否 | 挂载的共享存储。 | 更多信息,请参见AdditionalVolumes属性。 |
RemoteVisEnable | Boolean | 否 | 否 | 是否开启远程可视化。 | 取值:
|
InputFileUrl | String | 否 | 否 | 上传到OSS的作业文件的URL地址。 | 取值示例:https://ehpc-tianshui.oss-cn-beijing.aliyuncs.com/test-u****/testlist_ehpc.sh 。
|
WithoutElasticIp | Boolean | 否 | 否 | 登录节点是否使用弹性公网IP。 | 取值:
|
ResourceGroupId | String | 否 | 否 | 资源组ID。 | 无 |
ClientVersion | String | 否 | 否 | 集群客户端版本。 | 默认为最新版本。 |
ComputeEnableHt | Boolean | 否 | 否 | 计算节点是否支持超线程。 | 取值:
|
Application语法
"Application": [
{
"Tag": String
}
]
Application属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Tag | String | 是 | 否 | 应用软件的标签。 | 取值示例:OpenMPI_11.1。 |
PostInstallScript语法
"PostInstallScript": [
{
"Url": String,
"Args": String
}
]
PostInstallScript属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Url | String | 否 | 否 | 安装后脚本的下载地址。 | 无 |
Args | String | 否 | 否 | 安装后脚本的执行参数。 | 无 |
AdditionalVolumes语法
"AdditionalVolumes": [
{
"RemoteDirectory": String,
"Location": String,
"VolumeId": String,
"LocalDirectory": String,
"VolumeProtocol": String,
"JobQueue": String,
"VolumeType": String,
"VolumeMountpoint": String
}
]
AdditionalVolumes属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
RemoteDirectory | String | 否 | 否 | 挂载共享存储的远程目录。 | 无 |
Location | String | 否 | 否 | 挂载的共享存储的集群类型。 | 取值:PublicCloud。 |
VolumeId | String | 是 | 否 | 挂载的NAS实例ID。 | 无 |
LocalDirectory | String | 是 | 否 | 挂载的共享存储的本地挂载目录。 | 无 |
VolumeProtocol | String | 否 | 否 | 挂载的共享存储协议类型。 | 取值:
|
JobQueue | String | 否 | 否 | 计算节点加入的队列。 | 无 |
VolumeType | String | 否 | 否 | 存储类型。 | 取值:NAS。 |
VolumeMountpoint | String | 是 | 否 | NAS的VPC挂载点。 | 无 |
返回值
Fn::GetAtt
- EcsInfo:集群中各组件的ECS数量和规格。例如:
{"Manager": {"Count": 2, "InstanceType": "ecs.n1.large"}, "Compute": {"Count": 8, "InstanceType": "ecs.n1.large"}, "Login": {"Count": 1, "InstanceType": "ecs.n1.large"}}
。 - SecurityGroupId:安全组ID。
- ClusterId:集群ID。
- Name:集群名称。
示例
JSON格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"VpcCidrBlock": {
"Type": "String",
"AllowedValues": [
"192.168.0.0/16",
"172.16.0.0/12",
"10.0.0.0/8"
],
"Label": {
"en": "VPC CIDR Block",
"zh-cn": "专有网络网段"
},
"Default": "192.168.0.0/16"
},
"VSwitchCidrBlock": {
"Type": "String",
"Description": {
"zh-cn": "必须是所属专有网络的子网段,并且没有被其他交换机占用。",
"en": "Must be a sub-network segment of the proprietary network and is not occupied by other VSwitches."
},
"Label": {
"zh-cn": "交换机网段",
"en": "vSwitch CIDR Block"
},
"Default": "192.168.0.0/24"
},
"ZoneId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
"Label": {
"zh-cn": "可用区",
"en": "Availability Zone"
}
},
"EcsOrderComputeCount": {
"Type": "Number",
"Label": {
"en": "Compute Count",
"zh-cn": "计算节点数"
},
"Description": {
"en": "Ranges from: 1~99.",
"zh-cn": "取值范围:1~99。"
},
"MinValue": 1,
"MaxValue": 99,
"Default": 1
},
"Password": {
"NoEcho": true,
"Type": "String",
"Label": {
"en": "Login Password",
"zh-cn": "登录密码"
}
"MinLength": 8,
"MaxLength": 30
},
"EcsOrderLoginInstanceType": {
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"ZoneId": "ZoneId"
},
"Type": "String"
"Label": {
"en": "Login Instance Specifications",
"zh-cn": "登录实例规格"
}
},
"EcsOrderLoginCount": {
"Type": "Number",
"Label": {
"en": "Login Count",
"zh-cn": "登录节点数"
},
"Description": {
"en": "Ranges from: 1~99.",
"zh-cn": "取值范围:1~99。"
},
"MinValue": 1,
"MaxValue": 99,
"Default": 1
},
"EcsOrderManagerInstanceType": {
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"ZoneId": "ZoneId"
},
"Type": "String"
"Label": {
"en": "Manager Instance Specifications",
"zh-cn": "管理实例规格"
}
},
"EcsOrderComputeInstanceType": {
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"ZoneId": "ZoneId"
},
"Type": "String",
"Label": {
"en": "Compute Instance Specifications",
"zh-cn": "计算实例规格"
}
},
"BucketName": {
"Type": "String",
"Label": {
"en": "Bucket Name",
"zh-cn": "存储空间名称"
},
"Default": "test-ehpc"
},
"BucketAccessControl": {
"Type": "String",
"Label": {
"en": "Access Control",
"zh-cn": "读写权限"
},
"AllowedValues": [
"private",
"public-read",
"public-read-write"
],
"Default": "public-read"
},
"BucketStorageClass": {
"Type": "String",
"Label": {
"en": "Storage Type",
"zh-cn": "存储类型"
},
"AllowedValues": [
"Standard",
"IA",
"Archive"
],
"Default": "Standard"
}
},
"Resources": {
"Vpc": {
"Type": "ALIYUN::ECS::VPC",
"Properties": {
"CidrBlock": {
"Ref": "VpcCidrBlock"
},
"VpcName": {
"Fn::Join": [
"-",
[
"Vpc",
{
"Ref": "ALIYUN::StackId"
}
]
]
}
}
},
"VSwitch": {
"Type": "ALIYUN::ECS::VSwitch",
"Properties": {
"ZoneId": {
"Ref": "ZoneId"
},
"VpcId": {
"Ref": "Vpc"
},
"CidrBlock": {
"Ref": "VSwitchCidrBlock"
},
"VSwitchName": {
"Fn::Join": [
"-",
[
"VSwitch",
"StackId",
{
"Ref": "ALIYUN::StackId"
}
]
]
}
}
},
"AccessGroup": {
"Type": "ALIYUN::NAS::AccessGroup",
"Properties": {
"AccessGroupType": "Vpc",
"AccessGroupName": {
"Fn::Join": [
"-",
[
"AccessGroup",
{
"Ref": "ALIYUN::StackId"
}
]
]
}
}
},
"FileSystem": {
"Type": "ALIYUN::NAS::FileSystem",
"Properties": {
"ProtocolType": "NFS",
"StorageType": "Capacity"
}
},
"MountTarget": {
"Type": "ALIYUN::NAS::MountTarget",
"Properties": {
"VpcId": {
"Ref": "Vpc"
},
"FileSystemId": {
"Ref": "FileSystem"
},
"VSwitchId": {
"Ref": "VSwitch"
},
"NetworkType": "Vpc",
"AccessGroupName": {
"Ref": "AccessGroup"
}
}
},
"AccessRule": {
"Type": "ALIYUN::NAS::AccessRule",
"Properties": {
"SourceCidrIp": "0.0.0.0/0",
"AccessGroupName": {
"Ref": "AccessGroup"
}
}
},
"Cluster": {
"Type": "ALIYUN::EHPC::Cluster",
"DependsOn": [
"AccessRule",
"FileSystem",
"MountTarget",
"OssBucket"
],
"Properties": {
"EcsOrderComputeCount": {
"Ref": "EcsOrderComputeCount"
},
"OsTag": "CentOS_7.2_64",
"Name": {
"Fn::Join": [
"-",
[
"Cluster",
{
"Ref": "ALIYUN::StackId"
}
]
]
},
"EhpcVersion": "1.0.0",
"VolumeId": {
"Ref": "FileSystem"
},
"EcsOrderLoginCount": {
"Ref": "EcsOrderLoginCount"
},
"VSwitchId": {
"Ref": "VSwitch"
},
"VolumeMountpoint": {
"Ref": "MountTarget"
},
"EcsOrderLoginInstanceType": {
"Ref": "EcsOrderLoginInstanceType"
},
"EcsOrderManagerInstanceType": {
"Ref": "EcsOrderManagerInstanceType"
},
"EcsOrderComputeInstanceType": {
"Ref": "EcsOrderComputeInstanceType"
},
"Password": {
"Ref": "Password"
},
"Application": [
{
"Tag": "VMD_1.9.3"
},
{
"Tag": "LAMMPS-OPENMPI-31Mar17"
}
]
}
},
"OssBucket": {
"Type": "ALIYUN::OSS::Bucket",
"Properties": {
"BucketName": {
"Ref": "BucketName"
},
"AccessControl": {
"Ref": "BucketAccessControl"
},
"StorageClass": {
"Ref": "BucketStorageClass"
},
"Tags": {
"Value": "021",
"Key": "best_practice"
}
}
}
},
"Outputs": {
"MountTargetDomain": {
"Description": {
"en": "Mount point domain name",
"zh-cn": "挂载点域名"
},
"Value": {
"Fn::GetAtt": [
"MountTarget",
"MountTargetDomain"
]
}
},
"FileSystemId": {
"Description": {
"en": "ID of the file system created",
"zh-cn": "创建的文件系统的ID"
},
"Value": {
"Fn::GetAtt": [
"FileSystem",
"FileSystemId"
]
}
}
},
"Description": {
"en": "EHPC Industrial Simulation",
"zh-cn": "EHPC工业仿真最佳实践"
},
"Metadata": {
"ALIYUN::ROS::Interface": {
"ParameterGroups": [
{
"Parameters": [
"ZoneId",
"VpcCidrBlock",
"VSwitchCidrBlock"
],
"Label": {
"default": {
"en": "VPC",
"zh-cn": "专有网络"
}
}
},
{
"Parameters": [
"EcsOrderComputeCount",
"EcsOrderComputeInstanceType",
"EcsOrderLoginCount",
"EcsOrderLoginInstanceType",
"EcsOrderManagerInstanceType",
"Password"
],
"Label": {
"default": {
"en": "EHPC",
"zh-cn": "弹性高性能计算"
}
}
},
{
"Parameters": [
"BucketName",
"BucketAccessControl",
"BucketStorageClass"
],
"Label": {
"default": {
"en": "OSS",
"zh-cn": "对象存储"
}
}
}
],
"TemplateTags": [
"acs:solution:高性能计算:EHPC工业仿真"
]
}
}
}