Skip to content

Commit

Permalink
Merge pull request 2i2c-org#573 from yuvipanda/oh-2
Browse files Browse the repository at this point in the history
Provision a separate nodepool for ohw
  • Loading branch information
yuvipanda authored Aug 3, 2021
2 parents a22ce16 + 72dd690 commit e828bb5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 10 deletions.
18 changes: 16 additions & 2 deletions config/hubs/2i2c.cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions terraform/gcp/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
22 changes: 20 additions & 2 deletions terraform/gcp/projects/pilot-hubs.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
4 changes: 2 additions & 2 deletions terraform/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
}
Expand Down

0 comments on commit e828bb5

Please sign in to comment.