Connect JetBrains Toolbox to an OpenShift Dev Spaces workspace

Connect your local JetBrains IDE to a running OpenShift Dev Spaces workspace by using the JetBrains Toolbox application.

Before you begin

  • You have the JetBrains Toolbox application installed.

    The system requirements for Toolbox are met.

  • You have the Red Hat OpenShift Dev Spaces plugin for Toolbox App installed.

    In Toolbox App, go to Manage plugins and install the plugin. If the plugin is not listed in the Available section, run the following command in your terminal to install it manually:

    git clone git@github.com:redhat-developer/devspaces-toolbox-plugin.git && cd devspaces-toolbox-plugin && ./gradlew installPlugin

    Restart the Toolbox App to load the plugin.

  • You are logged in to your OpenShift server with oc in your local terminal. Note

    The oc login command establishes the authenticated session and saves the connection information to the configuration file, which is read by the Toolbox plugin for OpenShift Dev Spaces.

  • You have sufficient PVC size to download and unpack the JetBrains IDE. Important

    CLion IDE, which is the largest of the IDEs, requires approximately 8.5 GB of disk space. Also consider the recommendations for calculating memory and CPU.

Procedure

  1. Create a workspace on the OpenShift Dev Spaces Dashboard and choose JetBrains Toolbox App (desktop) as the editor:
    JetBrains Toolbox App on Dashboard

    For OpenShift Dev Spaces Toolbox plugin version 0.0.1:

    After the workspace is started, copy the oc port-forward …​ command from the Dashboard page. Run the command in your local terminal to forward the remote SSH port to your local machine.

    For OpenShift Dev Spaces Toolbox plugin version 0.0.2 and later:

    The plugin handles port forwarding automatically.

  2. On the workspace page, click the Open the workspace over Toolbox link to run the local Toolbox App and initiate the SSH connection to your OpenShift Dev Spaces workspace:
    Connecting to remote environment

    For OpenShift Dev Spaces Toolbox plugin version 0.0.2 and later:

    To connect directly from the Toolbox App without using the Dashboard, open the Environment actions menu and click the Connect button:


    Connecting to workspace from Toolbox App

  3. After the connection is established, click the workspace name. On the Tools tab, choose an IDE to install in your workspace:
    Installing IDE to remote environment
  4. After the IDE is installed, on the Projects tab, click the project name to connect the local Thin Client to the workspace:
    Opening a workspace

Results

  • Your local Toolbox application is running the JetBrains Thin Client and connects to the workspace:
    JetBrains Thin Client connected to workspace