Skip to content

Commit

Permalink
[autoscaler][docs] No more legacy autoscaler yamls (ray-project#27037)
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Frank Luan <lsf@berkeley.edu>
  • Loading branch information
2 people authored and franklsf95 committed Aug 2, 2022
1 parent add698a commit da3ada7
Show file tree
Hide file tree
Showing 23 changed files with 292 additions and 1,019 deletions.
3 changes: 0 additions & 3 deletions python/ray/autoscaler/aliyun/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,3 @@ head_start_ray_commands:
worker_start_ray_commands:
- ray stop
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076

head_node: {}
worker_nodes: {}
3 changes: 0 additions & 3 deletions python/ray/autoscaler/aliyun/example-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,3 @@ head_start_ray_commands:
worker_start_ray_commands:
- ray stop
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076

head_node: {}
worker_nodes: {}
3 changes: 0 additions & 3 deletions python/ray/autoscaler/aliyun/example-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,3 @@ head_start_ray_commands:
worker_start_ray_commands:
- ray stop
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076

head_node: {}
worker_nodes: {}
3 changes: 0 additions & 3 deletions python/ray/autoscaler/aws/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,3 @@ head_start_ray_commands:
worker_start_ray_commands:
- ray stop
- ulimit -n 65536; ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076

head_node: {}
worker_nodes: {}
87 changes: 21 additions & 66 deletions python/ray/autoscaler/aws/development-example.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# An unique identifier for the head node and workers of this cluster.
cluster_name: default

# The minimum number of workers nodes to launch in addition to the head
# node. This number should be >= 0.
min_workers: 2

# The maximum number of workers nodes to launch in addition to the head
# node. This takes precedence over min_workers.
max_workers: 2
cluster_name: development

# The autoscaler will scale up the cluster faster with higher upscaling speed.
# E.g., if the task requires adding more nodes then autoscaler will gradually
Expand All @@ -27,58 +19,27 @@ provider:
# How Ray will authenticate with newly launched nodes.
auth:
ssh_user: ubuntu
# By default Ray creates a new private keypair, but you can also use your own.
# If you do so, make sure to also set "KeyName" in the head and worker node
# configurations below.
# ssh_private_key: /path/to/your/key.pem

# Provider-specific config for the head node, e.g. instance type. By default
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
# For more documentation on available fields, see:
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
head_node:
InstanceType: m4.16xlarge
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI.

# Set primary volume to 25 GiB
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 50

# Additional options in the boto docs.

# Provider-specific config for worker nodes, e.g. instance type. By default
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
# For more documentation on available fields, see:
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
worker_nodes:
InstanceType: m4.16xlarge
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI.

# Set primary volume to 25 GiB
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 50

# Run workers on spot by default. Comment this out to use on-demand.
InstanceMarketOptions:
MarketType: spot
# Additional options can be found in the boto docs, e.g.
# SpotOptions:
# MaxPrice: MAX_HOURLY_PRICE

# Additional options in the boto docs.

# Files or directories to copy to the head and worker nodes. The format is a
# dictionary from REMOTE_PATH: LOCAL_PATH, e.g.
file_mounts: {
# "/path1/on/remote/machine": "/path1/on/local/machine",
# "/path2/on/remote/machine": "/path2/on/local/machine",
}

# List of shell commands to run to set up nodes.
# Tell the autoscaler the allowed node types and the resources they provide.
# The key is the name of the node type, which is just for debugging purposes.
# The node config specifies the launch config and physical instance type.
available_node_types:
# Provider-specific config for the head node, e.g. instance type. By default
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
# For more documentation on available fields, see:
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
ray.head.default:
node_config:
InstanceType: m4.16xlarge
ImageId: ami-0def3275 # Default Ubuntu 16.04 AMI.

# Set primary volume to 25 GiB
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 50

# List of shell commands to install ray from source.
setup_commands:
# Consider uncommenting these if you run into dpkg locking issues
# - sudo pkill -9 apt-get || true
Expand All @@ -101,12 +62,6 @@ setup_commands:
- pip install boto3==1.4.8 cython==0.29.26 aiohttp grpcio psutil setproctitle
- cd ray/python; pip install -e . --verbose

# Custom commands that will be run on the head node after common setup.
head_setup_commands: []

# Custom commands that will be run on worker nodes after common setup.
worker_setup_commands: []

# Command to start ray on the head node. You don't need to change this.
head_start_ray_commands:
- ray stop
Expand Down
149 changes: 0 additions & 149 deletions python/ray/autoscaler/aws/example-full-legacy.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions python/ray/autoscaler/aws/example-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,3 @@ head_start_ray_commands:
worker_start_ray_commands:
- ray stop
- ray start --address=$RAY_HEAD_IP:6379 --object-manager-port=8076

head_node: {}
worker_nodes: {}
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ auth:
# VPC peering overview: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-peering.html.
# Setup VPC peering: https://docs.aws.amazon.com/vpc/latest/peering/create-vpc-peering-connection.html.
# Configure VPC peering route tables: https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-routing.html.

# To enable external SSH connectivity, you should also ensure that your VPC
# is configured to assign public IPv4 addresses to every EC2 instance
# assigned to it.
head_node:
SecurityGroupIds:
- sg-1234abcd # Replace with an actual security group id.

worker_nodes:
SecurityGroupIds:
- sg-1234abcd # Replace with an actual security group id.


available_node_types:
ray.head.default:
node_config:
SecurityGroupIds:
- sg-1234abcd # Replace with an actual security group id.

ray.worker.default:
node_config:
SecurityGroupIds:
- sg-1234abcd # Replace with an actual security group id.
58 changes: 26 additions & 32 deletions python/ray/autoscaler/aws/example-java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,32 @@ provider:
# How Ray will authenticate with newly launched nodes.
auth:
ssh_user: ubuntu
# Provider-specific config for the head node, e.g. instance type. By default
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
# For more documentation on available fields, see:
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
head_node:
InstanceType: m4.4xlarge
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
# You can provision additional disk space with a conf as follows
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 20
# Additional options in the boto docs.
# Provider-specific config for worker nodes, e.g. instance type. By default
# Ray will auto-configure unspecified fields such as SubnetId and KeyName.
# For more documentation on available fields, see:
# http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances
worker_nodes:
InstanceType: m4.4xlarge
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
# Run workers on spot by default. Comment this out to use on-demand.
InstanceMarketOptions:
MarketType: spot
# Additional options can be found in the boto docs, e.g.
# SpotOptions:
# MaxPrice: MAX_HOURLY_PRICE
# Files or directories to copy to the head and worker nodes. The format is a
# dictionary from REMOTE_PATH: LOCAL_PATH, e.g.
file_mounts: {
# "/path1/on/remote/machine": "/path1/on/local/machine",
# "/path2/on/remote/machine": "/path2/on/local/machine",
}


# Tell the autoscaler the allowed node types and the resources they provide.
# The key is the name of the node type, which is just for debugging purposes.
# The node config specifies the launch config and physical instance type.
available_node_types:
ray.head.default:
node_config:
InstanceType: m4.4xlarge
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
# You can provision additional disk space with a conf as follows
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 20
# Additional options in the boto docs.
ray.worker.default:
node_config:
InstanceType: m4.4xlarge
ImageId: ami-06d51e91cea0dac8d # Ubuntu 18.04
# Run workers on spot by default. Comment this out to use on-demand.
InstanceMarketOptions:
MarketType: spot
# Additional options can be found in the boto docs, e.g.
# SpotOptions:
# MaxPrice: MAX_HOURLY_PRICE
# List of commands that will be run before `setup_commands`. If docker is
# enabled, these commands will run outside the container and before docker
# is setup.
Expand Down
Loading

0 comments on commit da3ada7

Please sign in to comment.