From b20bb81121b28d411573f7c8d25c8bab3963a3f9 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 8 Dec 2021 18:07:16 +0200 Subject: [PATCH 1/5] Enable NFS 4 for the toronto hub --- terraform/azure/projects/utoronto.tfvars | 1 + terraform/azure/storage.tf | 1 + 2 files changed, 2 insertions(+) diff --git a/terraform/azure/projects/utoronto.tfvars b/terraform/azure/projects/utoronto.tfvars index 6a38f3b50b..68f96798b7 100644 --- a/terraform/azure/projects/utoronto.tfvars +++ b/terraform/azure/projects/utoronto.tfvars @@ -5,6 +5,7 @@ ssh_pub_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQJ4h39UYNi1wybxAH+jCFkNK2a global_container_registry_name = "2i2cutorontohubregistry" global_storage_account_name = "2i2cutorontohubstorage" +storage_protocol = "NFS" location = "canadacentral" diff --git a/terraform/azure/storage.tf b/terraform/azure/storage.tf index 8132fdd147..c84b5b5dcc 100644 --- a/terraform/azure/storage.tf +++ b/terraform/azure/storage.tf @@ -11,6 +11,7 @@ resource "azurerm_storage_share" "homes" { name = "homes" storage_account_name = azurerm_storage_account.homes.name quota = 100 + enabled_protocol = var.storage_protocol ? var.storage_protocol : "SBM" } resource "kubernetes_namespace" "homes" { From 4c62400a6b05503eae1e64f31abbccba1e0b5581 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 8 Dec 2021 18:29:40 +0200 Subject: [PATCH 2/5] Fix typo --- terraform/azure/storage.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/azure/storage.tf b/terraform/azure/storage.tf index c84b5b5dcc..bd33ab9d20 100644 --- a/terraform/azure/storage.tf +++ b/terraform/azure/storage.tf @@ -11,7 +11,7 @@ resource "azurerm_storage_share" "homes" { name = "homes" storage_account_name = azurerm_storage_account.homes.name quota = 100 - enabled_protocol = var.storage_protocol ? var.storage_protocol : "SBM" + enabled_protocol = var.storage_protocol ? var.storage_protocol : "SMB" } resource "kubernetes_namespace" "homes" { From 9dbd7c165e827335ee178bff6f34c3b46c11a3e2 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Thu, 9 Dec 2021 11:19:16 +0200 Subject: [PATCH 3/5] Declare the terraform storage_protocol var --- terraform/azure/storage.tf | 2 +- terraform/azure/variables.tf | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/terraform/azure/storage.tf b/terraform/azure/storage.tf index bd33ab9d20..f0e98d4ced 100644 --- a/terraform/azure/storage.tf +++ b/terraform/azure/storage.tf @@ -11,7 +11,7 @@ resource "azurerm_storage_share" "homes" { name = "homes" storage_account_name = azurerm_storage_account.homes.name quota = 100 - enabled_protocol = var.storage_protocol ? var.storage_protocol : "SMB" + enabled_protocol = var.storage_protocol } resource "kubernetes_namespace" "homes" { diff --git a/terraform/azure/variables.tf b/terraform/azure/variables.tf index a8c43be841..6e326fad27 100644 --- a/terraform/azure/variables.tf +++ b/terraform/azure/variables.tf @@ -115,3 +115,15 @@ variable "create_service_principal" { Principals for UToronto. EOT } + +variable "storage_protocol" { + type = string + default = "SMB" + description = <<-EOT + The protocol used for the share. Possible values are SMB and NFS. + + The SMB indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. + The NFS indicates the share can be accessed by NFSv4.1. Defaults to SMB. + Changing this forces a new resource to be created. + EOT +} From e44ca0d16ab60bfef48e10fb434af9406cb1b6c4 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Thu, 9 Dec 2021 13:19:23 +0200 Subject: [PATCH 4/5] Revert azurerm to 2.87.0 since this was the default before --- 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 b2adb3c3bd..00efff717d 100644 --- a/terraform/azure/main.tf +++ b/terraform/azure/main.tf @@ -3,7 +3,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "2.86.0" + version = "2.87.0" } azuread = { From a5d36267db2c85f94bfa335cbae6b1d55717b3f7 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Thu, 9 Dec 2021 13:57:48 +0200 Subject: [PATCH 5/5] Go with default storage_protocol for toronto --- terraform/azure/projects/utoronto.tfvars | 1 - 1 file changed, 1 deletion(-) diff --git a/terraform/azure/projects/utoronto.tfvars b/terraform/azure/projects/utoronto.tfvars index 68f96798b7..6a38f3b50b 100644 --- a/terraform/azure/projects/utoronto.tfvars +++ b/terraform/azure/projects/utoronto.tfvars @@ -5,7 +5,6 @@ ssh_pub_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQJ4h39UYNi1wybxAH+jCFkNK2a global_container_registry_name = "2i2cutorontohubregistry" global_storage_account_name = "2i2cutorontohubstorage" -storage_protocol = "NFS" location = "canadacentral"