-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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] GCP node provider #2061
Changes from 67 commits
a896450
a3b44df
281c7b6
8cd3287
8615abb
f0539d3
ba8cdbf
012c5d8
f88449b
08f53a4
d17e244
3e67a60
d05df31
b499ea0
5deb6ba
352a4ff
16a8605
944468f
9a5c8a3
6c78b40
bd09fbc
52def7b
ad301bb
9a1d052
423f791
5d90308
f5634d3
7e1ea09
d71d4e4
9cf4840
7037922
d9bea64
bd07ff1
e6559fd
de2980b
a221c0d
9c3899c
c3341b0
5fa034c
c152faa
5948f0f
f40d7ef
44a3458
646dc81
23a0066
e50dd00
85c1e4b
5517743
35d946e
dd8fc5f
693de75
183453e
46250d3
7a84bbd
3e7f91e
b81ab5a
9f87340
a791241
1489971
ae5a586
8e37ab4
79c0c19
34a403a
ccbe2aa
5d78ef5
d8f66b3
6856117
41e90ed
a59f81c
feeb3a8
b6744e4
dd6b5ab
940c1b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
hash_launch_conf, fillout_defaults | ||
from ray.autoscaler.node_provider import get_node_provider, NODE_PROVIDERS | ||
from ray.autoscaler.tags import TAG_RAY_NODE_TYPE, TAG_RAY_LAUNCH_CONFIG, \ | ||
TAG_NAME | ||
TAG_RAY_NODE_NAME | ||
from ray.autoscaler.updater import NodeUpdaterProcess | ||
|
||
|
||
|
@@ -57,7 +57,7 @@ def teardown_cluster(config_file, yes): | |
|
||
provider = get_node_provider(config["provider"], config["cluster_name"]) | ||
head_node_tags = { | ||
TAG_RAY_NODE_TYPE: "Head", | ||
TAG_RAY_NODE_TYPE: "head", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that GCP label system doesn't support uppercase characters. I've temporarily changed all the tags to follow GCP format, but will eventually refactor the tagging system to support both. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good |
||
} | ||
for node in provider.nodes(head_node_tags): | ||
print("Terminating head node {}".format(node)) | ||
|
@@ -76,7 +76,7 @@ def get_or_create_head_node(config, no_restart, yes): | |
|
||
provider = get_node_provider(config["provider"], config["cluster_name"]) | ||
head_node_tags = { | ||
TAG_RAY_NODE_TYPE: "Head", | ||
TAG_RAY_NODE_TYPE: "head", | ||
} | ||
nodes = provider.nodes(head_node_tags) | ||
if len(nodes) > 0: | ||
|
@@ -98,7 +98,8 @@ def get_or_create_head_node(config, no_restart, yes): | |
provider.terminate_node(head_node) | ||
print("Launching new head node...") | ||
head_node_tags[TAG_RAY_LAUNCH_CONFIG] = launch_hash | ||
head_node_tags[TAG_NAME] = "ray-{}-head".format(config["cluster_name"]) | ||
head_node_tags[TAG_RAY_NODE_NAME] = "ray-{}-head".format( | ||
config["cluster_name"]) | ||
provider.create_node(config["head_node"], head_node_tags, 1) | ||
|
||
nodes = provider.nodes(head_node_tags) | ||
|
@@ -185,7 +186,7 @@ def get_head_node_ip(config_file): | |
config = yaml.load(open(config_file).read()) | ||
provider = get_node_provider(config["provider"], config["cluster_name"]) | ||
head_node_tags = { | ||
TAG_RAY_NODE_TYPE: "Head", | ||
TAG_RAY_NODE_TYPE: "head", | ||
} | ||
nodes = provider.nodes(head_node_tags) | ||
if len(nodes) > 0: | ||
|
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.
Thanks for adding this!