From a09af34ee572e166f5498825ef98450e3af9ced1 Mon Sep 17 00:00:00 2001 From: tim-allen-ck Date: Wed, 10 Apr 2024 16:44:01 +0100 Subject: [PATCH] update apt-source-list --- .../user_resources/guacamole-azure-linuxvm/porter.yaml | 5 ++++- .../guacamole-azure-linuxvm/terraform/apt_sources_config.yml | 3 +-- .../guacamole-azure-linuxvm/terraform/linuxvm.tf | 1 + .../guacamole-azure-linuxvm/terraform/locals.tf | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/porter.yaml index aa9db48b5..e42264924 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm -version: 0.6.15 +version: 0.6.16 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre @@ -20,6 +20,7 @@ custom: offer: 0001-com-ubuntu-server-jammy sku: 22_04-lts-gen2 version: latest + apt-sku: 22.04 install_ui: true conda_config: false "Ubuntu 20.04 LTS": @@ -28,6 +29,7 @@ custom: offer: 0001-com-ubuntu-server-focal sku: 20_04-lts-gen2 version: latest + apt-sku: 20.04 install_ui: true conda_config: false "Ubuntu 20.04 LTS Data Science VM": @@ -36,6 +38,7 @@ custom: offer: ubuntu-2004 sku: 2004-gen2 version: latest + apt-sku: 20.04 install_ui: true conda_config: true # For information on using custom images, see README.me in the guacamole/user-resources folder diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/apt_sources_config.yml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/apt_sources_config.yml index 43d1d1b7c..6d0dc4e9b 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/apt_sources_config.yml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/apt_sources_config.yml @@ -14,7 +14,6 @@ apt: deb [trusted=yes] $PRIMARY $RELEASE main restricted universe multiverse deb [trusted=yes] $PRIMARY $RELEASE-updates main restricted universe multiverse deb [trusted=yes] $SECURITY $RELEASE main restricted universe multiverse - deb [signed-by=/etc/apt/trusted.gpg.d/microsoft.gpg] ${nexus_proxy_url}/repository/microsoft-apt/ubuntu/22.04/prod $RELEASE main - deb [signed-by=/etc/apt/trusted.gpg.d/microsoft.gpg] ${nexus_proxy_url}/repository/microsoft-apt/ubuntu/20.04/prod $RELEASE main + deb [signed-by=/etc/apt/trusted.gpg.d/microsoft.gpg] ${nexus_proxy_url}/repository/microsoft-apt/ubuntu/${sku}/prod $RELEASE main deb [signed-by=/etc/apt/trusted.gpg.d/microsoft.gpg] ${nexus_proxy_url}/repository/microsoft-apt/repos/edge stable main deb [signed-by=/etc/apt/trusted.gpg.d/docker-archive-keyring.gpg] ${nexus_proxy_url}/repository/docker/ $RELEASE stable diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/linuxvm.tf b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/linuxvm.tf index 247c4f77e..4f286ab65 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/linuxvm.tf +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/linuxvm.tf @@ -131,6 +131,7 @@ data "template_file" "apt_sources_config" { template = file("${path.module}/apt_sources_config.yml") vars = { nexus_proxy_url = local.nexus_proxy_url + sku = local.apt_sku } } diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf index 43a6d5982..56c957e4e 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/locals.tf @@ -15,7 +15,6 @@ locals { tre_user_resource_id = var.tre_resource_id } nexus_proxy_url = "https://nexus-${data.azurerm_public_ip.app_gateway_ip.fqdn}" - # Load VM SKU/image details from porter.yaml porter_yaml = yamldecode(file("${path.module}/../porter.yaml")) vm_sizes = local.porter_yaml["custom"]["vm_sizes"] @@ -26,4 +25,5 @@ locals { # selected_image_source_refs is an array to enable easy use of a dynamic block selected_image_source_refs = lookup(local.selected_image, "source_image_reference", null) == null ? [] : [local.selected_image.source_image_reference] selected_image_source_id = lookup(local.selected_image, "source_image_name", null) == null ? null : "${var.image_gallery_id}/images/${local.selected_image.source_image_name}" + apt_sku = local.selected_image_source_refs[0]["apt-sku"] }