swan-cern / jupyterhub-extensions

Customized components of the Jupyterhub server in SWAN (handlers, spawners, templates).
GNU Affero General Public License v3.0
26 stars 14 forks source link

Show resource availability #59

Open diocas opened 2 years ago

diocas commented 2 years ago

To avoid a generic message and an attempt to get resources that are not available (GPUs), we need to show the resources in the menu. Meaning, if a user selects a GPU and there are non available, it should not be possible to start a session and an error message should be displayed.

diocas commented 2 years ago

@lucamarletta you implemented something like this for JRC, right?

lucamarletta commented 2 years ago

Hi @diocas, actually was an idea not still implemented, but I've already done an analysis on that. It's easy to implement.

1) in the form template with jquery you load in ajax of with a button the result from a server-side script. 2) with kubectl instlled in swan image all some kubectl plugins, you can query the cluster and send the resut on the form.

For GPU check, you but provide me the kubectl recipe to get what you need.

I can do it, we can talk next days