创建一个按量付费或者预付费(包年包月)集群。
接口说明
接口说明
创建集群会涉及相关资源计费,建议您提前了解 E-HPC 的计费方式。更多信息,请参见计费方式。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ehpc:CreateCluster |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ZoneId |
string |
否 |
可用区 ID。 您可以调用 ListRegions 和 DescribeZones 接口获取可以使用 E-HPC 的可用区 ID。 |
cn-hangzhou-b |
| Name |
string |
是 |
集群名称,长度为 2~64 个字符。 |
test |
| Description |
string |
否 |
集群描述信息。长度为 2~256 个英文或中文字符,不能以 |
TestDescription |
| EhpcVersion |
string |
否 |
E-HPC 产品版本,默认为最新版本。 |
1.0.0 |
| ClientVersion |
string |
否 |
集群客户端版本,默认为最新版本。 您可以调用 ListCurrentClientVersion 查询当前最新客户端版本号。 |
1.0.64 |
| OsTag |
string |
否 |
操作系统镜像标签。 |
CentOS_7.2_64 |
| AccountType |
string |
否 |
域账号服务类型。取值范围:
默认值:nis。 |
nis |
| Domain |
string |
否 |
本地集群域名。 仅当 AccoutType 取值为 Idap 时,支持配置该参数。 |
ldap |
| SchedulerType |
string |
否 |
调度器类型。取值范围:
默认值:pbs。 |
pbs |
| SecurityGroupId |
string |
否 |
指定新创建集群所属的安全组 ID。 您可以调用 DescribeSecurityGroups 查询当前地域可以使用的安全组。 |
sg-bp13n61xsydodfyg**** |
| SecurityGroupName |
string |
否 |
如果不使用已有安全组,则使用此名称创建新安全组,应用默认安全组策略。 |
ehpc-SecurityGroup |
| VpcId |
string |
否 |
集群所属的 VPC ID。 您可以调用 DescribeVpcs 查询已创建的 VPC 信息。 |
vpc-b3f3edefefeep0760yju**** |
| VSwitchId |
string |
否 |
VPC 中交换机 ID。E-HPC 当前仅支持 VPC 网络。 您可以调用 DescribeVSwitches 查询已创建的交换机的相关信息。 |
vsw-bp1lfcjbfb099rrjn**** |
| VolumeType |
string |
否 |
共享存储类型,目前仅支持配置为 |
nas |
| VolumeId |
string |
否 |
阿里云 NAS 实例 ID。如果该参数为空,创建集群的流程会默认创建一个性能型的 NAS 实例。 您可以调用 ListFileSystemWithMountTargets 查询可用的 NAS 的 VPC 挂载点。 |
008b64**** |
| VolumeProtocol |
string |
否 |
共享存储的协议类型。取值范围:
默认值:NFS。 |
NFS |
| VolumeMountpoint |
string |
否 |
NAS 的 VPC 挂载点。VolumeMountpoint 有以下限制:
|
008b648bcb-s****.cn-hangzhou.nas.aliyuncs.com |
| VolumeMountOption |
string |
否 |
采用 mount 命令手动挂载 NFS 文件系统时的挂载参数。
|
-t nfs -o vers=4 |
| RemoteDirectory |
string |
否 |
挂载共享存储的远程目录。 |
NasMountpoint:/RemoteDirectory |
| DeployMode |
string |
否 |
集群部署模式。取值范围:
默认值:Standard。 |
Simple |
| HaEnable |
boolean |
否 |
是否开启高可用。取值范围:
默认值:false。 说明
若开启高可用则集群中的每种管控角色将会使用主备 2 个节点。 |
true |
| EcsChargeType |
string |
否 |
集群中所有节点的付费类型,取值范围:
若选择包年包月类型,默认开启自动续费。 |
PostPaid |
| Password |
string |
否 |
登录节点的 root 密码。 说明
建议使用 HTTPS 协议调用 API 避免密码泄露。 密码格式要求:
说明
集群的登录凭证支持密码和密钥对两种,Password 和 KeyPairName 二者必选其一,如果二者都指定,则 Password 优先级高。 |
123**** |
| KeyPairName |
string |
否 |
登录节点绑定的密钥对名称。关于如何创建密钥对,请参见创建密钥对。 说明
集群的登录凭证支持密码和密钥对两种,Password 和 KeyPairName 二者必选其一,如果二者都指定,则 Password 优先级高。 |
test |
| ImageOwnerAlias |
string |
否 |
镜像类型。取值范围:
默认值:system。 |
self |
| ImageId |
string |
否 |
镜像 ID。 您可以调用 ListImages 和 ListCustomImages 查询 E-HPC 可以使用的镜像 ID。 |
centos_7_02_64_20G_alibase_20170818**** |
| EcsOrder.Manager.Count |
integer |
否 |
集群管控节点数量。取值范围:1~2。 |
1 |
| EcsOrder.Manager.InstanceType |
string |
否 |
集群管控节点规格。 您可以调用 ListPreferredEcsTypes 接口获取推荐的节点规格信息。 |
ecs.n1.tiny |
| EcsOrder.Compute.Count |
integer |
否 |
集群计算节点数量。取值范围:0~99。 |
1 |
| EcsOrder.Compute.InstanceType |
string |
否 |
集群计算节点规格。 您可以调用 ListPreferredEcsTypes 接口获取推荐的节点规格信息。 |
ecs.n1.tiny |
| EcsOrder.Login.Count |
integer |
否 |
集群登录节点数量,仅支持配置 1。 |
1 |
| EcsOrder.Login.InstanceType |
string |
否 |
集群登录节点规格。 您可以调用 ListPreferredEcsTypes 接口获取推荐的节点规格信息。 |
ecs.n1.tiny |
| SccClusterId |
string |
否 |
SCC 实例 ID。 如果配置该参数,则将已有的 SCC 实例纳管到新创建的 SCC 集群中。 |
00b648b**** |
| ComputeSpotStrategy |
string |
否 |
计算节点竞价策略。取值范围:
默认值:NoSpot。 |
NoSpot |
| ComputeSpotPriceLimit |
string |
否 |
计算节点每小时最高价格。最大支持 3 位小数,参数 ComputeSpotStrategy 取值为 SpotWithPriceLimit 时生效。 |
0.034 |
| ComputeEnableHt |
boolean |
否 |
计算节点是否支持超线程。取值范围:
默认值:true。 |
true |
| Period |
integer |
否 |
购买集群节点的时长。单位由
默认值:1。 |
1 |
| PeriodUnit |
string |
否 |
购买集群节点的时长单位。取值范围:
默认值:Month。 |
Year |
| AutoRenew |
string |
否 |
是否自动续费。取值范围:
默认值:false。 |
false |
| AutoRenewPeriod |
integer |
否 |
每次自动续费的时长,当参数 AutoRenew 取值 true 时生效。 |
1 |
| InputFileUrl |
string |
否 |
上传到 OSS 的作业文件的 URL 地址。 |
https://ehpc-tianshui.oss-cn-beijing.aliyuncs.com/test-u****/testlist_ehpc.sh |
| JobQueue |
string |
否 |
计算节点加入的队列名称。 |
workq |
| SystemDiskType |
string |
否 |
系统盘的云盘种类。取值范围:
默认值:cloud_ssd。 |
cloud_ssd |
| SystemDiskSize |
integer |
否 |
系统盘大小。单位:GB。 取值范围:40~500。 默认值:40。 |
40 |
| RemoteVisEnable |
string |
否 |
是否开启远程可视化。取值范围:
默认值:false。 |
false |
| ResourceGroupId |
string |
否 |
资源组 ID。 您可以调用 ListResourceGroups 查询资源组 ID。 |
rg-acfmxazb4ph**** |
| ClientToken |
string |
否 |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性。 |
123e4567-e89b-12d3-a456-426655440000 |
| WithoutElasticIp |
boolean |
否 |
登录节点是否使用弹性公网 IP。默认值:false。 |
true |
| SystemDiskLevel |
string |
否 |
创建 ESSD 云盘作为系统盘使用时,设置云盘的性能等级。取值范围:
默认值:PL1。 关于如何选择 ESSD 性能等级,请参见 ESSD 云盘。 |
PL0 |
| IsComputeEss |
boolean |
否 |
是否启用自动伸缩。取值范围:
默认值:false。 |
false |
| ClusterVersion |
string |
否 |
集群版本号。 默认值:1.0。 |
1.0 |
| Application |
array<object> |
否 |
应用软件信息。 |
|
|
object |
否 |
应用软件信息。 |
||
| Tag |
string |
否 |
应用软件的标签。 N 的取值范围:0~100 您可以调用 ListSoftwares 查询应用软件标签。 |
OpenMPI_11.1 |
| AdditionalVolumes |
array<object> |
否 |
挂载的共享存储信息。 |
|
|
array<object> |
否 |
挂载的共享存储信息。 |
||
| JobQueue |
string |
否 |
挂载共享存储的节点作业所处队列。 N 的取值范围:1~10。 |
high |
| VolumeId |
string |
否 |
挂载的 NAS 实例 ID。 N 的取值范围:1~10。 |
extreme-00b88**** |
| Roles |
array<object> |
否 |
共享存储挂载到新 NAS 上的节点信息。 |
|
|
object |
否 |
共享存储挂载到新 NAS 上的节点信息。 |
||
| Name |
string |
否 |
共享存储挂载到新 NAS 上的节点类型。 AdditionalVolumes.N.Roles 中 N 的取值范围:1~10。 Roles.N.Name 中 N 的取值范围:0~8。 |
["Compute"] |
| VolumeMountpoint |
string |
否 |
挂载的 NAS 的 VPC 挂载点。 N 的取值范围:1~10。 |
0088****-sihc.cn-hangzhou.extreme.nas.aliyuncs.com |
| VolumeMountOption |
string |
否 |
NAS 的挂载选项。 N 的取值范围:1~10。 |
-t nfs -o vers=4.0 |
| RemoteDirectory |
string |
否 |
挂载的共享存储的远程目录。 N 的取值范围:1~10。 |
/test |
| VolumeType |
string |
否 |
挂载的共享存储类型。目前仅支持 NAS。 N 的取值范围:1~10 |
nas |
| LocalDirectory |
string |
否 |
挂载的共享存储的本地挂载目录。 N 的取值范围:1~10。 |
/ff |
| VolumeProtocol |
string |
否 |
挂载的共享存储协议类型。取值范围:
N 的取值范围:1~10。 默认值:NFS。 |
NFS |
| Location |
string |
否 |
挂载的共享存储的集群类型,只能配置 PublicCloud。 N 的取值范围:1~10。 |
PublicCloud |
| PostInstallScript |
array<object> |
否 |
安装后脚本信息。 |
|
|
object |
否 |
安装后脚本信息。 |
||
| Args |
string |
否 |
安装后脚本的执行参数。 N 的取值范围:0~16。 |
bashfile.sh |
| Url |
string |
否 |
安装后脚本的下载地址。 N 的取值范围:0~16。 |
/opt/job.sh |
| Plugin |
string |
否 |
插件模式配置,仅当 SchedulerType 为 custom 生效。 格式为 JSON 字符串,包含 pluginMod、pluginLocalPath、pluginOssPath 三个参数,具体参数说明如下:
|
{"pluginMod": "oss","pluginLocalPath": "/opt/plugin","pluginOssPath": "https://bucket.oss-cn-hangzhou.aliyuncs.com/plugin/plugin.tgz"} |
| WithoutAgent |
boolean |
否 |
是否不安装 Agent 客户端。
默认值:false。 |
false |
| WithoutNas |
boolean |
否 |
是否不使用 NAS 作为共享存储。取值范围:
默认值:false。 |
false |
| RamRoleName |
string |
否 |
实例 RAM 角色名称。 您可以使用 RAM API ListRoles 查询您已创建的实例 RAM 角色。 |
testRamRoleName |
| NetworkInterfaceTrafficMode |
string |
否 |
弹性网卡的通讯模式。取值范围:
|
Standard |
| DeploymentSetId |
string |
否 |
部署集 ID。 您可以通过 DescribeDeploymentSets 获取部署集 ID,当前仅支持网络低时延策略的部署集。 |
ds-bp1frxuzdg87zh4pzq**** |
| RamNodeTypes |
array |
否 |
授权实例角色的节点名称详情。 |
Standard |
|
string |
否 |
授权实例角色的节点名称。 N 的取值范围:0~4。
|
manager |
|
| Tag |
array<object> |
否 |
标签数组。 |
|
|
object |
否 |
标签数组。 |
scheduler |
|
| Key |
string |
否 |
标签键。 |
TestKey |
| Value |
string |
否 |
标签值。 |
TestValue |
| AddOns |
array<object> |
否 |
自定义组件服务。 |
|
|
object |
否 |
自定义组件服务。 |
||
| Name |
string |
否 |
组件名称。 |
cromwell |
| Version |
string |
否 |
组件版本号。 |
85 |
| DeployMode |
string |
否 |
部署模式。取值范围:local,ecs。 |
local |
| DBType |
string |
否 |
数据库类型。取值范围:Mysql,null。 |
Mysql |
| ConfigFile |
string |
否 |
配置文件路径。 |
/usr/local/addon/cromwell/cromwell.conf |
| Port |
number |
否 |
自定义组件访问端口。 |
10000 |
| DefaultStart |
boolean |
否 |
自定义组件是否自启动。取值范围:true,false。 |
true |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
F6757FA4-8FED-4602-B7F5-3550C084**** |
| TaskId |
string |
任务 ID。 说明
由于 CreateCluster 是异步操作,请求成功就会立即返回结果,不会等待节点创建成功。您可以调用 ListTasks 查询任务运行结果。 |
F6757FA4-8FED-4602-B7F5-3550C084**** |
| ClusterId |
string |
集群 ID。 |
ehpc-hz-FYUr32**** |
示例
正常返回示例
JSON格式
{
"RequestId": "F6757FA4-8FED-4602-B7F5-3550C084****",
"TaskId": "F6757FA4-8FED-4602-B7F5-3550C084****",
"ClusterId": "ehpc-hz-FYUr32****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 挂载点无效,请您检查该参数是否正确。 |
| 400 | MissingParams | The %s parameter is required. | 参数缺失:%s |
| 500 | UnknownError | An unknown error occurred. | 未知错误 |
| 403 | TooManyClusters | The number of user clusters exceeds the quota. | 用户集群数量超过配额限制,如需更多,请参考产品使用限制文档的方式提升配额。 |
| 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不存在,请您检查该参数是否正确。 |
| 404 | KeyPairNotFound | The specified KeyPair does not exist. | 指定的密钥对不存在,请您检查该参数是否正确。 |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API调用出错. %s |
| 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. | |
| 406 | DbError | A database service error occurred. | 数据库请求失败 |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | 阿里云产品错误。%s |
| 406 | AckError | An error occurred while calling the ACK API operation. | ACK API调用出错 |
| 407 | NotAuthorized | No authorization is granted. | 未授权 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。