sciapp / sampledb

Sample and Measurement Metadata Database
https://scientific-it-systems.iffgit.fz-juelich.de/SampleDB/
MIT License
21 stars 11 forks source link

JupyterHub interface #4

Open dvanic opened 4 years ago

dvanic commented 4 years ago

Is there documentation for interfacing to a JupyterHub instance to visualise the results of a specific set of measurements, for example?

FlorianRhiem commented 4 years ago

SampleDB directs the user to a URL depending on the SAMPLEDB_JUPYTERHUB_URL and the notebook settings in the action schema, containing selected metadata from the measurement.

What happens then is largely dependent on the configuration of the JupyterHub (e.g. which spawner is used, which authenticator is used, which volumes are mounted in the individual notebook server containers in case of a kubespawner for example) and storage system. As a result, it is difficult to generalize the webapp that inserts the metadata into a notebook and redirects the user to that notebook.

I'll document the general process and try to produce a small example for such a webapp, working with local files. However each use case will need alterations, e.g. if the JupyterHub mounts user's directories from one of several NFS servers, the webapp should write the notebook not to a local file but to the correct path on that NFS server, etc.

FlorianRhiem commented 4 years ago

I've uploaded a Flask blueprint for building a notebook templating server. I've also added a page on JupyterHub support to the new Administrator guide, which goes through the steps of what's necessary for interfacing with a JupyterHub instance.