From d7cdb112d4b2bb9623cf06be8c25caf75109969a Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Wed, 27 Nov 2024 13:59:19 +0000 Subject: [PATCH 01/17] initial edit --- templates/workspace_services/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/workspace_services/README.md b/templates/workspace_services/README.md index 6fa1da1..80f0ea1 100644 --- a/templates/workspace_services/README.md +++ b/templates/workspace_services/README.md @@ -19,6 +19,7 @@ Workspace Templates are located in this folder. These Templates are for the Comp | 16 CPU | 64GB | £1.25 / hour | Standard_D16s_v5 | 6 CPU - 112GB RAM | 1 GPU - 16GB | £3.21 / hour | Standard_NC6s_v3 | 12 CPU - 224GB RAM | 2 GPU - 32GB | £6.42 / hour | Standard_NC12s_v3 + | ## Current VM Image options From 0bd63a7ab914ed7b77e8111de583638ee6a4d201 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Wed, 27 Nov 2024 13:59:53 +0000 Subject: [PATCH 02/17] initial edit --- templates/workspace_services/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/workspace_services/README.md b/templates/workspace_services/README.md index 80f0ea1..9c55b6d 100644 --- a/templates/workspace_services/README.md +++ b/templates/workspace_services/README.md @@ -17,6 +17,7 @@ Workspace Templates are located in this folder. These Templates are for the Comp | 8 CPU | 32GB | £0.65 / hour | Standard_D8s_v5 | 8 CPU | 64GB | £0.75 / hour | Standard_E8as_v4 | 16 CPU | 64GB | £1.25 / hour | Standard_D16s_v5 + | | 6 CPU - 112GB RAM | 1 GPU - 16GB | £3.21 / hour | Standard_NC6s_v3 | 12 CPU - 224GB RAM | 2 GPU - 32GB | £6.42 / hour | Standard_NC12s_v3 | From 20c26cccab5719b3de7f7fa3b24b5abaa8900deb Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Wed, 27 Nov 2024 14:39:31 +0000 Subject: [PATCH 03/17] Additional VM size --- .../user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml | 3 ++- .../guacamole-azure-linuxvm-ouh2/template_schema.json | 1 + .../user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml | 3 ++- .../guacamole-azure-windowsvm-ouh2/template_schema.json | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index eec4c85..58adb14 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.16 +version: 1.0.2 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre @@ -15,6 +15,7 @@ custom: "8 CPU | 32GB RAM | £0.35 / hour": Standard_D8s_v5 "8 CPU | 64GB RAM | £0.45 / hour": Standard_E8as_v4 "16 CPU | 64GB RAM | £0.65 / hour": Standard_D16s_v5 + "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.48 / hour": Standard_NC4as_T4_v3 "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £2.98 / hour": Standard_NC6s_v3 "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £5.96 / hour": Standard_NC12s_v3 image_options: diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json index 6d64652..47c6b0b 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json @@ -31,6 +31,7 @@ "8 CPU | 32GB RAM | £0.35 / hour", "8 CPU | 64GB RAM | £0.45 / hour", "16 CPU | 64GB RAM | £0.65 / hour", + "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.48 / hour", "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £2.98 / hour", "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £5.96 / hour" ], diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml index e674527..0a975c6 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-windowsvm-ouh2 -version: 1.0.3 +version: 1.0.4 description: "An Azure TRE User Resource Template for Guacamole (Windows 10)" dockerfile: Dockerfile.tmpl registry: azuretre @@ -15,6 +15,7 @@ custom: "8 CPU | 32GB RAM | £0.65 / hour": Standard_D8s_v5 "8 CPU | 64GB RAM | £0.75 / hour": Standard_E8as_v4 "16 CPU | 64GB RAM | £1.25 / hour": Standard_D16s_v5 + "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.62 / hour": Standard_NC4as_T4_v3 "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £3.21 / hour": Standard_NC6s_v3 "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £6.42 / hour": Standard_NC12s_v3 image_options: diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json index de6057c..08548e8 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json @@ -33,6 +33,7 @@ "8 CPU | 32GB RAM | £0.65 / hour", "8 CPU | 64GB RAM | £0.75 / hour", "16 CPU | 64GB RAM | £1.25 / hour", + "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.62 / hour", "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £3.21 / hour", "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £6.42 / hour" ], From bec76bfba421018ddb6ee718b1aae69a3fd0df21 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Thu, 12 Dec 2024 09:30:58 +0000 Subject: [PATCH 04/17] update size and linux fixes --- .../guacamole-azure-linuxvm-ouh2/porter.yaml | 8 ++++---- .../template_schema.json | 6 +++--- .../terraform/vm_config.sh | 18 +++++++++++++++--- .../guacamole-azure-windowsvm-ouh2/porter.yaml | 8 ++++---- .../template_schema.json | 2 +- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 58adb14..83b6f42 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.2 +version: 1.0.3 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre @@ -15,9 +15,9 @@ custom: "8 CPU | 32GB RAM | £0.35 / hour": Standard_D8s_v5 "8 CPU | 64GB RAM | £0.45 / hour": Standard_E8as_v4 "16 CPU | 64GB RAM | £0.65 / hour": Standard_D16s_v5 - "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.48 / hour": Standard_NC4as_T4_v3 - "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £2.98 / hour": Standard_NC6s_v3 - "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £5.96 / hour": Standard_NC12s_v3 + "6 CPU - 55GB RAM | 1 A10 GPU - 4GB RAM | £0.45 / hour": Standard_NV6ads_A10_v5 + "6 CPU - 112GB RAM | 1 V100 GPU - 16GB RAM | £3 / hour": Standard_NC6s_v3 + "12 CPU - 224GB RAM | 2 V100 GPU - 32GB RAM | £6 / hour": Standard_NC12s_v3 image_options: "Ubuntu 22.04 LTS": source_image_reference: diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json index 47c6b0b..ce82e62 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/template_schema.json @@ -31,9 +31,9 @@ "8 CPU | 32GB RAM | £0.35 / hour", "8 CPU | 64GB RAM | £0.45 / hour", "16 CPU | 64GB RAM | £0.65 / hour", - "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.48 / hour", - "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £2.98 / hour", - "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £5.96 / hour" + "6 CPU - 55GB RAM | 1 A10 GPU - 4GB RAM | £0.45 / hour", + "6 CPU - 112GB RAM | 1 V100 GPU - 16GB RAM | £3 / hour", + "12 CPU - 224GB RAM | 2 V100 GPU - 32GB RAM | £6 / hour" ], "updateable": true }, diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index 392e1b3..bd4b7f1 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -24,13 +24,25 @@ DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure sudo apt install -y xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils echo /usr/sbin/gdm3 > /etc/X11/default-display-manager +# Disable lock screen via GNOME lockdown settings +gsettings set org.gnome.desktop.lockdown disable-lock-screen true + ## Install xrdp so Guacamole can connect via RDP echo "init_vm.sh: xrdp" sudo apt install -y xrdp xorgxrdp xfce4-session sudo adduser xrdp ssl-cert sudo -u "${VM_USER}" -i bash -c 'echo xfce4-session > ~/.xsession' -sudo -u "${VM_USER}" -i bash -c 'echo xset s off >> ~/.xsession' -sudo -u "${VM_USER}" -i bash -c 'echo xset -dpms >> ~/.xsession' +sudo -u "${VM_USER}" -i bash -c 'echo xset s off >> ~/.xsession' # Disable screensaver timeout +sudo -u "${VM_USER}" -i bash -c 'echo xset -dpms >> ~/.xsession' # Disable DPMS screen power management + +# Disable the lock screen in xfce4-power-manager +echo "Disabling lock screen in xfce4-power-manager" +sudo -u "${VM_USER}" bash -c 'echo "" >> ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml' + +# Disable lock screen in xfce4-screensaver +echo "Disabling lock screen in xfce4-screensaver" +sudo -u "${VM_USER}" bash -c 'echo "[Xfce4Screensaver]" > ~/.config/xfce4/xfce4-screensaver/settings.conf' +sudo -u "${VM_USER}" bash -c 'echo "lock-enabled=false" >> ~/.config/xfce4/xfce4-screensaver/settings.conf' # Make sure xrdp service starts up with the system sudo systemctl enable xrdp @@ -107,7 +119,7 @@ if [ "${SHARED_STORAGE_ACCESS}" -eq 1 ]; then sudo chmod 600 "$smbCredentialFile" # Configure autofs - echo "$fileShareName -fstype=cifs,rw,dir_mode=0777,credentials=$smbCredentialFile :$smbPath" | sudo tee /etc/auto.fileshares > /dev/null + echo "$fileShareName -fstype=cifs,rw,file_mode=0777,dir_mode=0777,credentials=$smbCredentialFile :$smbPath" | sudo tee /etc/auto.fileshares > /dev/null echo "$mntRoot /etc/auto.fileshares --timeout=60" | sudo tee /etc/auto.master > /dev/null # Restart service to register changes diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml index 0a975c6..495da1a 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-windowsvm-ouh2 -version: 1.0.4 +version: 1.0.5 description: "An Azure TRE User Resource Template for Guacamole (Windows 10)" dockerfile: Dockerfile.tmpl registry: azuretre @@ -15,9 +15,9 @@ custom: "8 CPU | 32GB RAM | £0.65 / hour": Standard_D8s_v5 "8 CPU | 64GB RAM | £0.75 / hour": Standard_E8as_v4 "16 CPU | 64GB RAM | £1.25 / hour": Standard_D16s_v5 - "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.62 / hour": Standard_NC4as_T4_v3 - "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £3.21 / hour": Standard_NC6s_v3 - "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £6.42 / hour": Standard_NC12s_v3 + "6 CPU - 55GB RAM | 1 A10 GPU - 4GB RAM | £0.70 / hour": Standard_NV6ads_A10_v5 + "6 CPU - 112GB RAM | 1 V100 GPU - 16GB RAM | £3.21 / hour": Standard_NC6s_v3 + "12 CPU - 224GB RAM | 2 V100 GPU - 32GB RAM | £6.42 / hour": Standard_NC12s_v3 image_options: "Windows 10": source_image_reference: diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json index 08548e8..7ab8517 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm-ouh2/template_schema.json @@ -33,7 +33,7 @@ "8 CPU | 32GB RAM | £0.65 / hour", "8 CPU | 64GB RAM | £0.75 / hour", "16 CPU | 64GB RAM | £1.25 / hour", - "4 CPU - 28GB RAM | 1 GPU - 16GB RAM | £0.62 / hour", + "6 CPU - 55GB RAM | 1 A10 GPU - 4GB RAM | £0.70 / hour", "6 CPU - 112GB RAM | 1 GPU - 16GB RAM | £3.21 / hour", "12 CPU - 224GB RAM | 2 GPU - 32GB RAM | £6.42 / hour" ], From 9dd1a2d096b6266900075309fe1f64e8213d8cb4 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Fri, 13 Dec 2024 11:15:35 +0000 Subject: [PATCH 05/17] test linux lock --- .../terraform/vm_config.sh | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index bd4b7f1..90b47fd 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -26,6 +26,9 @@ echo /usr/sbin/gdm3 > /etc/X11/default-display-manager # Disable lock screen via GNOME lockdown settings gsettings set org.gnome.desktop.lockdown disable-lock-screen true +gsettings set org.gnome.desktop.screensaver lock-enabled false +gsettings set org.gnome.desktop.screensaver idle-activation-enabled false +gsettings set org.gnome.desktop.session idle-delay 0 ## Install xrdp so Guacamole can connect via RDP echo "init_vm.sh: xrdp" @@ -37,17 +40,28 @@ sudo -u "${VM_USER}" -i bash -c 'echo xset -dpms >> ~/.xsession' # Disable DPMS # Disable the lock screen in xfce4-power-manager echo "Disabling lock screen in xfce4-power-manager" -sudo -u "${VM_USER}" bash -c 'echo "" >> ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml' +sudo -u "${VM_USER}" bash -c 'mkdir -p ~/.config/xfce4/xfconf/xfce-perchannel-xml/' +sudo -u "${VM_USER}" bash -c 'cat > ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml < + + + + +EOF' # Disable lock screen in xfce4-screensaver echo "Disabling lock screen in xfce4-screensaver" -sudo -u "${VM_USER}" bash -c 'echo "[Xfce4Screensaver]" > ~/.config/xfce4/xfce4-screensaver/settings.conf' -sudo -u "${VM_USER}" bash -c 'echo "lock-enabled=false" >> ~/.config/xfce4/xfce4-screensaver/settings.conf' +sudo -u "${VM_USER}" bash -c 'mkdir -p ~/.config/xfce4/xfce4-screensaver/' +sudo -u "${VM_USER}" bash -c 'cat > ~/.config/xfce4/xfce4-screensaver/settings.conf < Date: Fri, 13 Dec 2024 14:58:39 +0000 Subject: [PATCH 06/17] revert --- .../guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../terraform/vm_config.sh | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 83b6f42..84a6b3a 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.3 +version: 1.0.4 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index 90b47fd..5956210 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -40,22 +40,12 @@ sudo -u "${VM_USER}" -i bash -c 'echo xset -dpms >> ~/.xsession' # Disable DPMS # Disable the lock screen in xfce4-power-manager echo "Disabling lock screen in xfce4-power-manager" -sudo -u "${VM_USER}" bash -c 'mkdir -p ~/.config/xfce4/xfconf/xfce-perchannel-xml/' -sudo -u "${VM_USER}" bash -c 'cat > ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml < - - - - -EOF' +sudo -u "${VM_USER}" bash -c 'echo "" >> ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml' # Disable lock screen in xfce4-screensaver echo "Disabling lock screen in xfce4-screensaver" -sudo -u "${VM_USER}" bash -c 'mkdir -p ~/.config/xfce4/xfce4-screensaver/' -sudo -u "${VM_USER}" bash -c 'cat > ~/.config/xfce4/xfce4-screensaver/settings.conf < ~/.config/xfce4/xfce4-screensaver/settings.conf' +sudo -u "${VM_USER}" bash -c 'echo "lock-enabled=false" >> ~/.config/xfce4/xfce4-screensaver/settings.conf' # Make sure xrdp service starts up with the system sudo systemctl enable xrdp From 6226039554261bce5961ed57d1ee7759f8f9f382 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Mon, 16 Dec 2024 13:14:13 +0000 Subject: [PATCH 07/17] variation3 --- .../guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../terraform/vm_config.sh | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 84a6b3a..34a4203 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.4 +version: 1.0.5 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index 5956210..35e4703 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -38,14 +38,14 @@ sudo -u "${VM_USER}" -i bash -c 'echo xfce4-session > ~/.xsession' sudo -u "${VM_USER}" -i bash -c 'echo xset s off >> ~/.xsession' # Disable screensaver timeout sudo -u "${VM_USER}" -i bash -c 'echo xset -dpms >> ~/.xsession' # Disable DPMS screen power management -# Disable the lock screen in xfce4-power-manager -echo "Disabling lock screen in xfce4-power-manager" -sudo -u "${VM_USER}" bash -c 'echo "" >> ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml' - -# Disable lock screen in xfce4-screensaver -echo "Disabling lock screen in xfce4-screensaver" -sudo -u "${VM_USER}" bash -c 'echo "[Xfce4Screensaver]" > ~/.config/xfce4/xfce4-screensaver/settings.conf' -sudo -u "${VM_USER}" bash -c 'echo "lock-enabled=false" >> ~/.config/xfce4/xfce4-screensaver/settings.conf' +# # Disable the lock screen in xfce4-power-manager +# echo "Disabling lock screen in xfce4-power-manager" +# sudo -u "${VM_USER}" bash -c 'echo "" >> ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml' + +# # Disable lock screen in xfce4-screensaver +# echo "Disabling lock screen in xfce4-screensaver" +# sudo -u "${VM_USER}" bash -c 'echo "[Xfce4Screensaver]" > ~/.config/xfce4/xfce4-screensaver/settings.conf' +# sudo -u "${VM_USER}" bash -c 'echo "lock-enabled=false" >> ~/.config/xfce4/xfce4-screensaver/settings.conf' # Make sure xrdp service starts up with the system sudo systemctl enable xrdp From 0b5e07b8afb9357fc781f9a0b2807beb53570058 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Mon, 16 Dec 2024 16:31:08 +0000 Subject: [PATCH 08/17] revert back --- .../guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../terraform/vm_config.sh | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 34a4203..a2cc00b 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.5 +version: 1.0.2 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index 35e4703..fe924b3 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -24,34 +24,16 @@ DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure sudo apt install -y xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils echo /usr/sbin/gdm3 > /etc/X11/default-display-manager -# Disable lock screen via GNOME lockdown settings -gsettings set org.gnome.desktop.lockdown disable-lock-screen true -gsettings set org.gnome.desktop.screensaver lock-enabled false -gsettings set org.gnome.desktop.screensaver idle-activation-enabled false -gsettings set org.gnome.desktop.session idle-delay 0 - ## Install xrdp so Guacamole can connect via RDP echo "init_vm.sh: xrdp" sudo apt install -y xrdp xorgxrdp xfce4-session sudo adduser xrdp ssl-cert sudo -u "${VM_USER}" -i bash -c 'echo xfce4-session > ~/.xsession' -sudo -u "${VM_USER}" -i bash -c 'echo xset s off >> ~/.xsession' # Disable screensaver timeout -sudo -u "${VM_USER}" -i bash -c 'echo xset -dpms >> ~/.xsession' # Disable DPMS screen power management - -# # Disable the lock screen in xfce4-power-manager -# echo "Disabling lock screen in xfce4-power-manager" -# sudo -u "${VM_USER}" bash -c 'echo "" >> ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml' - -# # Disable lock screen in xfce4-screensaver -# echo "Disabling lock screen in xfce4-screensaver" -# sudo -u "${VM_USER}" bash -c 'echo "[Xfce4Screensaver]" > ~/.config/xfce4/xfce4-screensaver/settings.conf' -# sudo -u "${VM_USER}" bash -c 'echo "lock-enabled=false" >> ~/.config/xfce4/xfce4-screensaver/settings.conf' # Make sure xrdp service starts up with the system sudo systemctl enable xrdp sudo service xrdp restart - # Azure Storage Explorer sudo apt-get remove -y dotnet-host-7.0 sudo apt-get remove -y dotnet-sdk-7.0 From e11042159e68e63c55e070b97a4adadd0f8dd973 Mon Sep 17 00:00:00 2001 From: JaimieWi Date: Tue, 17 Dec 2024 09:26:29 +0000 Subject: [PATCH 09/17] variation0.1 --- .../user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index a2cc00b..83b6f42 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.2 +version: 1.0.3 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index fe924b3..3b15959 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -29,6 +29,8 @@ echo "init_vm.sh: xrdp" sudo apt install -y xrdp xorgxrdp xfce4-session sudo adduser xrdp ssl-cert sudo -u "${VM_USER}" -i bash -c 'echo xfce4-session > ~/.xsession' +sudo -u "${VM_USER}" -i bash -c 'echo xset s off >> ~/.xsession' +sudo -u "${VM_USER}" -i bash -c 'echo xset -dpms >> ~/.xsession' # Make sure xrdp service starts up with the system sudo systemctl enable xrdp @@ -162,4 +164,4 @@ sudo apt-get remove xfce4-screensaver -y ## Cleanup echo "init_vm.sh: Cleanup" -sudo shutdown -r now +sudo shutdown -r now \ No newline at end of file From 9a15f0480762814e2a2e2235bba51c2b50692c0b Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Wed, 18 Dec 2024 10:27:59 +0000 Subject: [PATCH 10/17] initial changes --- .../terraform/vm_config.sh | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index 3b15959..dfa0cf9 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -127,11 +127,15 @@ wget "${NEXUS_PROXY_URL}"/repository/r-studio-download/electron/jammy/amd64/rstu wget "${NEXUS_PROXY_URL}"/repository/r-studio-download/electron/focal/amd64/rstudio-2023.12.1-402-amd64.deb -P /tmp/2004 sudo gdebi --non-interactive /tmp/"${APT_SKU}"/rstudio-2023.12.1-402-amd64.deb +# R config +sudo echo -e "local({\n r <- getOption(\"repos\")\n r[\"Nexus\"] <- \"""${NEXUS_PROXY_URL}/repository/r-proxy/\"\n options(repos = r)\n})" | sudo tee /etc/R/Rprofile.site + + # Fix for blank screen on DSVM (/sh -> /bash due to conflict with profile.d scripts) sudo sed -i 's|!/bin/sh|!/bin/bash|g' /etc/xrdp/startwm.sh ### Anaconda Config -if [ "${CONDA_CONFIG}" -eq 1 ]; then +if [ "${CONDA_CONFIG}" == "true" ]; then export PATH="/opt/anaconda/condabin":$PATH export PATH="/opt/anaconda/bin":$PATH export PATH="/opt/anaconda/envs/py38_default/bin":$PATH @@ -143,21 +147,20 @@ if [ "${CONDA_CONFIG}" -eq 1 ]; then fi # Docker install and config -sudo apt-get remove -y moby-tini || true +sudo apt-get update sudo apt-get install -y r-base-core sudo apt-get install -y ca-certificates curl gnupg lsb-release -sudo apt-get install -y docker-compose-plugin docker-ce-cli containerd.io jq -sudo apt-get install -y docker-ce -jq -n --arg proxy "${NEXUS_PROXY_URL}:8083" '{"registry-mirrors": [$proxy]}' > /etc/docker/daemon.json -sudo systemctl daemon-reload +sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin jq +# Create Docker config directory if it doesn't exist +sudo mkdir -p /etc/docker/ +# Configure Docker registry mirrors +jq -n --arg proxy "${NEXUS_PROXY_URL}:8083" '{"registry-mirrors": [$proxy]}' | sudo tee /etc/docker/daemon.json > /dev/null +# Restart Docker service to apply configuration sudo systemctl restart docker # Jupiter Notebook Config sudo sed -i -e 's/Terminal=true/Terminal=false/g' /usr/share/applications/jupyter-notebook.desktop -# R config -sudo echo -e "local({\n r <- getOption(\"repos\")\n r[\"Nexus\"] <- \"""${NEXUS_PROXY_URL}/repository/r-proxy/\"\n options(repos = r)\n})" | sudo tee /etc/R/Rprofile.site - # Prevent screen timeout echo "init_vm.sh: Preventing Timeout" sudo apt-get remove xfce4-screensaver -y From c0a6091f97e611af3a4523ee4d51edba2ad5ab84 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Wed, 18 Dec 2024 10:36:23 +0000 Subject: [PATCH 11/17] new test --- .../terraform/vm_config.sh | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index dfa0cf9..83ab537 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -19,6 +19,7 @@ sudo apt-get update || true ## Desktop echo "init_vm.sh: Desktop" +sudo apt-get install gdm3 sudo systemctl start gdm3 || true DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure gdm3 || true sudo apt install -y xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils @@ -161,10 +162,25 @@ sudo systemctl restart docker # Jupiter Notebook Config sudo sed -i -e 's/Terminal=true/Terminal=false/g' /usr/share/applications/jupyter-notebook.desktop -# Prevent screen timeout -echo "init_vm.sh: Preventing Timeout" +## Prevent screen timeout and lock screen +echo "init_vm.sh: Disabling lock screen" + +# Remove xfce4-screensaver (to disable screen saver) sudo apt-get remove xfce4-screensaver -y +# Disable lock screen using gsettings +gsettings set org.gnome.desktop.screensaver lock-enabled false +gsettings set org.gnome.desktop.screensaver idle-activation-enabled false + +# Disable lock screen via XFCE Power Manager settings +xfconf-query -c xfce4-power-manager -p /general/lockscreen-suspend-hibernate -s false +xfconf-query -c xfce4-power-manager -p /general/lockscreen -s false + +# Also, if using gdm3, ensure it's not locking the session +sudo sh -c 'echo "[org/gnome/desktop/screensaver]\nlock-enabled=false" >> /etc/gdm3/greeter.dconf-defaults' + + + ## Cleanup echo "init_vm.sh: Cleanup" sudo shutdown -r now \ No newline at end of file From bdc76a97b5d469cedb597b8bd9a6a94c2537571d Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Wed, 18 Dec 2024 13:09:40 +0000 Subject: [PATCH 12/17] porter upgrade --- .../user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 83b6f42..84a6b3a 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.3 +version: 1.0.4 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre From b620e9e76fa7fc0f0e8ca8857f937036011bfe37 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Wed, 18 Dec 2024 15:14:12 +0000 Subject: [PATCH 13/17] testing --- .../guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 84a6b3a..34a4203 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.4 +version: 1.0.5 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index 83ab537..2cd59ca 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -19,7 +19,6 @@ sudo apt-get update || true ## Desktop echo "init_vm.sh: Desktop" -sudo apt-get install gdm3 sudo systemctl start gdm3 || true DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure gdm3 || true sudo apt install -y xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils @@ -176,11 +175,7 @@ gsettings set org.gnome.desktop.screensaver idle-activation-enabled false xfconf-query -c xfce4-power-manager -p /general/lockscreen-suspend-hibernate -s false xfconf-query -c xfce4-power-manager -p /general/lockscreen -s false -# Also, if using gdm3, ensure it's not locking the session -sudo sh -c 'echo "[org/gnome/desktop/screensaver]\nlock-enabled=false" >> /etc/gdm3/greeter.dconf-defaults' - - ## Cleanup echo "init_vm.sh: Cleanup" -sudo shutdown -r now \ No newline at end of file +sudo shutdown -r now From b1e87bc274c15b72741af3a7dd9831c99f706a20 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Thu, 19 Dec 2024 10:05:06 +0000 Subject: [PATCH 14/17] add Linux readme --- .../guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../terraform/vm_config.sh | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 34a4203..f611adb 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.5 +version: 1.0.6 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index 2cd59ca..c23ab70 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -134,6 +134,54 @@ sudo echo -e "local({\n r <- getOption(\"repos\")\n r[\"Nexus\"] <- \"""${ # Fix for blank screen on DSVM (/sh -> /bash due to conflict with profile.d scripts) sudo sed -i 's|!/bin/sh|!/bin/bash|g' /etc/xrdp/startwm.sh +# Create the Desktop directory if it doesn't exist +sudo -u "$VM_USER" mkdir -p /home/"$VM_USER"/Desktop + +# Add a README file to the Desktop +README_PATH="/home/$VM_USER/Desktop/README.txt" +sudo -u "$VM_USER" bash -c "cat > $README_PATH" << 'EOF' +Welcome to your Linux VM! + +This VM is pre-configured with the following tools: +- XFCE Desktop Environment +- Azure Storage Explorer +- RStudio Desktop +- Docker +- Anaconda + +To get started: +1. Open any application using the Applications Menu. +2. Use RStudio or Jupyter Notebook for data analysis. +3. Access your shared file storage at /fileshares/vm-shared-storage (if configured). +4. See the package mirror options by accessing http://nexus-tvstre.uksouth.cloudapp.azure.com + +Recommendations: +1. R packages may fail to install initially. If you see an error, edit Rprofile to use the local package mirror: + +sudo nano /usr/lib/R/etc/Rprofile.site + +Replace the local(...) lines at the bottom with: +local({ + r <- getOption("repos") + r["Nexus"] <- "http://nexus-tvstre.uksouth.cloudapp.azure.com/repository/r-proxy/" + options(repos = r) +}) + +2. Disable XFCE Lock Screen otherwise you may get locked out: + +Open Applications > Settings > Screensaver; click on Lock Screen tab, disable the Lock Screen. + + +For further assistance, contact your administrator. + +Enjoy! +EOF + +# Set appropriate permissions for the README file +sudo chmod 644 "$README_PATH" +sudo chown "$VM_USER:$VM_USER" "$README_PATH" + + ### Anaconda Config if [ "${CONDA_CONFIG}" == "true" ]; then export PATH="/opt/anaconda/condabin":$PATH From 2108bab718c7b6efeb64f2d0d7f4986e81879427 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Mon, 23 Dec 2024 10:37:30 +0000 Subject: [PATCH 15/17] test --- .../user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index f611adb..3d1891f 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.6 +version: 1.0.7 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index c23ab70..c5844c4 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -134,8 +134,9 @@ sudo echo -e "local({\n r <- getOption(\"repos\")\n r[\"Nexus\"] <- \"""${ # Fix for blank screen on DSVM (/sh -> /bash due to conflict with profile.d scripts) sudo sed -i 's|!/bin/sh|!/bin/bash|g' /etc/xrdp/startwm.sh -# Create the Desktop directory if it doesn't exist -sudo -u "$VM_USER" mkdir -p /home/"$VM_USER"/Desktop +sudo bash -c "cat > /home" << 'EOF' +testing a file +EOF # Add a README file to the Desktop README_PATH="/home/$VM_USER/Desktop/README.txt" From 1103792d7bca41de733e29f4246f5d227ca181d9 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Mon, 23 Dec 2024 14:14:39 +0000 Subject: [PATCH 16/17] ready to merge --- .../guacamole-azure-linuxvm-ouh2/porter.yaml | 2 +- .../terraform/vm_config.sh | 60 +++++++++---------- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml index 3d1891f..a2cc00b 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/porter.yaml @@ -1,7 +1,7 @@ --- schemaVersion: 1.0.0 name: tre-service-guacamole-linuxvm-ouh2 -version: 1.0.7 +version: 1.0.2 description: "An Azure TRE User Resource Template for Guacamole (Linux)" dockerfile: Dockerfile.tmpl registry: azuretre diff --git a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh index c5844c4..6a1c17f 100644 --- a/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh +++ b/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm-ouh2/terraform/vm_config.sh @@ -134,49 +134,45 @@ sudo echo -e "local({\n r <- getOption(\"repos\")\n r[\"Nexus\"] <- \"""${ # Fix for blank screen on DSVM (/sh -> /bash due to conflict with profile.d scripts) sudo sed -i 's|!/bin/sh|!/bin/bash|g' /etc/xrdp/startwm.sh -sudo bash -c "cat > /home" << 'EOF' -testing a file -EOF - # Add a README file to the Desktop -README_PATH="/home/$VM_USER/Desktop/README.txt" -sudo -u "$VM_USER" bash -c "cat > $README_PATH" << 'EOF' -Welcome to your Linux VM! +# README_PATH="/home/$VM_USER/Desktop/README.txt" +# sudo -u "$VM_USER" bash -c "cat > $README_PATH" << 'EOF' +# Welcome to your Linux VM! -This VM is pre-configured with the following tools: -- XFCE Desktop Environment -- Azure Storage Explorer -- RStudio Desktop -- Docker -- Anaconda +# This VM is pre-configured with the following tools: +# - XFCE Desktop Environment +# - Azure Storage Explorer +# - RStudio Desktop +# - Docker +# - Anaconda -To get started: -1. Open any application using the Applications Menu. -2. Use RStudio or Jupyter Notebook for data analysis. -3. Access your shared file storage at /fileshares/vm-shared-storage (if configured). -4. See the package mirror options by accessing http://nexus-tvstre.uksouth.cloudapp.azure.com +# To get started: +# 1. Open any application using the Applications Menu. +# 2. Use RStudio or Jupyter Notebook for data analysis. +# 3. Access your shared file storage at /fileshares/vm-shared-storage (if configured). +# 4. See the package mirror options by accessing http://nexus-tvstre.uksouth.cloudapp.azure.com -Recommendations: -1. R packages may fail to install initially. If you see an error, edit Rprofile to use the local package mirror: +# Recommendations: +# 1. R packages may fail to install initially. If you see an error, edit Rprofile to use the local package mirror: -sudo nano /usr/lib/R/etc/Rprofile.site +# sudo nano /usr/lib/R/etc/Rprofile.site -Replace the local(...) lines at the bottom with: -local({ - r <- getOption("repos") - r["Nexus"] <- "http://nexus-tvstre.uksouth.cloudapp.azure.com/repository/r-proxy/" - options(repos = r) -}) +# Replace the local(...) lines at the bottom with: +# local({ +# r <- getOption("repos") +# r["Nexus"] <- "http://nexus-tvstre.uksouth.cloudapp.azure.com/repository/r-proxy/" +# options(repos = r) +# }) -2. Disable XFCE Lock Screen otherwise you may get locked out: +# 2. Disable XFCE Lock Screen otherwise you may get locked out: -Open Applications > Settings > Screensaver; click on Lock Screen tab, disable the Lock Screen. +# Open Applications > Settings > Screensaver; click on Lock Screen tab, disable the Lock Screen. -For further assistance, contact your administrator. +# For further assistance, contact your administrator. -Enjoy! -EOF +# Enjoy! +# EOF # Set appropriate permissions for the README file sudo chmod 644 "$README_PATH" From 168e1d3c53ac330c8e135249a35263b56e116733 Mon Sep 17 00:00:00 2001 From: Jaimie Withers Date: Mon, 23 Dec 2024 14:19:27 +0000 Subject: [PATCH 17/17] update readme --- templates/workspace_services/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/workspace_services/README.md b/templates/workspace_services/README.md index 9c55b6d..36cbdb5 100644 --- a/templates/workspace_services/README.md +++ b/templates/workspace_services/README.md @@ -11,16 +11,16 @@ Workspace Templates are located in this folder. These Templates are for the Comp | CPU | GPU / RAM | Price | Size | | --- | --- | --- | --- | - | 2 CPU | 4GB | £0.05 / hour | Standard_B2s - | 2 CPU | 8GB | £0.15 / hour | Standard_D2s_v5 - | 4 CPU | 16GB | £0.30 / hour | Standard_D4s_v5 - | 8 CPU | 32GB | £0.65 / hour | Standard_D8s_v5 - | 8 CPU | 64GB | £0.75 / hour | Standard_E8as_v4 - | 16 CPU | 64GB | £1.25 / hour | Standard_D16s_v5 - | - | 6 CPU - 112GB RAM | 1 GPU - 16GB | £3.21 / hour | Standard_NC6s_v3 - | 12 CPU - 224GB RAM | 2 GPU - 32GB | £6.42 / hour | Standard_NC12s_v3 - | + | 2 CPU | 4GB | £0.05 / hour | Standard_B2s + | 2 CPU | 8GB | £0.15 / hour | Standard_D2s_v5 + | 4 CPU | 16GB | £0.30 / hour | Standard_D4s_v5 + | 8 CPU | 32GB | £0.65 / hour | Standard_D8s_v5 + | 8 CPU | 64GB | £0.75 / hour | Standard_E8as_v4 + | 16 CPU | 64GB | £1.25 / hour | Standard_D16s_v5 + | 6 CPU | 55GB RAM - 1 A10 GPU | £0.45 / hour | Standard_NV6ads_A10_v5 + | 6 CPU - 112GB RAM | 1 GPU - 16GB | £3.21 / hour | Standard_NC6s_v3 + | 12 CPU - 224GB RAM | 2 GPU - 32GB | £6.42 / hour | Standard_NC12s_v3 + ## Current VM Image options