Visual Studio Code can be used to edit source code and other files on the HPC systems. VSCode is available to run directly on HPC through the Open on Demand system.
VSCode can also be run locally on laptop or desktop computers and used to make a remote connection to the HPC systems. This documentation is intended to detail the steps that must be taken to allow such a connection. The details of how to make such a connection within the VSCode software itself is beyond the scope of this documentation. Refer to the VSCode documentation here: https://code.visualstudio.com/docs/remote/ssh-tutorial.
Remote VSCode sessions must connect to a compute node. Briefly, the procedure is as follows:
- Request resources on a compute node, which will be used by your local VSCode software.
- Connect to the HPC VPN, which will allow a direct connection to your requested compute node.
- Connect VSCode to the allocated compute node.
The specific steps are these:
- Set up ssh key authentication on the file transfer node (filexfer.hpc.arizona.edu), which will allow VSCode to directly connect to the HPC systems without using passwords or Duo authentication. Our documentation for setting up ssh keys on the bastion host appears here: SSH Keys. Follow the procedure documented on that page, but replace hpc.arizona.edu in any commands with filexfer.hpc.arizona.edu
- Use the Cisco AnyConnect VPN software to connect to vpn.hpc.arizona.edu. Cisco AnyConnect is the software that you would also use to connect to the general UArizona VPN. Information on downloading and connecting Cisco AnyConnect appears here: https://it.arizona.edu/service/ua-virtual-private-network-vpn
- From the login node, start an interactive session for the length of time that you’d like to connect VSCode. Note that executing "elgato" or "ocelote" first will request your session on those less busy clusters and it will likely start faster:
After the interactive session starts, type "hostname", which will give something like cpu25.elgato.hpc.arizona.edu. This is the name that you will enter in your local VSCode as the remote computer to connect to. Note that each time you start an interactive session you will likely get a different node, and will therefore need to tell VSCode the specific host to connect to each time.