diff --git a/config/hubs/2i2c.cluster.yaml b/config/hubs/2i2c.cluster.yaml index 058e31f740..4100b61346 100644 --- a/config/hubs/2i2c.cluster.yaml +++ b/config/hubs/2i2c.cluster.yaml @@ -102,12 +102,26 @@ hubs: auth0: connection: github config: + dask-gateway: + gateway: + backend: + scheduler: + nodeSelector: + 2i2c.org/community: ohw + worker: + nodeSelector: + 2i2c.org/community: ohw basehub: jupyterhub: + prePuller: + continuous: + enabled: true singleuser: image: - name: uwhackweeks/oceanhackweek - tag: 28d1c7b + name: ghcr.io/oceanhackweek/jupyer-image + tag: 9efd4fb + nodeSelector: + 2i2c.org/community: ohw memory: # Increase memory alloted during the workshop # https://github.com/2i2c-org/pilot-hubs/issues/549#issuecomment-891264570 diff --git a/terraform/gcp/cluster.tf b/terraform/gcp/cluster.tf index fa8534f3b3..0a75912de4 100644 --- a/terraform/gcp/cluster.tf +++ b/terraform/gcp/cluster.tf @@ -134,11 +134,11 @@ resource "google_container_node_pool" "notebook" { # config connector and completely hide all node metadata from user pods node_metadata = var.config_connector_enabled ? "GKE_METADATA_SERVER" : "SECURE" } - labels = { + labels = merge({ # Notebook pods and dask schedulers can exist here "hub.jupyter.org/node-purpose" = "user", "k8s.dask.org/node-purpose" = "scheduler", - } + }, each.value.labels) taint = [{ key = "hub.jupyter.org_dedicated" @@ -199,9 +199,9 @@ resource "google_container_node_pool" "dask_worker" { # config connector and completely hide all node metadata from user pods node_metadata = var.config_connector_enabled ? "GKE_METADATA_SERVER" : "SECURE" } - labels = { + labels = merge({ "k8s.dask.org/node-purpose" = "worker", - } + }, each.value.labels) taint = [{ key = "k8s.dask.org_dedicated" diff --git a/terraform/gcp/projects/pilot-hubs.tfvars b/terraform/gcp/projects/pilot-hubs.tfvars index 4d566b6b83..75bc83c47b 100644 --- a/terraform/gcp/projects/pilot-hubs.tfvars +++ b/terraform/gcp/projects/pilot-hubs.tfvars @@ -13,16 +13,34 @@ notebook_nodes = { "user" : { min : 0, max : 20, - machine_type : "e2-highmem-4" + machine_type : "e2-highmem-4", + labels: { } }, + "ohw": { + min: 0, + max: 50, + machine_type: "n1-highmem-4", + labels: { + "2i2c.org/community": "ohw" + }, + } } dask_nodes = { "worker" : { min : 0, max : 100, - machine_type : "e2-highmem-4" + machine_type : "e2-highmem-4", + labels: { } }, + "ohw": { + min: 0, + max: 100, + machine_type: "n1-highmem-4", + labels: { + "2i2c.org/community": "ohw" + }, + } } user_buckets = [] diff --git a/terraform/gcp/variables.tf b/terraform/gcp/variables.tf index 2d8704e04b..b7868c0c50 100644 --- a/terraform/gcp/variables.tf +++ b/terraform/gcp/variables.tf @@ -24,13 +24,13 @@ variable "project_id" { } variable "notebook_nodes" { - type = map(map(string)) + type = map(object({ min : number, max : number, machine_type : string, labels : map(string) })) description = "Notebook node pools to create" default = {} } variable "dask_nodes" { - type = map(map(string)) + type = map(object({ min : number, max : number, machine_type : string, labels : map(string) })) description = "Dask node pools to create. Defaults to notebook_nodes" default = {} }