Managing web applications#
Important
This document assumes that you already have access to a Safe Haven Management (SHM) environment and one or more Secure Research Environments (SREs) that are linked to it.
During deployment of an SRE, distinct virtual machines are created to host each of the three standard web applications - CoCalc, CodiMD, and Gitlab.
In principle, these should require no further direct interaction. Researchers using Secure Research Desktops will be able to interact with the servers through a web interface. CoCalc allows users to create their own user accounts, while CodiMD and Gitlab authenticate with the domain controller via LDAP.
However, it is possible for the virtual machine hosting the web app servers to successfully start without the web app servers themselves actually running. For example, Researchers using an SRD may find that the web apps are unavailable, or do not successfully authenticate log-in attempts. In such cases, command line access to the virtual machines hosting the web app servers may help to diagnose and resolve problems.
In the rest of this document, <SHM ID> is the Secure Management Environment ID for the SHM, and <SRE ID> is the Secure Research Environment ID for the SRE.
Checking build logs#
An initial step could be to check the build logs of the virtual machine to ascertain whether any clear errors occurred during the process (e.g. the installation of the server software may have failed).
From the
Azureportal, navigate to the web app resource groupRG_SHM_<SHM ID>_SRE_<SRE ID>_WEBAPPS.Click on the relevant VM (e.g.
COCALC-SRE-<SRE ID>)From the menu on the left, scroll down to the
Helpsection and selectBoot diagnosticsClick
Serial logto access a full text log of the booting up of the VM.
From the log, you may be able to determine whether and why part of the build process failed. In some cases it may be sufficient to delete and rebuild the VM.
From the menu on the left, click
OverviewClick
DeleteRedeploy the web app servers using
Powershelllocally
at 📁
./deployment/secure_research_environment/setup
PS> ./Setup_SRE_WebApp_Servers.ps1
If the reason for failure is less clear, accessing the command line interface directly may help.
Accessing the VM console#
Console access to the web app VMs can be achieved through the Azure portal. All VMs share the same <admin username>, but each has its own <admin password>, which will need to be retrieved from the SRE key vault before accessing the console.
From the
Azureportal, navigate to the Resource GroupRG_SHM_<SHM ID>_SRE_<SRE ID>_SECRETSClick on the
SREkeyvaultkv-<SHM ID>_SRE_<SRE ID>From the menu on the left, select
Secretsfrom theObjectssection.All web app VMs share the same
<admin username>, found in thesre-<SRE ID>-vm-admin-usernamesecret.Each web app has its own
<admin password>, found in thesre-<SRE ID>-vm-admin-password-<WEB APP>secret.
Once you have the <admin username> and <admin password>, you will be able to log in to the VM console as follows:
From the
Azureportal, navigate to the web app resource groupRG_SHM_<SHM ID>_SRE_<SRE ID>_WEBAPPS.Click on the relevant VM (e.g.
COCALC-SRE-<SRE ID>)From the menu on the left, scroll down to the
Helpsection and selectSerial consoleAfter a short time, you will be shown the console for the VM. You may need to press a key to be shown the login prompt.
Log in with the details you retrieved earlier to be given root access to the VM.