Remote*: Tips and Tricks#

Some workarounds related to remote development/debugging on Levante. These workarounds are not tested on all available remote tools but often specific to a certain IDE. We encourage you to test on your favorite IDE and report issues to support@dkrz.de.

Connect to a previously allocated compute node (ssh)#

Note

Tested on VSCode

  1. [Levante] Allocate a compute node with salloc (see here)

  2. [Local] Edit $HOME/.ssh/config and add this:

    Host *.lvt.dkrz.de
         ProxyJump levante.dkrz.de
    
  3. [Local] Add pub key to ~/.ssh/authorized_keys (only for the first time)

cat ~/.ssh/abcd.pub | ssh username@levante.dkrz.de 'cat >> .ssh/authorized_keys'
  1. [Local] From VSCode: (Ctrl+Shift+P) –> Connect to Host and then you have to manually specify username@computeNodeName.lvt.dkrz.de.

We assume that you did set up ssh following this link.

Alternative content for 2)#

You can also use the following configuration:

Host computeNodeName.lvt.dkrz.de
     HostName computeNode.lvt.dkrz.de
     User username
     ProxyCommand ssh username@levante.dkrz.de -W %h:%p

You get computeNodeName from 1.

How to connect to a remote jupyter server (token)#

Note

Tested on VSCode

According to this tutorial, you can integrate VSCode with Jupyterhub.

In step 4, you will be asked to enter the jupyterhub URL and a token. You have to enter the full URL which can be:

https://jupyterhub.dkrz.de/user/your_username/levante-spawner-preset/?token= or

or

https://jupyterhub.dkrz.de/user/your_username/levante-spawner-advanced/?token=

It depends on how you did start your server.

You can request a token by clicking on token in the menu after you login.

../../_images/vscode_token.png