From 9a217af9aeb9e28348f6415e0c79185b8872d38a Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Fri, 19 Nov 2021 14:14:39 +0000 Subject: [PATCH 1/3] Change a conditional to actually create dask pools --- terraform/azure/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/azure/main.tf b/terraform/azure/main.tf index 47143a3bfc..436828949f 100644 --- a/terraform/azure/main.tf +++ b/terraform/azure/main.tf @@ -117,7 +117,7 @@ resource "azurerm_kubernetes_cluster_node_pool" "user_pool" { resource "azurerm_kubernetes_cluster_node_pool" "dask_pool" { # If dask_nodes is set, we use that. If it isn't, we use notebook_nodes. # This lets us set dask_nodes to an empty array to get no dask nodes - for_each = try(var.dask_nodes, var.notebook_nodes) + for_each = length(var.dask_nodes) == 0 ? var.notebook_nodes : var.dask_nodes name = "dask${each.key}" kubernetes_cluster_id = azurerm_kubernetes_cluster.jupyterhub.id From d9cacedc1128d04c32b6f05b40d3f8b4dd9fffa3 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Fri, 19 Nov 2021 14:24:16 +0000 Subject: [PATCH 2/3] Update node labels and taints for dask node pools --- terraform/azure/main.tf | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/terraform/azure/main.tf b/terraform/azure/main.tf index 436828949f..6c0523aa03 100644 --- a/terraform/azure/main.tf +++ b/terraform/azure/main.tf @@ -129,16 +129,12 @@ resource "azurerm_kubernetes_cluster_node_pool" "dask_pool" { vm_size = each.value.vm_size node_labels = { - "hub.jupyter.org/node-purpose" = "user", - "k8s.dask.org/node-purpose" = "scheduler", - # Explicitly set this label, so the cluster autoscaler recognizes it - # Without this, it doesn't seem to bring up nodes in the correct - # nodepool when necessary - "node.kubernetes.io/instance-type" = each.value.vm_size + "k8s.dask.org/node-purpose" = "worker", + "hub.jupyter.org/node-size" = each.value.vm_size } node_taints = [ - "hub.jupyter.org_dedicated=user:NoSchedule" + "k8s.dask.org_dedicated=worker:NoSchedule" ] From 1b60a954c9d8b581af2aa4ceed2dc9ac496abdd8 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Fri, 19 Nov 2021 15:33:16 +0000 Subject: [PATCH 3/3] Turn on JIL's dask nodepools While this creates nodepools, they should be empty and cost nothing. This helps to unblock the CarbonPlan deployment. --- terraform/azure/projects/justiceinnovationlab.tfvars | 3 --- 1 file changed, 3 deletions(-) diff --git a/terraform/azure/projects/justiceinnovationlab.tfvars b/terraform/azure/projects/justiceinnovationlab.tfvars index 9745e48b3c..8f6c5f6961 100644 --- a/terraform/azure/projects/justiceinnovationlab.tfvars +++ b/terraform/azure/projects/justiceinnovationlab.tfvars @@ -29,6 +29,3 @@ notebook_nodes = { vm_size : "Standard_E32s_v4" }, } - -# JIL doesn't use dask-gateway -dask_nodes = {}