Skip to content

Commit

Permalink
Merge pull request #2624 from yuvipanda/azure-fixes
Browse files Browse the repository at this point in the history
Cleanup Azure terraform
  • Loading branch information
yuvipanda authored Jun 7, 2023
2 parents 5b276c1 + 5f848d4 commit f9821be
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
8 changes: 6 additions & 2 deletions terraform/azure/projects/utoronto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ tenant_id = "78aac226-2f03-4b4d-9037-b46d56c55210"
subscription_id = "ead3521a-d994-4a44-a68d-b16e35642d5b"
resourcegroup_name = "2i2c-utoronto-cluster"


kubernetes_version = "1.26.3"

storage_size = 5120
storage_protocol = "NFS"

ssh_pub_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQJ4h39UYNi1wybxAH+jCFkNK2aqRcuhDkQSMx0Hak5xkbt3KnT3cOwAgUP1Vt/SjhltSTuxpOHxiAKCRnjwRk60SxKhUNzPHih2nkfYTmBBjmLfdepDPSke/E0VWvTDIEXz/L8vW8aI0QGPXnXyqzEDO9+U1buheBlxB0diFAD3vEp2SqBOw+z7UgrGxXPdP+2b3AV+X6sOtd6uSzpV8Qvdh+QAkd4r7h9JrkFvkrUzNFAGMjlTb0Lz7qAlo4ynjEwzVN2I1i7cVDKgsGz9ZG/8yZfXXx+INr9jYtYogNZ63ajKR/dfjNPovydhuz5zQvQyxpokJNsTqt1CiWEUNj georgiana@georgiana"
Expand All @@ -10,11 +14,11 @@ global_container_registry_name = "2i2cutorontohubregistry"
global_storage_account_name = "2i2cutorontohubstorage"

location = "canadacentral"

core_node_vm_size = "Standard_E4s_v3"
notebook_nodes = {
"default" : {
min : 1,
max : 100,
vm_size : "Standard_E8s_v3"
vm_size : "Standard_E8s_v3",
}
}
2 changes: 1 addition & 1 deletion terraform/azure/storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "azurerm_storage_account" "homes" {
resource "azurerm_storage_share" "homes" {
name = "homes"
storage_account_name = azurerm_storage_account.homes.name
quota = 100
quota = var.storage_size
enabled_protocol = var.storage_protocol
lifecycle {
# Additional safeguard against deleting the share
Expand Down
28 changes: 24 additions & 4 deletions terraform/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ variable "location" {

variable "kubernetes_version" {
type = string
default = "1.20.7"
description = <<-EOT
Version of kubernetes the cluster should use.
Expand All @@ -48,9 +47,9 @@ variable "kubernetes_version" {
EOT
}


variable "core_node_vm_size" {
type = string
default = "Standard_E4s_v3"
description = <<-EOT
VM Size to use for core nodes
Expand Down Expand Up @@ -94,13 +93,27 @@ variable "ssh_pub_key" {
}

variable "notebook_nodes" {
type = map(object({ min : number, max : number, vm_size : string, labels : map(string), taints : list(string), kubernetes_version : string }))
type = map(object({
min : number,
max : number,
vm_size : string,
labels : optional(map(string), {}),
taints : optional(list(string), []),
kubernetes_version : optional(string, "")
}))
description = "Notebook node pools to create"
default = {}
}

variable "dask_nodes" {
type = map(object({ min : number, max : number, vm_size : string, labels : map(string), taints : list(string), kubernetes_version : string }))
type = map(object({
min : number,
max : number,
vm_size : string,
labels : optional(map(string), {}),
taints : optional(list(string), []),
kubernetes_version : optional(string, "")
}))
description = "Dask node pools to create"
default = {}
}
Expand All @@ -127,3 +140,10 @@ variable "storage_protocol" {
Changing this forces a new resource to be created.
EOT
}

variable "storage_size" {
type = number
description = <<-EOT
Size (in GB) of the storage to provision
EOT
}

0 comments on commit f9821be

Please sign in to comment.