VSCode interactions

Overview

This page describes installation and usage of the Cloud Pipeline VSCode/Cursor extension.
This extension allows to use the following Cloud Pipeline functionality within your development environment:

  • list your active compute runs
  • start new instances from the available tools
  • stop running instances
  • open a run in a remote development window so you can work on the machine where the job is running

Installation

  1. Navigate to the CLI settings - Settings → CLI → VSCode extension:
    CP_VSCodeInteractions
  2. Click download link provided within the settings page.
    The extension installation file will be automatically downloaded to your local workstation: cloud-pipeline-remote.vsix, or cloud-pipeline-remote.<version>.vsix if the link is to the build of this platform version, e.g. cloud-pipeline-remote.0.26.0.1111.<commit>.vsix. A branded extension carries the brand in place of cloud-pipeline.
  3. Open VSCode or Cursor development application and open Extensions panel:
    CP_VSCodeInteractions
  4. Click More actions menu in the top-right corner and select Install from VSIX...
    CP_VSCodeInteractions
  5. Select the .vsix file, which was downloaded previously:
    CP_VSCodeInteractions
  6. Cloud Pipeline Remote extension will appear in the VSCode toolbar:
    CP_VSCodeInteractions

Updates

The extension downloaded from the platform checks every 10 minutes whether the platform has another build of it. If so, it offers to install it - click Update, and then Reload to reload the window. If you click Later, it does not offer the update again in that window.

To check at once, run Cloud Pipeline: Check for Updates from the Command Palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS). It says what it found: an update to install, that the extension is up to date, or why it cannot check - e.g. you are not signed in. It offers an update even after you clicked Later.

To see the version of the installed extension - the platform version and the commit it was built from - run Cloud Pipeline: Show Version.

If the extension is branded for your deployment, the commands carry its name in place of "Cloud Pipeline".

Authentication

Authentication flow uses the same approach as the Cloud Pipeline pipe CLI:

  • If pipe CLI was previously configured and used on a current workstation - its configuration and authentication token will be used.
    In such case, no additional configuration is required for the VSCode extension.
  • If no pipe CLI config is found - VSCode extension will prompt to sign-in:
    • click Cloud Pipeline Remote extension in the toolbar
    • click Sign-in option:
      CP_VSCodeInteractions
    • VSCode will prompt for a permission to open web-browser, please approve:
      CP_VSCodeInteractions
    • A new browser window will be opened to perform authentication. If everything goes well - you will see a message about successful login: CP_VSCodeInteractions
  • At this point, Cloud Pipeline Remote extension is fully configured and ready to be used.

Operations

View a list of active runs

  • By default, Cloud Pipeline Remote extension panel will show a list of currently active runs of a current user.
    List of runs is auto-refreshed every 5 seconds:
    CP_VSCodeInteractions
  • Runs can be shown in two states:
    • Starting CP_VSCodeInteractions - an instance is being initialized, connection can't be established yet.
    • Ready CP_VSCodeInteractions - run is available for connection.
  • Hover an instance with a mouse to see the run details:
    CP_VSCodeInteractions

Connect to an instance

  • Once an instance is ready for connection - double click it or right click and select Connect via SSH:
    CP_VSCodeInteractions

Please note, Cloud Pipeline VSCode extension depends on Microsoft Remote SSH plugin.
If it is not installed - you will be prompted to do so. Click Install Remote - SSH and wait for the installation to complete.
CP_VSCodeInteractions

  • This will open a new VScode window, which will start connecting to a selected instance.
    If you will be prompted to select the platform for the remote host, select Linux:
    CP_VSCodeInteractions
  • Once connection is established - you will see a filesystem of the remote instance and be able to open terminal and execute code remotely:
    CP_VSCodeInteractions

The remote window opens the first of these folders:

  • the folder in the CP_VSCODE_WORKSPACE_DIR parameter of the run - if it is an absolute path to a folder that the user the extension connects as can open. Set this parameter at launch, or as a default parameter of a tool, e.g. to open a project folder in the image. If the folder cannot be opened, the extension shows a warning with the reason, and opens the home folder (see below).
    Do not set it to a folder in a mounted data storage (under /cloud-data): the settings below, which keep search and file watching out of the storages, do not apply inside such a folder, and a chat request may hang for a long time
  • the home folder of the user the extension connects as. This user depends on the SSH mode of the run (the CP_CAP_SSH_MODE parameter) and on the system.ssh.default.root.user.enabled system preference:
    • the run owner - the folder in the OWNER_HOME environment variable of the instance. If it is not set, or cannot be read, /home/<user name> is opened
    • root - /root
    • any other user (e.g. one who connects to a shared run) - /home/<user name>

On connect, the extension adds the settings below to the Remote [SSH] settings of the instance (~/.vscode-server/data/Machine/settings.json, or ~/.cursor-server/data/Machine/settings.json in Cursor).
They keep search, file watching and chat assistants (e.g. GitHub Copilot Chat) out of the mounted data storages under ~/cloud-data. Without them a chat request may hang for a long time.

json { "search.followSymlinks": false, "search.exclude": { "**/cloud-data/**": true }, "files.exclude": { "**/cloud-data": true }, "files.watcherExclude": { "**/cloud-data/**": true } }

  • only missing settings are added, values already set on the instance are kept
  • the settings file shall be plain JSON. If it contains comments or trailing commas - nothing is added
  • ~/cloud-data is hidden from the VSCode explorer, the storages stay available in the terminal
  • to change the list - edit cloudPipeline.remoteMachineSettings.values in the VSCode settings. Set a key to null to skip it
  • to disable this behavior - set cloudPipeline.remoteMachineSettings.enabled to false

To stop connection to the instance - close VSCode window with opened remote connection and select Stop SSH Tunnel option from the context menu (right-click the instance):
CP_VSCodeInteractions
OR hover the instance in the list and click Stop SSH Tunnel icon:
CP_VSCodeInteractions

Start a new instance

Cloud Pipeline Remote extension also allows to start new runs right from the VSCode/Cursor IDEs:

  • Click CP_VSCodeInteractions icon in the Cloud Pipeline Remote extension panel
  • This will load a list of available tools. Note: it may take a couple of seconds to load.
    CP_VSCodeInteractions
  • Search and select a tool to start. This will bring a tool version selection menu:
    CP_VSCodeInteractions

Cloud Pipeline Remote VSCode extension does not allow to edit the tool startup configuration.
A default configuration, defined for that tool/version, is used to start a new instance - unless you have launch profiles (Settings → My Profile → LAUNCH PROFILES).
Then, after the version, the extension offers to pick one of them, or Tool configuration. A picked profile overrides the tool settings with every value it sets, except the docker image.

  • Select a version to start a new run of the tool/version. A new instance will appear in the list of runs:
    CP_VSCodeInteractions

Stop an instance

Running instances can be stopped via Stop run option from the context menu (right-click the instance):
CP_VSCodeInteractions

Confirm the stop in the appeared pop-up:
CP_VSCodeInteractions