调用CreateHybridCluster创建一个混合云集群。

调试

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

请求参数

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

系统规定参数。取值:CreateHybridCluster

ZoneId String cn-hangzhou-b

可用区ID。

Name String hybridcluster

集群名称。长度2~64字符,只允许包含中文、字母、数字、短划线(-)和下划线(_),必须以字母或中文开头。

Description String TestDescription

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

默认值:空

EhpcVersion String 1.0.0

E-HPC产品版本号。默认使用最新版本。

ClientVersion String 1.0.64

集群客户端版本。默认使用最新版本。

OsTag String CentOS_7.2_64

操作系统镜像标签,您可以调用ListImages接口查询。

Domain String nis

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

  • nis
  • ldap

默认值:nis

Location String OnPremise

集群所在的位置。位置固定为混合云集群,取值:OnPremise。

SecurityGroupId String sg-bp13n61xsydodfyg****

使用已有安全组ID创建集群。

说明 当指定该参数时,不能同时指定SecurityGroupName参数。
SecurityGroupName String ehpc-SecurityGroup

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

说明 当指定该参数时,不能同时指定SecurityGroupId参数。
VpcId String vpc-b3f3edefefeep0760yju****

集群所属的VPC ID。

VSwitchId String vsw-bp1lfcjbfb099rrjn****

交换机ID。

EcsOrder.Manager.InstanceType String ecs.n1.tiny

混合云集群云上管理节点规格。目前仅支持代理模式。

EcsOrder.Compute.InstanceType String ecs.n1.tiny

集群计算节点实例规格。

VolumeType String NAS

文件系统类型。目前仅支持NAS。

VolumeId String 008b64****

存储实例ID。目前不支持自动创建阿里云NAS实例。

VolumeProtocol String NFS

共享存储的协议类型。目前仅支持NFS。

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

NAS的VPC挂载点。目前不支持自动创建阿里云NAS挂载点。

RemoteDirectory String /RemoteDirectory

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

OnPremiseVolumeProtocol String NFS

本地共享存储协议。目前仅支持NFS。

OnPremiseVolumeMountPoint String RemoteNasDomain.com

本地文件系统挂载点。

OnPremiseVolumeRemotePath String /RemoteDirectory

本地文件系统挂载路径。

OnPremiseVolumeLocalPath String /OnCloudDirectory

本地文件系统挂载到云上节点的路径。

Password String 123****

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

() ~ ! @ # $ % ^ & * - = + | { } [ ] : ; ‘ < > , . ? /
说明 建议使用HTTPS协议调用API避免密码泄露。
KeyPairName String test

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

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

扩容节点默认加入的队列。

ResourceGroupId String rg-acfmxazb4ph****

资源组ID。

SchedulerPreInstall Boolean true

业务镜像是否已预安装调度器。取值范围:

  • true:已预安装,创建或扩容节点时无需执行安装调度器流程。
  • false:未预安装,创建或扩容节点时需要执行安装调度器流程。
ComputeSpotStrategy String NoSpot

计算节点抢占策略。取值范围:

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

默认值:NoSpot

ComputeSpotPriceLimit Float 0.034

计算节点下ECS实例的每小时最高价格。支持最多3位小数,参数ComputeSpotStrategy取值为SpotWithPriceLimit时生效。

ImageOwnerAlias String system

镜像类型。取值范围:

  • system:公共镜像
  • self:自定义镜像
  • others:共享镜像
  • marketplace:镜像市场镜像
ImageId String wi_1607_x64_dtc_zh_40G_alibase****

镜像ID。

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

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

MultiOs Boolean false

集群是否支持多操作系统。取值范围:

  • true:支持多操作系统。
  • false:不支持多操作系统。

默认值:false

Nodes.N.SchedulerType String pbs

第N个本地集群节点的调度器类型。取值范围:

  • pbs
  • slurm
  • opengridscheduler
  • deadline

默认值:pbs

Nodes.N.IpAddress String 00b648b****

第N个本地集群节点的IP地址。

Nodes.N.HostName String test1

第N个本地集群节点的主机名称。

Nodes.N.Role String Compute

第N个本地集群节点的角色。取值范围:

  • Manager:管控节点
  • Login:登录节点
  • Compute:计算节点
Nodes.N.AccountType String nis

第N个本地集群节点的域账号服务类型。取值范围:

  • nis
  • ldap

默认值:nis

Nodes.N.Dir String /opt/sge/default/

第N个本地集群节点的配置目录。

Application.N.Tag String OpenMPI_11.1

第N个应用软件的标签。N的取值范围:1~5

PostInstallScript.N.Args String bash file.sh

第N个安装后脚本的执行参数。N的取值范围:1~16

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

第N个安装后脚本的全路径。N的取值范围:1~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生效。
OpenldapPar.LdapServerIp String 192.168.1.2

LDAP服务器IP。

OpenldapPar.BaseDn String ehpctest

LDAP服务器BaseDN。

WinAdPar.AdUser String Administrator

AD用户。

WinAdPar.AdUserPasswd String xxxxxx

AD用户密码。

WinAdPar.AdDc String ad-hybrid001.ehpcad.com

AD域名称。

WinAdPar.AdIp String 192.168.1.2

AD域IP。

返回数据

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

请求ID。

TaskId String F6757FA4-8FED-4602-B7F5-3550C0842122

任务ID。

ClusterId String ehpc-hz-FYUr32****

集群ID。

示例

请求示例

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=CreateHybridCluster
&Name=hybridcluster
&EcsOrder.Compute.InstanceType=ecs.n1.tiny
&OsTag=CentOS_7.2_64
&VpcId=vpc-b3f3edefefeep0760yju****
&VSwitchId=vsw-bp1lfcjbfb099rrjn****
&<公共请求参数>

正常返回示例

XML格式

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

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

JSON格式

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

{
  "RequestId" : "F6757FA4-8FED-4602-B7F5-3550C0842122",
  "TaskId" : "F6757FA4-8FED-4602-B7F5-3550C0842122",
  "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 请求失败,服务暂时不可用

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