调用CreateCluster创建E-HPC集群。

接口说明

创建集群会涉及相关资源计费,建议您提前了解E-HPC的计费方式。更多信息,请参见计费方式

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateCluster

系统规定参数。取值:CreateCluster

ZoneId String cn-hangzhou-b

可用区ID。

您可以调用ListRegionsDescribeZones接口获取可以使用E-HPC的可用区ID。

Name String test

集群名称,长度为2~64个字符。

Description String TestDescription

集群描述信息。长度为2~256个英文或中文字符,不能以http://和https://开头。

EhpcVersion String 1.0.0

E-HPC产品版本,默认为最新版本。

ClientVersion String 1.0.64

集群客户端版本,默认为最新版本。

您可以调用ListCurrentClientVersion查询当前最新客户端版本号。

OsTag String CentOS_7.2_64

操作系统镜像标签。

AccountType String nis

域账号服务类型。取值范围:

  • nis
  • ldap

默认值:nis。

Domain String ldap

本地集群域名。

仅当AccoutType取值为Idap时,支持配置该参数。

SchedulerType String pbs

调度器类型。取值范围:

  • pbs
  • slurm
  • opengridscheduler
  • deadline

默认值:pbs。

SecurityGroupId String sg-bp13n61xsydodfyg****

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

您可以调用DescribeSecurityGroups查询当前地域可以使用的安全组。

SecurityGroupName String ehpc-SecurityGroup

如果不使用已有安全组,则使用此名称创建新安全组,应用默认安全组策略。

VpcId String vpc-b3f3edefefeep0760yju****

集群所属的VPC ID。

您可以调用DescribeVpcs查询已创建的VPC信息。

VSwitchId String vsw-bp1lfcjbfb099rrjn****

VPC中交换机ID。E-HPC当前仅支持VPC网络。

您可以调用DescribeVSwitches查询已创建的交换机的相关信息。

VolumeType String nas

共享存储类型,目前仅支持配置为nas,表示NAS文件系统。

VolumeId String 008b64****

阿里云NAS实例ID。如果该参数为空,创建集群的流程会默认创建一个性能型的NAS实例。

您可以调用ListFileSystemWithMountTargets查询可用的NAS的VPC挂载点。

VolumeProtocol String NFS

共享存储的协议类型。取值范围:

  • NFS
  • SMB

默认值:NFS。

VolumeMountpoint String 008b648bcb-s****.cn-hangzhou.nas.aliyuncs.com

NAS的VPC挂载点。VolumeMountpoint有以下限制:

  • 如果VolumeId参数为空,VolumeMountpoint可以为空,创建集群的流程会默认创建一个VPC挂载点。
  • 如果VolumeId参数不为空,VolumeMountpoint为必填,您可以调用ListFileSystemWithMountTargets查询可用的NAS的VPC挂载点。
VolumeMountOption String -t nfs -o vers=4

采用mount命令手动挂载NFS文件系统时的挂载参数。

具体请参见手动挂载NFS文件系统

RemoteDirectory String NasMountpoint:/RemoteDirectory

挂载共享存储的远程目录。

DeployMode String Simple

集群部署模式。取值范围:

  • Standard:账号节点、调度节点、登录节点、计算节点分离部署。
  • Simple:账号节点和调度节点混合部署在一个节点上,登录节点和计算节点分离部署。
  • Tiny:账号节点、调度节点、登录节点混合部署在一个节点上,计算节点分离部署。

默认值:Standard。

HaEnable Boolean true

是否开启高可用。取值范围:

  • true:开启。
  • false:不开启。

默认值:false。

说明 若开启高可用则集群中的每种管控角色将会使用主备2个节点。
EcsChargeType String PostPaid

集群中所有节点的付费类型,取值范围:

  • PostPaid:按量付费。
  • PrePaid:包年包月。

若选择包年包月类型,默认开启自动续费。

Password String 123****

登录节点的root密码。长度为8至30个字符,必须同时包含大小写英文字母、数字和特殊符号中的三类字符。特殊符号可以是:

( ) ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ‘ < > , . ? /

Password和KeyPairName二者必选其一,如果二者都指定,则Password优先级高。

说明 建议使用HTTPS协议调用API避免密码泄露。
KeyPairName String test

密钥对名称。

说明 如果您要使用ECS密钥对功能,具体操作请参见创建密钥对
ImageOwnerAlias String self

镜像类型。取值范围:

  • system:公共镜像
  • self:自定义镜像
  • others:共享镜像

默认值:system。

ImageId String centos_7_02_64_20G_alibase_20170818****

镜像ID。

您可以调用ListImagesListCustomImages查询E-HPC可以使用的镜像ID。

EcsOrder.Manager.Count Integer 1

集群管控节点数量。取值范围:1~2。

EcsOrder.Manager.InstanceType String ecs.n1.tiny

集群管控节点规格。

您可以调用ListPreferredEcsTypes接口获取推荐的节点规格信息。

EcsOrder.Compute.Count Integer 1

集群计算节点数量。取值范围:0~99。

EcsOrder.Compute.InstanceType String ecs.n1.tiny

集群计算节点规格。

您可以调用ListPreferredEcsTypes接口获取推荐的节点规格信息。

EcsOrder.Login.Count Integer 1

集群登录节点数量,仅支持配置1。

EcsOrder.Login.InstanceType String ecs.n1.tiny

集群登录节点规格。

您可以调用ListPreferredEcsTypes接口获取推荐的节点规格信息。

SccClusterId String 00b648b****

SCC实例ID。

如果配置该参数,则将已有的SCC实例纳管到新创建的SCC集群中。

ComputeSpotStrategy String NoSpot

计算节点竞价策略。取值范围:

  • NoSpot:正常按量付费节点。
  • SpotWithPriceLimit:设置上限价格的抢占式节点。
  • SpotAsPriceGo:系统自动出价,跟随当前市场实际价格的抢占式节点。

默认值:NoSpot。

ComputeSpotPriceLimit String 0.034

计算节点每小时最高价格。最大支持3位小数,参数ComputeSpotStrategy取值为SpotWithPriceLimit时生效。

ComputeEnableHt Boolean true

计算节点是否支持超线程。取值范围:

  • true:支持。
  • false:不支持。

默认值:true。

Period Integer 1

购买集群节点的时长。单位由PeriodUnit指定,取值范围:

  • 当参数PriceUnit取值为Year时:1~3。
  • 当参数PriceUnit取值为Month时:1~9。
  • 当参数PriceUnit取值为Hour时:1。
  • 当参数PriceUnit取值为Week时:1~4。

默认值:1。

PeriodUnit String Year

购买集群节点的时长单位。取值范围:

  • Year
  • Month
  • Hour
  • Week

默认值:Month。

AutoRenew String false

是否自动续费。取值范围:

  • true:自动续费。
  • false:不自动续费。

默认值:false。

AutoRenewPeriod Integer 1

每次自动续费的时长,当参数AutoRenew取值true时生效。

InputFileUrl String https://ehpc-tianshui.oss-cn-beijing.aliyuncs.com/test-u****/testlist_ehpc.sh

上传到OSS的作业文件的URL地址。

JobQueue String workq

计算节点加入的队列名称。

SystemDiskType String cloud_ssd

系统盘的云盘种类。取值范围:

  • cloud_efficiency:高效云盘。
  • cloud_ssd:SSD云盘。
  • cloud_essd:ESSD云盘。
  • cloud:普通云盘,已售罄。

默认值:cloud_ssd。

SystemDiskSize Integer 40

系统盘大小。单位:GB。

取值范围:40~500。

默认值:40。

RemoteVisEnable String false

是否开启远程可视化。取值范围:

  • true:开启。
  • false:不开启。

默认值:false。

ResourceGroupId String rg-acfmxazb4ph****

资源组ID。

您可以调用ListResourceGroups查询资源组ID。

ClientToken String 123e4567-e89b-12d3-a456-426655440000

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符,且不能超过64个字符。更多信息,请参见如何保证幂等性

WithoutElasticIp Boolean true

登录节点是否使用弹性公网IP。默认值:false。

SystemDiskLevel String PL0

创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。取值范围:

  • PL0:单盘最高随机读写IOPS 1万。
  • PL1:单盘最高随机读写IOPS 5万。
  • PL2:单盘最高随机读写IOPS 10万。
  • PL3:单盘最高随机读写IOPS 100万。

默认值:PL1。

关于如何选择ESSD性能等级,请参见ESSD云盘

IsComputeEss Boolean false

是否启用自动伸缩。取值范围:

  • true:启用。
  • false:未启用。

默认值:false。

ClusterVersion String 1.0

集群版本号。

默认值:1.0。

Application.N.Tag String OpenMPI_11.1

应用软件的标签。

N的取值范围:0~100

您可以调用ListSoftwares查询应用软件标签。

AdditionalVolumes.N.JobQueue String high

挂载共享存储的节点作业所处队列。

N的取值范围:1~10。

AdditionalVolumes.N.VolumeId String extreme-00b88****

挂载的NAS实例ID。

N的取值范围:1~10。

AdditionalVolumes.N.Roles.N.Name String ["Compute"]

共享存储挂载到新NAS上的节点类型。

AdditionalVolumes.N.Roles中N的取值范围:1~10。

Roles.N.Name中N的取值范围:0~8。

AdditionalVolumes.N.VolumeMountpoint String 0088****-sihc.cn-hangzhou.extreme.nas.aliyuncs.com

挂载的NAS的VPC挂载点。

N的取值范围:1~10。

AdditionalVolumes.N.VolumeMountOption String -t nfs -o vers=4.0

NAS的挂载选项。

N的取值范围:1~10。

AdditionalVolumes.N.RemoteDirectory String /test

挂载的共享存储的远程目录。

N的取值范围:1~10。

AdditionalVolumes.N.VolumeType String nas

挂载的共享存储类型。目前仅支持NAS。

N的取值范围:1~10

AdditionalVolumes.N.LocalDirectory String /ff

挂载的共享存储的本地挂载目录。

N的取值范围:1~10。

AdditionalVolumes.N.VolumeProtocol String NFS

挂载的共享存储协议类型。取值范围:

  • NFS
  • SMB

N的取值范围:1~10。

默认值:NFS。

AdditionalVolumes.N.Location String PublicCloud

挂载的共享存储的集群类型,只能配置PublicCloud。

N的取值范围:1~10。

PostInstallScript.N.Args String bashfile.sh

安装后脚本的执行参数。

N的取值范围:0~16。

PostInstallScript.N.Url String /opt/job.sh

安装后脚本的下载地址。

N的取值范围:0~16。

Plugin String {"pluginMod": "oss","pluginLocalPath": "/opt/plugin","pluginOssPath": "https://bucket.oss-cn-hangzhou.aliyuncs.com/plugin/plugin.tgz"}

插件模式配置,仅当SchedulerType为custom生效。

格式为JSON字符串,包含pluginMod、pluginLocalPath、pluginOssPath三个参数,具体参数说明如下:

  • pluginMod:插件模式,支持以下两种模式:
    • oss模式:将从OSS上下载插件解压到本地pluginLocalPath中。
    • image模式:默认插件已经放置到pluginLocalPath。
  • pluginLocalPath:插件存放的本地路径,建议在oss模式下选择共享存储目录,image模式下选择非共享存储目录。
  • pluginOssPath:插件放置在OSS上的远程路径,仅当pluginMod等于oss生效。
WithoutAgent Boolean false

是否不安装Agent客户端。

  • true:不安装。
  • false:安装。

默认值:false。

RamRoleName String testRamRoleName

实例RAM角色名称。

您可以使用RAM API ListRoles查询您已创建的实例RAM角色。

NetworkInterfaceTrafficMode String Standard

弹性网卡的通讯模式。取值范围:

  • Standard:使用TCP通讯模式。
  • HighPerformance:开启ERI(Elastic RDMA Interface)接口,使用RDMA通讯模式。
RamNodeTypes.N String manager

授权实例角色的节点名称。

N的取值范围:0~4。

  • 当DeployMode取值为Standard时,取值范围:scheduler、account、login、compute,支持多选,多个取值间用半角逗号(,)隔开。
  • 当DeployMode取值为Simple时,取值范围:manager、login、compute,支持多选,多个取值间用半角逗号(,)隔开。
  • 当DeployMode取值为Tiny时,取值范围:manager、compute。
Tag.N.Key String TestKey

标签键。

Tag.N.Value String TestValue

标签值。

返回数据

名称 类型 示例值 描述
RequestId String F6757FA4-8FED-4602-B7F5-3550C084****

请求ID。

TaskId String F6757FA4-8FED-4602-B7F5-3550C084****

任务ID。

说明 由于CreateCluster是异步操作,请求成功就会立即返回结果,不会等待节点创建成功。您可以调用ListTasks查询任务运行结果。
ClusterId String ehpc-hz-FYUr32****

集群ID。

示例

请求示例

http(s)://ehpc.cn-hangzhou.aliyuncs.com/?Action=CreateCluster
&EcsOrder.Compute.Count=1
&EcsOrder.Compute.InstanceType=ecs.n1.tiny
&EcsOrder.Login.Count=1
&EcsOrder.Login.InstanceType=ecs.n1.tiny
&EcsOrder.Manager.InstanceType=ecs.n1.tiny
&Name=test
&OsTag=CentOS_7.2_64
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateClusterResponse>
    <TaskId>F6757FA4-8FED-4602-B7F5-3550C084****</TaskId>
    <RequestId>F6757FA4-8FED-4602-B7F5-3550C084****</RequestId>
    <ClusterId>ehpc-hz-FYUr32****</ClusterId>
</CreateClusterResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TaskId" : "F6757FA4-8FED-4602-B7F5-3550C084****",
  "RequestId" : "F6757FA4-8FED-4602-B7F5-3550C084****",
  "ClusterId" : "ehpc-hz-FYUr32****"
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidParams The specified parameter %s is invalid. 无效的参数:%s
400 NotEnabled You have not enabled this service 您的账户还未开通此服务
400 InDebt Your account has overdue payments. 您的账户已欠费
400 OrderError.InsufficientBalance The account balance is insufficient. Please add funds first and try again. 账户已欠费,请您先充值后再重试。
400 OrderError.InstHasUnpaidOrder Your account has an unpaid order. 账户存在未支付订单,请您先支付后再重试。
400 OrderError.Arrearage Your account balance is less than CNY 100. Please add funds to your account and try again. 账户余额不足100元,请您先充值后再重试。
400 OrderError.NoCard No credit card is bound to your account. 未绑定卡,请您先绑定后再重试。
400 OrderError.InvalidPayMethod No valid default payment method is specified for your account. 没有有效的默认支付方式,请您查看支付方式是否正确。
400 OrderError.NoRealNameAuthentication You have not completed the real name authentication. 未完成实名验证,请您先进行实名认证后重试。
400 OrderError.NoRealNameRegistration Real name registration is required for instances launched in mainland China. 国际站用户购买中国内地地域云产品,未完成实名注册。
400 OrderError.UserProfileIncomplete You have not completed your user profile. 国际站用户未完善个人信息。
400 InvalidVpc The specified VPC is invalid. VPC信息无效,请您检查该参数是否正确。
400 InvalidVolume The specified volume is invalid. 存储卷无效,请您检查该参数是否正确。
400 InvalidSoftware The specified software is not supported. 请求的软件不支持
400 InvalidVolumeProtocal The specified volume protocol is invalid. 存储协议无效,请您检查该参数是否正确。
400 InvalidVolumeMountpoint The specified volume mount point is invalid. 挂载点无效,请您检查该参数是否正确。
403 TooManyClusters The number of user clusters exceeds the quota. 用户集群数量超过配额限制,默认不超过3个,如需更多,请参考使用限制文档中的提升配额方式。
403 TooManyComputes The number of computing nodes exceeds the quota. 计算节点数超过用户配额
403 TooManyLogins The maximum number of logged on nodes is exceeded. 登录节点数超过配额,默认不超过2个。如需更多,请参考使用限制文档中的提升配额方式。
403 TooManyScc The maximum number of SCC instances is exceeded. SCC实例数量超过配额,默认不超过15个。如需更多,请参考使用限制文档中的提升配额方式。
403 QuotaExceeded.PrivateIpAddress Insufficient private IP addresses in vSwitch: %s. vSwitch可用私网IP不足量: %s
403 ConflictOpt A conflicting operation is running. 有冲突的操作在执行中,请您稍后再试。
403 ImageNotSupported The specified image is not supported. 暂不支持所选的镜像,请您更换镜像后重试。
404 ImageNotFound The specified image does not exist. 指定的镜像不存在,请您检查该参数是否正确。
404 VolumeNotFound The specified volume does not exist. 指定的存储不存在,请您检查该参数是否正确。
404 VpcNotFound The specified VPC does not exist. 指定的VPC不存在,请您检查该参数是否正确。
406 EcsError An error occurred while calling the ECS API operation. ECS API调用出错
406 NasError NAS API request failed. NAS接口请求失败
406 NasServiceNotOpen The NAS service is not activated. NAS服务未开通
406 EipError The EIP API request failed. 请求弹性IP失败
406 OrderError An order request error occurred. 订单请求失败
406 FailToGenId Generating cluster ID failed. 生成集群ID失败,请您再重试该操作。
406 DbError A database service error occurred. 数据库请求失败
406 AliyunError An Alibaba Cloud product error occurred. 阿里云产品错误
407 NotAuthorized No authorization is granted. 未授权
500 UnknownError An unknown error occurred. 未知错误,请检查相关参数是否合理,检查后稍后重试。
503 ServiceUnavailable The request has failed due to a temporary failure of the server 请求失败,服务暂时不可用

访问错误中心查看更多错误码。