From f137aeee54debb581b715c08d21270d3da179e70 Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 19 Mar 2024 12:12:59 +0000 Subject: [PATCH 1/9] Initial Commit --- .../admin-vm/template_schema.json | 3 +- .../gitea/terraform/gitea-webapp.tf | 4 +- .../shared_services/gitea/terraform/locals.tf | 6 +++ .../shared_services/gitea/terraform/mysql.tf | 40 ++++++++----------- .../gitea/terraform/variables.tf | 4 ++ .../workspace_services/gitea/porter.yaml | 2 +- .../gitea/terraform/gitea-webapp.tf | 4 +- .../gitea/terraform/locals.tf | 6 +++ .../gitea/terraform/mysql.tf | 38 ++++++++---------- .../gitea/terraform/variables.tf | 3 ++ .../workspace_services/gitea/version.txt | 2 +- .../mysql/terraform/mysql.tf | 38 ++++++++---------- .../mysql/terraform/outputs.tf | 2 +- 13 files changed, 77 insertions(+), 75 deletions(-) diff --git a/templates/shared_services/admin-vm/template_schema.json b/templates/shared_services/admin-vm/template_schema.json index d644d49be7..129ca5f1c1 100644 --- a/templates/shared_services/admin-vm/template_schema.json +++ b/templates/shared_services/admin-vm/template_schema.json @@ -13,7 +13,8 @@ "Standard_B2s", "Standard_D2s_v3", "Standard_D2s_v4", - "Standard_D2s_v5" + "Standard_D2s_v5", + "Standard_D2s_v6" ], "default": "Standard_B2s", "title": "VM SKU", diff --git a/templates/shared_services/gitea/terraform/gitea-webapp.tf b/templates/shared_services/gitea/terraform/gitea-webapp.tf index f755033e2f..d22f969c77 100644 --- a/templates/shared_services/gitea/terraform/gitea-webapp.tf +++ b/templates/shared_services/gitea/terraform/gitea-webapp.tf @@ -46,9 +46,9 @@ resource "azurerm_linux_web_app" "gitea" { GITEA__database__SSL_MODE = "true" GITEA__database__DB_TYPE = "mysql" - GITEA__database__HOST = azurerm_mysql_server.gitea.fqdn + GITEA__database__HOST = azurerm_mysql_flexible_server.gitea.fqdn GITEA__database__NAME = azurerm_mysql_database.gitea.name - GITEA__database__USER = "${azurerm_mysql_server.gitea.administrator_login}@${azurerm_mysql_server.gitea.fqdn}" + GITEA__database__USER = "${azurerm_mysql_flexible_server.gitea.administrator_login}@${azurerm_mysql_flexible_server.gitea.fqdn}" GITEA__database__PASSWD = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault_secret.db_password.id})" } diff --git a/templates/shared_services/gitea/terraform/locals.tf b/templates/shared_services/gitea/terraform/locals.tf index d5cc148fcf..2fac81037e 100644 --- a/templates/shared_services/gitea/terraform/locals.tf +++ b/templates/shared_services/gitea/terraform/locals.tf @@ -6,6 +6,12 @@ locals { keyvault_name = "kv-${var.tre_id}" version = replace(replace(replace(data.local_file.version.content, "__version__ = \"", ""), "\"", ""), "\n", "") gitea_allowed_fqdns_list = distinct(compact(split(",", replace(var.gitea_allowed_fqdns, " ", "")))) + gitea_sku = { + "GP | 5GB 2vCores" = { value = "GP_Gen5_2" }, + "GP | 5GB 4vCores" = { value = "GP_Gen5_4" }, + "GP | 5GB 6vCores" = { value = "GP_Gen5_6" }, + "GP | 5GB 8vCores" = { value = "GP_Gen5_8" } + } tre_shared_service_tags = { tre_id = var.tre_id tre_shared_service_id = var.tre_resource_id diff --git a/templates/shared_services/gitea/terraform/mysql.tf b/templates/shared_services/gitea/terraform/mysql.tf index 42bea9c4ff..867aa55fdd 100644 --- a/templates/shared_services/gitea/terraform/mysql.tf +++ b/templates/shared_services/gitea/terraform/mysql.tf @@ -6,31 +6,25 @@ resource "random_password" "password" { min_special = 2 } -resource "azurerm_mysql_server" "gitea" { - name = "mysql-${var.tre_id}" - resource_group_name = local.core_resource_group_name - location = data.azurerm_resource_group.rg.location - administrator_login = "mysqladmin" - administrator_login_password = random_password.password.result - sku_name = "GP_Gen5_2" - storage_mb = 5120 - version = "8.0" - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = false - infrastructure_encryption_enabled = false - public_network_access_enabled = false - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" - tags = local.tre_shared_service_tags +resource "azurerm_mysql_flexible_server" "gitea" { + name = "mysql-${var.tre_id}" + resource_group_name = local.core_resource_group_name + location = data.azurerm_resource_group.rg.location + administrator_login = "mysqladmin" + sku_name = local.gitea_sku[var.gitea_sku].value + version = "8.0" + backup_retention_days = 7 + geo_redundant_backup_enabled = false + public_network_access_enabled = false + tags = local.tre_shared_service_tags - lifecycle { ignore_changes = [tags, threat_detection_policy] } + lifecycle { ignore_changes = [tags] } } resource "azurerm_mysql_database" "gitea" { name = "gitea" resource_group_name = local.core_resource_group_name - server_name = azurerm_mysql_server.gitea.name + server_name = azurerm_mysql_flexible_server.gitea.name charset = "utf8" collation = "utf8_unicode_ci" } @@ -41,15 +35,15 @@ moved { } resource "azurerm_private_endpoint" "private_endpoint" { - name = "pe-${azurerm_mysql_server.gitea.name}" + name = "pe-${azurerm_mysql_flexible_server.gitea.name}" location = data.azurerm_resource_group.rg.location resource_group_name = local.core_resource_group_name subnet_id = data.azurerm_subnet.shared.id tags = local.tre_shared_service_tags private_service_connection { - private_connection_resource_id = azurerm_mysql_server.gitea.id - name = "psc-${azurerm_mysql_server.gitea.name}" + private_connection_resource_id = azurerm_mysql_flexible_server.gitea.id + name = "psc-${azurerm_mysql_flexible_server.gitea.name}" subresource_names = ["mysqlServer"] is_manual_connection = false } @@ -63,7 +57,7 @@ resource "azurerm_private_endpoint" "private_endpoint" { } resource "azurerm_key_vault_secret" "db_password" { - name = "${azurerm_mysql_server.gitea.name}-administrator-password" + name = "${azurerm_mysql_flexible_server.gitea.name}-administrator-password" value = random_password.password.result key_vault_id = data.azurerm_key_vault.keyvault.id tags = local.tre_shared_service_tags diff --git a/templates/shared_services/gitea/terraform/variables.tf b/templates/shared_services/gitea/terraform/variables.tf index a71d12ee5b..27a5ea133f 100644 --- a/templates/shared_services/gitea/terraform/variables.tf +++ b/templates/shared_services/gitea/terraform/variables.tf @@ -33,3 +33,7 @@ variable "acr_name" { variable "arm_environment" { type = string } + +variable "gitea_sku" { + type = string +} diff --git a/templates/workspace_services/gitea/porter.yaml b/templates/workspace_services/gitea/porter.yaml index a56ed459a3..2ea450d8b0 100644 --- a/templates/workspace_services/gitea/porter.yaml +++ b/templates/workspace_services/gitea/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-workspace-service-gitea -version: 0.8.7 +version: 0.8.8 description: "A Gitea workspace service" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/gitea/terraform/gitea-webapp.tf b/templates/workspace_services/gitea/terraform/gitea-webapp.tf index 92c0b68ac8..4b8a8c3a01 100644 --- a/templates/workspace_services/gitea/terraform/gitea-webapp.tf +++ b/templates/workspace_services/gitea/terraform/gitea-webapp.tf @@ -56,9 +56,9 @@ resource "azurerm_linux_web_app" "gitea" { GITEA__service__SHOW_REGISTRATION_BUTTON = false GITEA__database__SSL_MODE = "true" GITEA__database__DB_TYPE = "mysql" - GITEA__database__HOST = azurerm_mysql_server.gitea.fqdn + GITEA__database__HOST = azurerm_mysql_flexible_server.gitea.fqdn GITEA__database__NAME = azurerm_mysql_database.gitea.name - GITEA__database__USER = "${azurerm_mysql_server.gitea.administrator_login}@${azurerm_mysql_server.gitea.fqdn}" + GITEA__database__USER = "${azurerm_mysql_flexible_server.gitea.administrator_login}@${azurerm_mysql_flexible_server.gitea.fqdn}" GITEA__database__PASSWD = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault_secret.db_password.id})" } diff --git a/templates/workspace_services/gitea/terraform/locals.tf b/templates/workspace_services/gitea/terraform/locals.tf index 57122a09d3..132d9c3b45 100644 --- a/templates/workspace_services/gitea/terraform/locals.tf +++ b/templates/workspace_services/gitea/terraform/locals.tf @@ -8,6 +8,12 @@ locals { core_resource_group_name = "rg-${var.tre_id}" keyvault_name = lower("kv-${substr(local.workspace_resource_name_suffix, -20, -1)}") version = replace(replace(replace(data.local_file.version.content, "__version__ = \"", ""), "\"", ""), "\n", "") + gitea_sku = { + "GP | 5GB 2vCores" = { value = "GP_Gen5_2" }, + "GP | 5GB 4vCores" = { value = "GP_Gen5_4" }, + "GP | 5GB 6vCores" = { value = "GP_Gen5_6" }, + "GP | 5GB 8vCores" = { value = "GP_Gen5_8" } + } workspace_service_tags = { tre_id = var.tre_id tre_workspace_id = var.workspace_id diff --git a/templates/workspace_services/gitea/terraform/mysql.tf b/templates/workspace_services/gitea/terraform/mysql.tf index ddd855edf4..a2213f15c5 100644 --- a/templates/workspace_services/gitea/terraform/mysql.tf +++ b/templates/workspace_services/gitea/terraform/mysql.tf @@ -6,23 +6,17 @@ resource "random_password" "password" { min_special = 2 } -resource "azurerm_mysql_server" "gitea" { - name = "mysql-${local.service_resource_name_suffix}" - resource_group_name = data.azurerm_resource_group.ws.name - location = data.azurerm_resource_group.ws.location - administrator_login = "mysqladmin" - administrator_login_password = random_password.password.result - sku_name = "GP_Gen5_2" - storage_mb = 5120 - version = "8.0" - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = false - infrastructure_encryption_enabled = false - public_network_access_enabled = false - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" - tags = local.workspace_service_tags +resource "azurerm_mysql_flexible_server" "gitea" { + name = "mysql-${local.service_resource_name_suffix}" + resource_group_name = data.azurerm_resource_group.ws.name + location = data.azurerm_resource_group.ws.location + administrator_login = "mysqladmin" + sku_name = local.gitea_sku[var.gitea_sku].value + version = "8.0" + backup_retention_days = 7 + geo_redundant_backup_enabled = false + public_network_access_enabled = false + tags = local.workspace_service_tags lifecycle { ignore_changes = [tags] } } @@ -30,7 +24,7 @@ resource "azurerm_mysql_server" "gitea" { resource "azurerm_mysql_database" "gitea" { name = "gitea" resource_group_name = data.azurerm_resource_group.ws.name - server_name = azurerm_mysql_server.gitea.name + server_name = azurerm_mysql_flexible_server.gitea.name charset = "utf8" collation = "utf8_unicode_ci" } @@ -41,15 +35,15 @@ moved { } resource "azurerm_private_endpoint" "private_endpoint" { - name = "pe-${azurerm_mysql_server.gitea.name}" + name = "pe-${azurerm_mysql_flexible_server.gitea.name}" location = data.azurerm_resource_group.ws.location resource_group_name = data.azurerm_resource_group.ws.name subnet_id = data.azurerm_subnet.services.id tags = local.workspace_service_tags private_service_connection { - private_connection_resource_id = azurerm_mysql_server.gitea.id - name = "psc-${azurerm_mysql_server.gitea.name}" + private_connection_resource_id = azurerm_mysql_flexible_server.gitea.id + name = "psc-${azurerm_mysql_flexible_server.gitea.name}" subresource_names = ["mysqlServer"] is_manual_connection = false } @@ -63,7 +57,7 @@ resource "azurerm_private_endpoint" "private_endpoint" { } resource "azurerm_key_vault_secret" "db_password" { - name = "${azurerm_mysql_server.gitea.name}-administrator-password" + name = "${azurerm_mysql_flexible_server.gitea.name}-administrator-password" value = random_password.password.result key_vault_id = data.azurerm_key_vault.ws.id tags = local.workspace_service_tags diff --git a/templates/workspace_services/gitea/terraform/variables.tf b/templates/workspace_services/gitea/terraform/variables.tf index 105bb3e014..f976084aa6 100644 --- a/templates/workspace_services/gitea/terraform/variables.tf +++ b/templates/workspace_services/gitea/terraform/variables.tf @@ -24,3 +24,6 @@ variable "gitea_storage_limit" { variable "arm_environment" { type = string } +variable "gitea_sku" { + type = string +} diff --git a/templates/workspace_services/gitea/version.txt b/templates/workspace_services/gitea/version.txt index 906d362f7d..43c4ab0058 100644 --- a/templates/workspace_services/gitea/version.txt +++ b/templates/workspace_services/gitea/version.txt @@ -1 +1 @@ -__version__ = "0.6.0" +__version__ = "0.6.1" diff --git a/templates/workspace_services/mysql/terraform/mysql.tf b/templates/workspace_services/mysql/terraform/mysql.tf index 9c0f387392..cca9e1cb9a 100644 --- a/templates/workspace_services/mysql/terraform/mysql.tf +++ b/templates/workspace_services/mysql/terraform/mysql.tf @@ -6,23 +6,17 @@ resource "random_password" "password" { min_special = 2 } -resource "azurerm_mysql_server" "mysql" { - name = "mysql-${local.service_resource_name_suffix}" - resource_group_name = data.azurerm_resource_group.ws.name - location = data.azurerm_resource_group.ws.location - administrator_login = "mysqladmin" - administrator_login_password = random_password.password.result - sku_name = local.sql_sku[var.sql_sku].value - storage_mb = var.storage_mb - version = "8.0" - auto_grow_enabled = true - backup_retention_days = 7 - geo_redundant_backup_enabled = false - infrastructure_encryption_enabled = false - public_network_access_enabled = false - ssl_enforcement_enabled = true - ssl_minimal_tls_version_enforced = "TLS1_2" - tags = local.workspace_service_tags +resource "azurerm_mysql_flexible_server" "mysql" { + name = "mysql-${local.service_resource_name_suffix}" + resource_group_name = data.azurerm_resource_group.ws.name + location = data.azurerm_resource_group.ws.location + administrator_login = "mysqladmin" + sku_name = local.sql_sku[var.sql_sku].value + version = "8.0" + backup_retention_days = 7 + geo_redundant_backup_enabled = false + public_network_access_enabled = false + tags = local.workspace_service_tags lifecycle { ignore_changes = [tags] } } @@ -30,21 +24,21 @@ resource "azurerm_mysql_server" "mysql" { resource "azurerm_mysql_database" "db" { name = var.db_name resource_group_name = data.azurerm_resource_group.ws.name - server_name = azurerm_mysql_server.mysql.name + server_name = azurerm_mysql_flexible_server.mysql.name charset = "utf8" collation = "utf8_unicode_ci" } resource "azurerm_private_endpoint" "mysql_private_endpoint" { - name = "pe-${azurerm_mysql_server.mysql.name}" + name = "pe-${azurerm_mysql_flexible_server.mysql.name}" location = data.azurerm_resource_group.ws.location resource_group_name = data.azurerm_resource_group.ws.name subnet_id = data.azurerm_subnet.services.id tags = local.workspace_service_tags private_service_connection { - private_connection_resource_id = azurerm_mysql_server.mysql.id - name = "psc-${azurerm_mysql_server.mysql.name}" + private_connection_resource_id = azurerm_mysql_flexible_server.mysql.id + name = "psc-${azurerm_mysql_flexible_server.mysql.name}" subresource_names = ["mysqlServer"] is_manual_connection = false } @@ -58,7 +52,7 @@ resource "azurerm_private_endpoint" "mysql_private_endpoint" { } resource "azurerm_key_vault_secret" "db_password" { - name = "${azurerm_mysql_server.mysql.name}-administrator-password" + name = "${azurerm_mysql_flexible_server.mysql.name}-administrator-password" value = random_password.password.result key_vault_id = data.azurerm_key_vault.ws.id tags = local.workspace_service_tags diff --git a/templates/workspace_services/mysql/terraform/outputs.tf b/templates/workspace_services/mysql/terraform/outputs.tf index 824c5705ab..4b6aaa7fe0 100644 --- a/templates/workspace_services/mysql/terraform/outputs.tf +++ b/templates/workspace_services/mysql/terraform/outputs.tf @@ -1,3 +1,3 @@ output "mysql_fqdn" { - value = azurerm_mysql_server.mysql.fqdn + value = azurerm_mysql_flexible_server.mysql.fqdn } From 2705dfbe22c89cb7b925ef8df621febe0192a94e Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 19 Mar 2024 12:28:37 +0000 Subject: [PATCH 2/9] removing public_network_access_enabled = false --- .../shared_services/gitea/terraform/mysql.tf | 19 +++++++++---------- .../gitea/terraform/mysql.tf | 19 +++++++++---------- .../mysql/terraform/mysql.tf | 19 +++++++++---------- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/templates/shared_services/gitea/terraform/mysql.tf b/templates/shared_services/gitea/terraform/mysql.tf index 867aa55fdd..2881fbfc90 100644 --- a/templates/shared_services/gitea/terraform/mysql.tf +++ b/templates/shared_services/gitea/terraform/mysql.tf @@ -7,16 +7,15 @@ resource "random_password" "password" { } resource "azurerm_mysql_flexible_server" "gitea" { - name = "mysql-${var.tre_id}" - resource_group_name = local.core_resource_group_name - location = data.azurerm_resource_group.rg.location - administrator_login = "mysqladmin" - sku_name = local.gitea_sku[var.gitea_sku].value - version = "8.0" - backup_retention_days = 7 - geo_redundant_backup_enabled = false - public_network_access_enabled = false - tags = local.tre_shared_service_tags + name = "mysql-${var.tre_id}" + resource_group_name = local.core_resource_group_name + location = data.azurerm_resource_group.rg.location + administrator_login = "mysqladmin" + sku_name = local.gitea_sku[var.gitea_sku].value + version = "8.0.21" + backup_retention_days = 7 + geo_redundant_backup_enabled = false + tags = local.tre_shared_service_tags lifecycle { ignore_changes = [tags] } } diff --git a/templates/workspace_services/gitea/terraform/mysql.tf b/templates/workspace_services/gitea/terraform/mysql.tf index a2213f15c5..f05dbe9e0c 100644 --- a/templates/workspace_services/gitea/terraform/mysql.tf +++ b/templates/workspace_services/gitea/terraform/mysql.tf @@ -7,16 +7,15 @@ resource "random_password" "password" { } resource "azurerm_mysql_flexible_server" "gitea" { - name = "mysql-${local.service_resource_name_suffix}" - resource_group_name = data.azurerm_resource_group.ws.name - location = data.azurerm_resource_group.ws.location - administrator_login = "mysqladmin" - sku_name = local.gitea_sku[var.gitea_sku].value - version = "8.0" - backup_retention_days = 7 - geo_redundant_backup_enabled = false - public_network_access_enabled = false - tags = local.workspace_service_tags + name = "mysql-${local.service_resource_name_suffix}" + resource_group_name = data.azurerm_resource_group.ws.name + location = data.azurerm_resource_group.ws.location + administrator_login = "mysqladmin" + sku_name = local.gitea_sku[var.gitea_sku].value + version = "8.0.21" + backup_retention_days = 7 + geo_redundant_backup_enabled = false + tags = local.workspace_service_tags lifecycle { ignore_changes = [tags] } } diff --git a/templates/workspace_services/mysql/terraform/mysql.tf b/templates/workspace_services/mysql/terraform/mysql.tf index cca9e1cb9a..9ae1232ce1 100644 --- a/templates/workspace_services/mysql/terraform/mysql.tf +++ b/templates/workspace_services/mysql/terraform/mysql.tf @@ -7,16 +7,15 @@ resource "random_password" "password" { } resource "azurerm_mysql_flexible_server" "mysql" { - name = "mysql-${local.service_resource_name_suffix}" - resource_group_name = data.azurerm_resource_group.ws.name - location = data.azurerm_resource_group.ws.location - administrator_login = "mysqladmin" - sku_name = local.sql_sku[var.sql_sku].value - version = "8.0" - backup_retention_days = 7 - geo_redundant_backup_enabled = false - public_network_access_enabled = false - tags = local.workspace_service_tags + name = "mysql-${local.service_resource_name_suffix}" + resource_group_name = data.azurerm_resource_group.ws.name + location = data.azurerm_resource_group.ws.location + administrator_login = "mysqladmin" + sku_name = local.sql_sku[var.sql_sku].value + version = "8.0.21" + backup_retention_days = 7 + geo_redundant_backup_enabled = false + tags = local.workspace_service_tags lifecycle { ignore_changes = [tags] } } From 21e982328229cf0c3d2a56042f70ee3734fdbc5e Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 19 Mar 2024 13:35:47 +0000 Subject: [PATCH 3/9] removing extra line --- templates/shared_services/admin-vm/template_schema.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/shared_services/admin-vm/template_schema.json b/templates/shared_services/admin-vm/template_schema.json index 129ca5f1c1..d644d49be7 100644 --- a/templates/shared_services/admin-vm/template_schema.json +++ b/templates/shared_services/admin-vm/template_schema.json @@ -13,8 +13,7 @@ "Standard_B2s", "Standard_D2s_v3", "Standard_D2s_v4", - "Standard_D2s_v5", - "Standard_D2s_v6" + "Standard_D2s_v5" ], "default": "Standard_B2s", "title": "VM SKU", From 5ea5875b95ea96ebc997919d72f570a6c9273392 Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 19 Mar 2024 14:46:41 +0000 Subject: [PATCH 4/9] worked on db sizes and naming --- templates/shared_services/admin-vm/template_schema.json | 5 ++--- templates/shared_services/gitea/parameters.json | 6 ++++++ templates/shared_services/gitea/porter.yaml | 2 +- templates/shared_services/gitea/terraform/locals.tf | 7 +++---- templates/workspace_services/gitea/parameters.json | 6 ++++++ templates/workspace_services/gitea/porter.yaml | 2 +- templates/workspace_services/gitea/terraform/locals.tf | 7 +++---- templates/workspace_services/mysql/porter.yaml | 2 +- templates/workspace_services/mysql/template_schema.json | 7 +++---- templates/workspace_services/mysql/terraform/locals.tf | 7 +++---- 10 files changed, 29 insertions(+), 22 deletions(-) diff --git a/templates/shared_services/admin-vm/template_schema.json b/templates/shared_services/admin-vm/template_schema.json index d644d49be7..c6060555ae 100644 --- a/templates/shared_services/admin-vm/template_schema.json +++ b/templates/shared_services/admin-vm/template_schema.json @@ -11,9 +11,8 @@ "type": "string", "enum": [ "Standard_B2s", - "Standard_D2s_v3", - "Standard_D2s_v4", - "Standard_D2s_v5" + "Standard_D2ads_v5", + "Standard_E2ds_v4" ], "default": "Standard_B2s", "title": "VM SKU", diff --git a/templates/shared_services/gitea/parameters.json b/templates/shared_services/gitea/parameters.json index 71aebc5306..f9ba6dc560 100755 --- a/templates/shared_services/gitea/parameters.json +++ b/templates/shared_services/gitea/parameters.json @@ -45,6 +45,12 @@ "source": { "env": "ARM_ENVIRONMENT" } + }, + { + "name": "gitea_sku", + "source": { + "env": "GITEA_SKU" + } } ] } diff --git a/templates/shared_services/gitea/porter.yaml b/templates/shared_services/gitea/porter.yaml index 0133a6d015..0bc035cad5 100644 --- a/templates/shared_services/gitea/porter.yaml +++ b/templates/shared_services/gitea/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-shared-service-gitea -version: 0.6.10 +version: 0.6.11 description: "A Gitea shared service" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/shared_services/gitea/terraform/locals.tf b/templates/shared_services/gitea/terraform/locals.tf index 2fac81037e..4d4dd37353 100644 --- a/templates/shared_services/gitea/terraform/locals.tf +++ b/templates/shared_services/gitea/terraform/locals.tf @@ -7,10 +7,9 @@ locals { version = replace(replace(replace(data.local_file.version.content, "__version__ = \"", ""), "\"", ""), "\n", "") gitea_allowed_fqdns_list = distinct(compact(split(",", replace(var.gitea_allowed_fqdns, " ", "")))) gitea_sku = { - "GP | 5GB 2vCores" = { value = "GP_Gen5_2" }, - "GP | 5GB 4vCores" = { value = "GP_Gen5_4" }, - "GP | 5GB 6vCores" = { value = "GP_Gen5_6" }, - "GP | 5GB 8vCores" = { value = "GP_Gen5_8" } + "B | 4GB 2vCores" = { value = "Standard_B2s" }, + "GP | 8GB 2vCores" = { value = "Standard_D2ads_v5" }, + "BC | 16GB 2vCores" = { value = "Standard_E2ds_v4" } } tre_shared_service_tags = { tre_id = var.tre_id diff --git a/templates/workspace_services/gitea/parameters.json b/templates/workspace_services/gitea/parameters.json index 446a3685f4..840216ba5f 100755 --- a/templates/workspace_services/gitea/parameters.json +++ b/templates/workspace_services/gitea/parameters.json @@ -63,6 +63,12 @@ "source": { "env": "ARM_ENVIRONMENT" } + }, + { + "name": "gitea_sku", + "source": { + "env": "GITEA_SKU" + } } ] } diff --git a/templates/workspace_services/gitea/porter.yaml b/templates/workspace_services/gitea/porter.yaml index 2ea450d8b0..3fab177819 100644 --- a/templates/workspace_services/gitea/porter.yaml +++ b/templates/workspace_services/gitea/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-workspace-service-gitea -version: 0.8.8 +version: 0.8.9 description: "A Gitea workspace service" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/gitea/terraform/locals.tf b/templates/workspace_services/gitea/terraform/locals.tf index 132d9c3b45..7879a5b385 100644 --- a/templates/workspace_services/gitea/terraform/locals.tf +++ b/templates/workspace_services/gitea/terraform/locals.tf @@ -9,10 +9,9 @@ locals { keyvault_name = lower("kv-${substr(local.workspace_resource_name_suffix, -20, -1)}") version = replace(replace(replace(data.local_file.version.content, "__version__ = \"", ""), "\"", ""), "\n", "") gitea_sku = { - "GP | 5GB 2vCores" = { value = "GP_Gen5_2" }, - "GP | 5GB 4vCores" = { value = "GP_Gen5_4" }, - "GP | 5GB 6vCores" = { value = "GP_Gen5_6" }, - "GP | 5GB 8vCores" = { value = "GP_Gen5_8" } + "B | 4GB 2vCores" = { value = "Standard_B2s" }, + "GP | 8GB 2vCores" = { value = "Standard_D2ads_v5" }, + "BC | 16GB 2vCores" = { value = "Standard_E2ds_v4" } } workspace_service_tags = { tre_id = var.tre_id diff --git a/templates/workspace_services/mysql/porter.yaml b/templates/workspace_services/mysql/porter.yaml index fd665488b8..9df674bae3 100644 --- a/templates/workspace_services/mysql/porter.yaml +++ b/templates/workspace_services/mysql/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-workspace-service-mysql -version: 0.4.5 +version: 0.4.6 description: "A MySQL workspace service" registry: azuretre dockerfile: Dockerfile.tmpl diff --git a/templates/workspace_services/mysql/template_schema.json b/templates/workspace_services/mysql/template_schema.json index 5513e5f115..4410c01d71 100644 --- a/templates/workspace_services/mysql/template_schema.json +++ b/templates/workspace_services/mysql/template_schema.json @@ -12,10 +12,9 @@ "title": "MySQL server SKU", "description": "MySQL server SKU", "enum": [ - "GP | 5GB 2vCores", - "GP | 5GB 4vCores", - "GP | 5GB 6vCores", - "GP | 5GB 8vCores" + "B | 4GB 2vCores", + "GP | 8GB 2vCores", + "BC | 16GB 2vCores" ], "default": "GP | 5GB 2vCores" }, diff --git a/templates/workspace_services/mysql/terraform/locals.tf b/templates/workspace_services/mysql/terraform/locals.tf index d666bfa202..d1d6a926bd 100644 --- a/templates/workspace_services/mysql/terraform/locals.tf +++ b/templates/workspace_services/mysql/terraform/locals.tf @@ -6,10 +6,9 @@ locals { keyvault_name = lower("kv-${substr(local.workspace_resource_name_suffix, -20, -1)}") core_resource_group_name = "rg-${var.tre_id}" sql_sku = { - "GP | 5GB 2vCores" = { value = "GP_Gen5_2" }, - "GP | 5GB 4vCores" = { value = "GP_Gen5_4" }, - "GP | 5GB 6vCores" = { value = "GP_Gen5_6" }, - "GP | 5GB 8vCores" = { value = "GP_Gen5_8" } + "B | 4GB 2vCores" = { value = "Standard_B2s" }, + "GP | 8GB 2vCores" = { value = "Standard_D2ads_v5" }, + "BC | 16GB 2vCores" = { value = "Standard_E2ds_v4" } } workspace_service_tags = { tre_id = var.tre_id From 63cd8bf4ee3f0f970393446e7762bbd6e1da5b4c Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 19 Mar 2024 15:01:14 +0000 Subject: [PATCH 5/9] gitea_sku updates --- templates/shared_services/gitea/porter.yaml | 5 +++++ templates/workspace_services/gitea/porter.yaml | 5 +++++ templates/workspace_services/mysql/porter.yaml | 2 +- templates/workspace_services/mysql/template_schema.json | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/shared_services/gitea/porter.yaml b/templates/shared_services/gitea/porter.yaml index 0bc035cad5..7ca1838170 100644 --- a/templates/shared_services/gitea/porter.yaml +++ b/templates/shared_services/gitea/porter.yaml @@ -51,6 +51,9 @@ parameters: env: ARM_ENVIRONMENT type: string default: "public" + - name: gitea_sku + type: string + default: "B | 4GB 2vCores" mixins: - terraform: @@ -89,6 +92,7 @@ install: mgmt_resource_group_name: ${ bundle.parameters.tfstate_resource_group_name } acr_name: ${ bundle.parameters.mgmt_acr_name } arm_environment: ${ bundle.parameters.arm_environment } + gitea_sku: ${ bundle.parameters.gitea_sku } backendConfig: resource_group_name: ${ bundle.parameters.tfstate_resource_group_name } storage_account_name: ${ bundle.parameters.tfstate_storage_account_name } @@ -129,6 +133,7 @@ uninstall: mgmt_resource_group_name: ${ bundle.parameters.tfstate_resource_group_name } acr_name: ${ bundle.parameters.mgmt_acr_name } arm_environment: ${ bundle.parameters.arm_environment } + gitea_sku: ${ bundle.parameters.gitea_sku } backendConfig: resource_group_name: ${ bundle.parameters.tfstate_resource_group_name } storage_account_name: ${ bundle.parameters.tfstate_storage_account_name } diff --git a/templates/workspace_services/gitea/porter.yaml b/templates/workspace_services/gitea/porter.yaml index 3fab177819..88e376b8d1 100644 --- a/templates/workspace_services/gitea/porter.yaml +++ b/templates/workspace_services/gitea/porter.yaml @@ -60,6 +60,9 @@ parameters: env: ARM_ENVIRONMENT type: string default: "public" + - name: gitea_sku + type: string + default: "B | 4GB 2vCores" - name: aad_authority_url type: string default: "https://login.microsoftonline.com" @@ -102,6 +105,7 @@ install: mgmt_resource_group_name: ${ bundle.parameters.mgmt_resource_group_name } aad_authority_url: ${ bundle.parameters.aad_authority_url } arm_environment: ${ bundle.parameters.arm_environment } + gitea_sku: ${ bundle.parameters.gitea_sku } backendConfig: resource_group_name: ${ bundle.parameters.tfstate_resource_group_name } storage_account_name: ${ bundle.parameters.tfstate_storage_account_name } @@ -146,6 +150,7 @@ uninstall: mgmt_resource_group_name: ${ bundle.parameters.mgmt_resource_group_name } aad_authority_url: ${ bundle.parameters.aad_authority_url } arm_environment: ${ bundle.parameters.arm_environment } + gitea_sku: ${ bundle.parameters.gitea_sku } backendConfig: resource_group_name: ${ bundle.parameters.tfstate_resource_group_name } storage_account_name: ${ bundle.parameters.tfstate_storage_account_name } diff --git a/templates/workspace_services/mysql/porter.yaml b/templates/workspace_services/mysql/porter.yaml index 9df674bae3..1f020a5470 100644 --- a/templates/workspace_services/mysql/porter.yaml +++ b/templates/workspace_services/mysql/porter.yaml @@ -47,7 +47,7 @@ parameters: default: "public" - name: sql_sku type: string - default: "GP | 5GB 2vCores" + default: "B | 4GB 2vCores" - name: storage_mb type: integer default: 5120 diff --git a/templates/workspace_services/mysql/template_schema.json b/templates/workspace_services/mysql/template_schema.json index 4410c01d71..5182879012 100644 --- a/templates/workspace_services/mysql/template_schema.json +++ b/templates/workspace_services/mysql/template_schema.json @@ -16,7 +16,7 @@ "GP | 8GB 2vCores", "BC | 16GB 2vCores" ], - "default": "GP | 5GB 2vCores" + "default": "B | 4GB 2vCores" }, "storage_mb": { "$id": "#/properties/storage_mb", From c48bba3b29d0de3e6a33f50f4b6a670b2ba8a6f2 Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Mon, 25 Mar 2024 09:21:06 +0000 Subject: [PATCH 6/9] Update version in porter.yaml and revert options in template_schema --- templates/shared_services/admin-vm/template_schema.json | 5 +++-- templates/shared_services/gitea/porter.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/shared_services/admin-vm/template_schema.json b/templates/shared_services/admin-vm/template_schema.json index c6060555ae..d644d49be7 100644 --- a/templates/shared_services/admin-vm/template_schema.json +++ b/templates/shared_services/admin-vm/template_schema.json @@ -11,8 +11,9 @@ "type": "string", "enum": [ "Standard_B2s", - "Standard_D2ads_v5", - "Standard_E2ds_v4" + "Standard_D2s_v3", + "Standard_D2s_v4", + "Standard_D2s_v5" ], "default": "Standard_B2s", "title": "VM SKU", diff --git a/templates/shared_services/gitea/porter.yaml b/templates/shared_services/gitea/porter.yaml index 7ca1838170..687d275722 100644 --- a/templates/shared_services/gitea/porter.yaml +++ b/templates/shared_services/gitea/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-shared-service-gitea -version: 0.6.11 +version: 1.0.0 description: "A Gitea shared service" dockerfile: Dockerfile.tmpl registry: azuretre From 7b7b0c141273ad77b8a9dec7edd1eda503186943 Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 26 Mar 2024 10:55:46 +0000 Subject: [PATCH 7/9] tweak --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4bcb9bcc3e..ed842400b3 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ **Azure TRE documentation site**: ## Background + Across the health industry, be it a pharmaceutical company interrogating clinical trial results, or a public health provider analyzing electronic health records, there is the need to enable researchers, analysts, and developers to work with sensitive data sets. @@ -18,6 +19,7 @@ This project is typically implemented alongside a data platform that provides re TREs are not “one size fits all”, hence although the Azure TRE has a number of out of the box features, the project has been built be extensible, and hence tooling and data platform agnostic. Core features include: + - Self-service workspace management for TRE administrators - Self-service provisioning of research tooling for research teams - Package and repository mirroring - PyPi, R-CRAN, Apt and more. @@ -25,7 +27,7 @@ Core features include: - Azure Active Directory integration - Airlock - import and export - Cost reporting -- Ready to workspace templates including: +- Ready to workspace templates including: - Restricted with data exfiltration control - Unrestricted for open data - Ready to go workspace service templates including: @@ -36,7 +38,7 @@ Core features include: ## Project Status and Support -***This project's code base is still under development and breaking changes will happen. Whilst the maintainers will do our best to minimise disruption to existing deployments, this may not always be possible. Stable releases will be published when the project is more mature.*** +**_This project's code base is still under development and breaking changes will happen. Whilst the maintainers will do our best to minimise disruption to existing deployments, this may not always be possible. Stable releases will be published when the project is more mature._** The aim is to bring together learnings from past customer engagements where TREs have been built into a single reference solution. This is a solution accelerator aiming to be a great starting point for a customized TRE solution. You're encouraged to download and customize the solution to meet your requirements @@ -46,7 +48,7 @@ It is important before deployment of the solution that the [Support Policy](SUPP ## Contributing -This project welcomes contributions and suggestions. Most contributions require you to agree to a +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [https://cla.opensource.microsoft.com](https://cla.opensource.microsoft.com). @@ -66,7 +68,6 @@ This project may contain trademarks or logos for projects, products, or services Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies. - ## Repository structure ```text From 74c4c68e1bc686e2ac3b28b8c28d3e71e8ff04be Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 26 Mar 2024 10:57:32 +0000 Subject: [PATCH 8/9] tweak --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ed842400b3..2b80d869b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Azure Trusted Research Environment -**Azure TRE documentation site**: +**Azure TRE documentation site\***: ## Background From e7d642e3d9fc277cd808ee86ead43da17daf1546 Mon Sep 17 00:00:00 2001 From: nasaldrops Date: Tue, 26 Mar 2024 10:59:17 +0000 Subject: [PATCH 9/9] tweak --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b80d869b7..ed842400b3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Azure Trusted Research Environment -**Azure TRE documentation site\***: +**Azure TRE documentation site**: ## Background