调用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 |
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 |
业务镜像是否已预安装调度器。取值范围:
|
ComputeSpotStrategy | String | 否 | NoSpot |
计算节点抢占策略。取值范围:
默认值:NoSpot |
ComputeSpotPriceLimit | Float | 否 | 0.034 |
计算节点下ECS实例的每小时最高价格。支持最多3位小数,参数ComputeSpotStrategy取值为SpotWithPriceLimit时生效。 |
ImageOwnerAlias | String | 否 | system |
镜像类型。取值范围:
|
ImageId | String | 否 | wi_1607_x64_dtc_zh_40G_alibase**** |
镜像ID。 |
ClientToken | String | 否 | 123e4567-e89b-12d3-a456-426655440000 |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符,且不能超过64个字符。更多信息,请参见如何保证幂等性。 |
MultiOs | Boolean | 否 | false |
集群是否支持多操作系统。取值范围:
默认值:false |
Nodes.N.SchedulerType | String | 否 | pbs |
第N个本地集群节点的调度器类型。取值范围:
默认值:pbs |
Nodes.N.IpAddress | String | 否 | 00b648b**** |
第N个本地集群节点的IP地址。 |
Nodes.N.HostName | String | 否 | test1 |
第N个本地集群节点的主机名称。 |
Nodes.N.Role | String | 否 | Compute |
第N个本地集群节点的角色。取值范围:
|
Nodes.N.AccountType | String | 否 | nis |
第N个本地集群节点的域账号服务类型。取值范围:
默认值: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三个参数,具体参数说明如下:
|
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 | 请求失败,服务暂时不可用 |
访问错误中心查看更多错误码。