nteract / hydrogen

:atom: Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor.
https://nteract.gitbooks.io/hydrogen/
MIT License
3.92k stars 334 forks source link

Remote Kernel Gateways: Prompt for baseUrl #1886

Open mebrunet opened 4 years ago

mebrunet commented 4 years ago

:memo: Summary

As a user trying to connect to a remote Jupyter kernel, I should have the option to supply the baseUrl for a new gateway (in addition to seeing the prexisting options I have supplied in the "gateways" section of the config).

:checkered_flag: Motivation

Many users create Jupyter kernels through jobs submitted to virtualized compute clusters. They do not control the IP address that is associated with the job/kernel. It may change every time they start/stop the job, possibly multiple times a day. Currently the config file json must be edited every time the user wishes to change the baseUrl for a remote kernel. This interface is tucked away in the package settings, and not conducive for repeated editing (raw json string in small text box).

:runner: Approach

I suspect all changes required would be confined to ws-kernel-picker.js. I can imagine the list of gateways would include an additional list item: "create gateway", which, upon selection, would prompt the user for a baseUrl, then possibly a token or cookie. Ideally, on subsequent creations, the previously entered fields would be remembered, to minimize the amount the user needs to edit.

:anchor: Drawbacks

I see no drawback other than the opportunity cost of development time.

:thinking: Alternatives

Currently one can work around this by creating some kind of localhost proxy, e.g. via ssh. But it is kind of hacky.

:question: Unresolved questions

ctr26 commented 4 years ago

Heavily agree, it'd be dreamy to just paste the url and token for me