Creates a Ray cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
emr-serverless-spark:CreateRayCluster |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/workspaces/{workspaceId}/rayCluster HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspaceId |
string |
No |
The workspace ID. |
w-d2d82aa09155 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request struct. |
|
| name |
string |
No |
The name of the Ray cluster. The name must be 1 to 64 characters in length. |
testRayCluster |
| displayReleaseVersion |
string |
No |
The Ray DPI engine version. |
ray-1.0.0 (Ray 2.47.1, Python 3.12) |
| description |
string |
No |
The description. |
Ray Cluster for dev. |
| networkServiceName |
string |
No |
The network connectivity name. |
vpc |
| headSpec |
object |
No |
The parameters of the Ray cluster head node. |
|
| queueName |
string |
No |
The queue name. |
root_queue |
| cpu |
string |
No |
The number of CPU cores. |
2 |
| memory |
string |
No |
The memory size. Unit: Gi. |
8Gi |
| enableAutoScaling |
boolean |
No |
Specifies whether to enable automatic scaling for workers. |
false |
| idleTimeoutSeconds |
integer |
No |
The idle timeout period of workers after automatic scaling is enabled. |
60 |
| gpuSpec |
string |
No |
The GPU model. |
ecs.gn6i-c4g1.xlarge |
| gftEnabled |
boolean |
No |
Specifies whether to enable GCS Fault Tolerance. |
|
| gftConfig |
object |
No |
The GCS Fault Tolerance configuration. |
|
| redisUrl |
string |
No |
The Redis URL. |
10.12.3.4:6379 |
| redisUsername |
string |
No |
The Redis username. |
default |
| redisPassword |
string |
No |
The Redis password. |
redispasswd |
| env |
string |
No |
The environment variables. |
MY_ENV=hello\nMY_ENV2=hello2 |
| rayStartParams |
string |
No |
The Ray node startup parameters. |
--num-cpus=0 --num-gpus=0 |
| displayReleaseVersion |
string |
No |
The Ray DPI engine version. |
ray-1.2.0 (Ray 2.55.1, Python 3.12) |
| workerSpec |
array<object> |
No |
The parameters of the Ray cluster worker nodes. A maximum of 50 groups are supported. |
|
|
object |
No |
The worker node struct. |
||
| groupName |
string |
No |
The worker group name. |
WorkerGroup1 |
| workerType |
string |
No |
The worker type. |
CPU |
| replica |
integer |
No |
The number of workers. Minimum value: 1. |
2 |
| queueName |
string |
No |
The queue name. |
root_queue |
| cpu |
string |
No |
The number of CPU cores. |
4 |
| memory |
string |
No |
The memory size. Unit: Gi. |
16Gi |
| minReplica |
integer |
No |
The minimum number of workers after automatic scaling is enabled. Minimum value: 1. The value must be less than or equal to maxReplica. |
1 |
| maxReplica |
integer |
No |
The maximum number of workers after automatic scaling is enabled. Minimum value: 1. |
10 |
| gpuSpec |
string |
No |
The GPU model. |
ecs.gn6i-c4g1.xlarge |
| displayReleaseVersion |
string |
No |
The engine version. If this parameter is not specified, the value is the same as that of the head node. |
ray-1.2.0 (Ray 2.55.1, Python 3.12) |
| env |
string |
No |
The environment variables. |
MY_ENV=hello\nMY_ENV2=hello2 |
| rayStartParams |
string |
No |
The Ray node startup parameters. |
--num-cpus=0 --num-gpus=0 |
| extraParam |
string |
No |
The extra parameters. The value must be in JSON format. |
{} |
| volumeIds |
array |
No |
The list of managed directory IDs to mount. |
|
|
string |
No |
The managed directory ID. |
vol-1234567890 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. |
DD6B1B2A-5837-5237-ABE4-FF0C8944 |
| clusterId |
string |
The Ray cluster ID. |
ray-k7nm8ahl5te4tg91 |
Examples
Success response
JSON format
{
"requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944",
"clusterId": "ray-k7nm8ahl5te4tg91"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.