Skip to main content

VS Code on a compute node

CS Bridge is a VS Code extension that opens a VS Code window on a Slurm compute node. This page helps a researcher decide whether to use it.

Available Version 0.2.3 · VS Code Marketplace

How it works​

On a Slurm cluster you log in to a shared login node. Heavy work runs on compute nodes, which Slurm allocates to a job and which are normally reachable only from inside the cluster. CS Bridge reaches one:

  1. You choose a partition, CPUs, memory, GPUs and a walltime in a form. CS Bridge submits a Slurm job through your own SSH login.
  2. The job runs Linkspan, the Cybershuttle agent, which starts an SSH server on the compute node.
  3. Linkspan and your laptop each connect outward to a Dev Tunnel, a Microsoft relay service, and meet there.
  4. Remote-SSH opens the window through that path.

Your editor, terminals, debugger and extensions then run on the allocated node. You need no Cybershuttle account, and the cluster's staff install nothing. How it works shows the sequence.

A session is an ordinary Slurm job under your user. Your allocation is charged from the moment it starts running until you press Stop or the walltime ends, whether or not a window is open. Closing the VS Code window does not stop the job.

Suitable uses​

Suited toNot suited to
Developing and debugging code that needs the cluster's GPUs, memory or softwareMoving large datasets: the relay carries tens of Mbit/s; use rsync or Globus
Interactive analysis too heavy for a login nodeUnattended runs over 24 hours, the longest walltime offered; submit a batch job
VS Code extensions (Python, Jupyter notebooks, C++, Git) on cluster filesClusters whose compute nodes have no outbound internet access: Linkspan cannot reach the relay

Requirements​

RequirementNotes
VS Code 1.101 or newerWindows, macOS or Linux
OpenSSH ssh and ssh-keygen on PATHNothing is bundled
A Remote-SSH extensionUsually Microsoft's Remote - SSH; install it yourself
A Microsoft accountCreates the Dev Tunnel; a free account is enough
A Slurm cluster you reach with sshWith the login the site already requires, and a Slurm account (allocation) where needed

CS Bridge is tested on the ACCESS clusters in Tested clusters. Another Slurm cluster should work if it meets the cluster requirements: its login node can download from github.com and its compute nodes can make outbound HTTPS connections.

Credentials and data​

CS Bridge sends no cluster credential to Cybershuttle or to Microsoft, and collects no analytics.

ItemWhere it lives
SSH keys and cluster loginYour laptop only (~/.ssh); passwords and MFA replies go to your own ssh and are not kept
Per-session key for the node's SSH serverYour laptop only; a new key per session, deleted when the session stops
Microsoft account tokenYour OS keychain, held by VS Code. The job receives only a token that can host that one tunnel
Code and terminal trafficMicrosoft's relay, inside SSH, encrypted end to end between laptop and node
Your job on the nodeRuns as you, with your file permissions. CS Bridge adds ~/.cybershuttle/ (Linkspan and its logs) to your cluster home, and the VS Code server to the node's /tmp

Shared nodes carry one limitation: Linkspan's control API listens on the node's 127.0.0.1 without a password, so another user with a job on the same node could call it, for example to start an SSH server that runs as you. Where that matters, ask the site which partitions give a job its own node (Cluster security).

Next, follow Getting started.