Skip to content

Commit eacc763

Browse files
wuisawesomeAlex
andauthored
[autoscaler][docs] No more legacy autoscaler yamls (ray-project#27037)
Why are these changes needed? This PR updates all autoscaler yaml examples/defaults to not use the legacy head_node and worker_node fields and deletes the explicit example-full-legacy yamls and the corresponding tests. Related issue number For ease of review, this PR is purely cosmetic/yaml editing (plus minor test changes to keep CI happy). It partially satisfies ray-project#20837. There will be 2 more follow up PRs (one to make the schema change and update the configs baked into unit tests, and another to clean up the legacy code). Co-authored-by: Alex <alex@anyscale.com>
1 parent 8ddcf89 commit eacc763

23 files changed

+292
-1019
lines changed

python/ray/autoscaler/aliyun/defaults.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,3 @@ head_start_ray_commands:
150150
worker_start_ray_commands:
151151
- ray stop
152152
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076
153-
154-
head_node: {}
155-
worker_nodes: {}

python/ray/autoscaler/aliyun/example-full.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,3 @@ head_start_ray_commands:
156156
worker_start_ray_commands:
157157
- ray stop
158158
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076
159-
160-
head_node: {}
161-
worker_nodes: {}

python/ray/autoscaler/aliyun/example-linux.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,3 @@ head_start_ray_commands:
159159
worker_start_ray_commands:
160160
- ray stop
161161
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076
162-
163-
head_node: {}
164-
worker_nodes: {}

python/ray/autoscaler/aws/defaults.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,3 @@ head_start_ray_commands:
142142
worker_start_ray_commands:
143143
- ray stop
144144
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076
145-
146-
head_node: {}
147-
worker_nodes: {}

python/ray/autoscaler/aws/development-example.yaml

Lines changed: 21 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# An unique identifier for the head node and workers of this cluster.
2-
cluster_name: default
3-
4-
# The minimum number of workers nodes to launch in addition to the head
5-
# node. This number should be >= 0.
6-
min_workers: 2
7-
8-
# The maximum number of workers nodes to launch in addition to the head
9-
# node. This takes precedence over min_workers.
10-
max_workers: 2
2+
cluster_name: development
113

124
# The autoscaler will scale up the cluster faster with higher upscaling speed.
135
# E.g., if the task requires adding more nodes then autoscaler will gradually
@@ -27,58 +19,27 @@ provider:
2719
# How Ray will authenticate with newly launched nodes.
2820
auth:
2921
ssh_user: ubuntu
30-
# By default Ray creates a new private keypair, but you can also use your own.
31-
# If you do so, make sure to also set "KeyName" in the head and worker node
32-
# configurations below.
33-
# ssh_private_key: /path/to/your/key.pem
34-
35-
# Provider-specific config for the head node, e.g. instance type. By default
36-
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
37-
# For more documentation on available fields, see:
38-
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
39-
head_node:
40-
InstanceType: m4.16xlarge
41-
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI.
42-
43-
# Set primary volume to 25 GiB
44-
BlockDeviceMappings:
45-
- DeviceName: /dev/sda1
46-
Ebs:
47-
VolumeSize: 50
48-
49-
# Additional options in the boto docs.
50-
51-
# Provider-specific config for worker nodes, e.g. instance type. By default
52-
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
53-
# For more documentation on available fields, see:
54-
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
55-
worker_nodes:
56-
InstanceType: m4.16xlarge
57-
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI.
5822

59-
# Set primary volume to 25 GiB
60-
BlockDeviceMappings:
61-
- DeviceName: /dev/sda1
62-
Ebs:
63-
VolumeSize: 50
64-
65-
# Run workers on spot by default. Comment this out to use on-demand.
66-
InstanceMarketOptions:
67-
MarketType: spot
68-
# Additional options can be found in the boto docs, e.g.
69-
# SpotOptions:
70-
# MaxPrice: MAX_HOURLY_PRICE
71-
72-
# Additional options in the boto docs.
73-
74-
# Files or directories to copy to the head and worker nodes. The format is a
75-
# dictionary from REMOTE_PATH: LOCAL_PATH, e.g.
76-
file_mounts: {
77-
# "/path1/on/remote/machine": "/path1/on/local/machine",
78-
# "/path2/on/remote/machine": "/path2/on/local/machine",
79-
}
80-
81-
# List of shell commands to run to set up nodes.
23+
# Tell the autoscaler the allowed node types and the resources they provide.
24+
# The key is the name of the node type, which is just for debugging purposes.
25+
# The node config specifies the launch config and physical instance type.
26+
available_node_types:
27+
# Provider-specific config for the head node, e.g. instance type. By default
28+
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
29+
# For more documentation on available fields, see:
30+
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
31+
ray.head.default:
32+
node_config:
33+
InstanceType: m4.16xlarge
34+
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI.
35+
36+
# Set primary volume to 25 GiB
37+
BlockDeviceMappings:
38+
- DeviceName: /dev/sda1
39+
Ebs:
40+
VolumeSize: 50
41+
42+
# List of shell commands to install ray from source.
8243
setup_commands:
8344
# Consider uncommenting these if you run into dpkg locking issues
8445
# - sudo pkill -9 apt-get || true
@@ -101,12 +62,6 @@ setup_commands:
10162
- pip install boto3==1.4.8 cython==0.29.26 aiohttp grpcio psutil setproctitle
10263
- cd ray/python; pip install -e . --verbose
10364

104-
# Custom commands that will be run on the head node after common setup.
105-
head_setup_commands: []
106-
107-
# Custom commands that will be run on worker nodes after common setup.
108-
worker_setup_commands: []
109-
11065
# Command to start ray on the head node. You don't need to change this.
11166
head_start_ray_commands:
11267
- ray stop

python/ray/autoscaler/aws/example-full-legacy.yaml

Lines changed: 0 additions & 149 deletions
This file was deleted.

python/ray/autoscaler/aws/example-full.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,3 @@ head_start_ray_commands:
169169
worker_start_ray_commands:
170170
- ray stop
171171
- ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076
172-
173-
head_node: {}
174-
worker_nodes: {}

python/ray/autoscaler/aws/example-head-and-worker-security-group.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,13 @@ auth:
1616
# VPC peering overview: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-peering.html.
1717
# Setup VPC peering: https://docs.aws.amazon.com/vpc/latest/peering/create-vpc-peering-connection.html.
1818
# Configure VPC peering route tables: https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-routing.html.
19-
20-
# To enable external SSH connectivity, you should also ensure that your VPC
21-
# is configured to assign public IPv4 addresses to every EC2 instance
22-
# assigned to it.
23-
head_node:
24-
SecurityGroupIds:
25-
- sg-1234abcd # Replace with an actual security group id.
26-
27-
worker_nodes:
28-
SecurityGroupIds:
29-
- sg-1234abcd # Replace with an actual security group id.
30-
31-
19+
available_node_types:
20+
ray.head.default:
21+
node_config:
22+
SecurityGroupIds:
23+
- sg-1234abcd # Replace with an actual security group id.
24+
25+
ray.worker.default:
26+
node_config:
27+
SecurityGroupIds:
28+
- sg-1234abcd # Replace with an actual security group id.

python/ray/autoscaler/aws/example-java.yaml

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,32 @@ provider:
1818
# How Ray will authenticate with newly launched nodes.
1919
auth:
2020
ssh_user: ubuntu
21-
# Provider-specific config for the head node, e.g. instance type. By default
22-
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
23-
# For more documentation on available fields, see:
24-
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
25-
head_node:
26-
InstanceType: m4.4xlarge
27-
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
28-
# You can provision additional disk space with a conf as follows
29-
BlockDeviceMappings:
30-
- DeviceName: /dev/sda1
31-
Ebs:
32-
VolumeSize: 20
33-
# Additional options in the boto docs.
34-
# Provider-specific config for worker nodes, e.g. instance type. By default
35-
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
36-
# For more documentation on available fields, see:
37-
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
38-
worker_nodes:
39-
InstanceType: m4.4xlarge
40-
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
41-
# Run workers on spot by default. Comment this out to use on-demand.
42-
InstanceMarketOptions:
43-
MarketType: spot
44-
# Additional options can be found in the boto docs, e.g.
45-
# SpotOptions:
46-
# MaxPrice: MAX_HOURLY_PRICE
47-
# Files or directories to copy to the head and worker nodes. The format is a
48-
# dictionary from REMOTE_PATH: LOCAL_PATH, e.g.
49-
file_mounts: {
50-
# "/path1/on/remote/machine": "/path1/on/local/machine",
51-
# "/path2/on/remote/machine": "/path2/on/local/machine",
52-
}
21+
22+
23+
# Tell the autoscaler the allowed node types and the resources they provide.
24+
# The key is the name of the node type, which is just for debugging purposes.
25+
# The node config specifies the launch config and physical instance type.
26+
available_node_types:
27+
ray.head.default:
28+
node_config:
29+
InstanceType: m4.4xlarge
30+
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
31+
# You can provision additional disk space with a conf as follows
32+
BlockDeviceMappings:
33+
- DeviceName: /dev/sda1
34+
Ebs:
35+
VolumeSize: 20
36+
# Additional options in the boto docs.
37+
ray.worker.default:
38+
node_config:
39+
InstanceType: m4.4xlarge
40+
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
41+
# Run workers on spot by default. Comment this out to use on-demand.
42+
InstanceMarketOptions:
43+
MarketType: spot
44+
# Additional options can be found in the boto docs, e.g.
45+
# SpotOptions:
46+
# MaxPrice: MAX_HOURLY_PRICE
5347
# List of commands that will be run before `setup_commands`. If docker is
5448
# enabled, these commands will run outside the container and before docker
5549
# is setup.

0 commit comments

Comments
 (0)