Setting up VS Code

In VS Code, you can configure an SSH interpreter. Cloudera AI uses this method to connect to VS Code and act as its interpreter.

Ensure that you have installed the following VS Code extensions:
Before you begin, ensure that the SSH endpoint for Cloudera AI is running on your local machine. If additional information is required, see the documentation for your version of VS Code for specific instructions.
  1. Verify that the SSH endpoint for Cloudera AI is running with cdswctl.
    If the endpoint is not running, start it.
  2. Open VS Code.
  3. Open the command pallet and connect to a remote host.
  4. Connect to the host you added previously.
  5. For the first connection, you must accept the fingerprint.
    You might not see a pop up, so pay attention to VS Code. If it is the first time your are connecting to a new session, or the port number changed, you will need to accept the fingerprint.
    While VS Code connects and sets up the remote connection, it installs some helper applications on the Cloudera AI server. Sometimes the remote session dies. Click Retry or if it's taking a long time, restart the remote session and it will recover.
  6. After you are connected, you can open the Explorer and view and edit the files in the /home/cdsw directory.
  7. From the Explorer view, you can edit any of the files on your Cloudera AI server.
    Using the Explorer view, you remotely edit and modify your Cloudera AI files. VS Code also supports Python and R, some powerful coding tools, that you can take advantage of over the remote connection.