-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[autoscaler][AWS] Make sure subnets belong to same VPC as user-specified security groups #13558
Merged
ericl
merged 10 commits into
ray-project:master
from
DmitriGekhtman:aws-subnet-sg-compatibility
Jan 28, 2021
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bd25707
initial commit
DmitriGekhtman 58d22cc
Filter subnets by security groups' VPCs
DmitriGekhtman 7ba499c
fix stubs
DmitriGekhtman c692cb8
wip
DmitriGekhtman 45e9374
Fix inbound rule logic. Tests WIP.
DmitriGekhtman 5af9934
wip
DmitriGekhtman bcd1548
unit test
DmitriGekhtman 40ebe6a
example yaml
DmitriGekhtman 3db7bbb
Unit test tests for bug being fixed
DmitriGekhtman cb77eea
Update python/ray/tests/aws/utils/constants.py
DmitriGekhtman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
python/ray/autoscaler/aws/example-head-and-worker-security-group.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
cluster_name: sg | ||
|
||
max_workers: 1 | ||
|
||
provider: | ||
type: aws | ||
region: us-west-2 | ||
availability_zone: us-west-2a | ||
|
||
auth: | ||
ssh_user: ubuntu | ||
|
||
# If required, head and worker nodes can exist on subnets in different VPCs and | ||
# communicate via VPC peering. | ||
|
||
# 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. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user specifies security groups for both head and worker, and the security groups belong to different VPCs, this will throw an error.
We could have it support user-specified security groups in different VPCs for head and workers.
This would match the behavior for subnets: #8374 .
I think I won't bother with that, unless reviewers think I should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we wanted to go further down that path, we would want at some point to support different VPCs for each node type in a multi node-type config.