Skip to content
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

Setup nodepool for neurohackademy #2758

Merged
merged 16 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions terraform/gcp/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ resource "google_container_node_pool" "notebook" {
project = google_container_cluster.cluster.project
version = var.k8s_versions.notebook_nodes_version

node_locations = each.value.zones == null ? google_container_cluster.cluster.node_locations : each.value.zones
node_locations = length(each.value.zones) == 0 ? [var.zone] : each.value.zones


initial_node_count = each.value.min
Expand Down Expand Up @@ -342,7 +342,7 @@ resource "google_container_node_pool" "dask_worker" {
project = google_container_cluster.cluster.project
version = var.k8s_versions.dask_nodes_version

node_locations = each.value.zones == null ? google_container_cluster.cluster.node_locations : each.value.zones
node_locations = length(each.value.zones) == 0 ? [var.zone] : each.value.zones
# Default to same config as notebook nodepools config
for_each = var.dask_nodes

Expand Down
20 changes: 19 additions & 1 deletion terraform/gcp/projects/pilot-hubs.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,25 @@ notebook_nodes = {
}],
resource_labels : {
"community" : "climatematch"
}
},
},
# Nodepool for neurohackademy. Tracking issue: https://github.com/2i2c-org/infrastructure/issues/2681
"neurohackademy" : {
# We expect around 120 users
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment linking to the issue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

min : 0,
max : 100,
machine_type : "n1-highmem-16",
labels : {
"2i2c.org/community" : "neurohackademy"
},
taints : [{
key : "2i2c.org/community",
value : "neurohackademy",
effect : "NO_SCHEDULE"
}],
resource_labels : {
"community" : "neurohackademy"
},
}
}

Expand Down
4 changes: 2 additions & 2 deletions terraform/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ variable "notebook_nodes" {
{}
),
resource_labels : optional(map(string), {}),
zones : optional(list(string), null)
zones : optional(list(string), [])
}))
description = "Notebook node pools to create"
default = {}
Expand All @@ -111,7 +111,7 @@ variable "dask_nodes" {
{}
),
resource_labels : optional(map(string), {}),
zones : optional(list(string), null)
zones : optional(list(string), [])
}))
description = "Dask node pools to create. Defaults to notebook_nodes"
default = {}
Expand Down