Share servers across users

Hi everyone.

Is it possible to share servers across users with already available spawners? Right now we are using kubespawner and we’re planning to use ldap authenticator. This setup by default creates a single server (container) per user. What we would like to achieve is to have a single server for a tenant, which in most cases will be just a team. Is this possible? I assume it should be feasible if we write some custom spawner but we would like to avoid that if possible.

If that’s important, we can assume a single user belongs to single tenant, but more flexibility in this are would be appreciated.

I think it is possible, but a bit awkward. Why do you not want to give each team member their own server?

The thing to search for is the “grader service” in nbgrader. This is a shared spawner/service for all the people who need to grade notebooks. I think this is a shared server like you want it. Not quite sure what the right lingo to search for is but I am pretty sure nbgrader has this and would be a place to get inspiration from for how to set this up.

Thank you. I will check it out.

We are trying to abuse the platform a bit and keep all the servers running all the time. This is needed to 1) run some servers of our own on them (constant running processes) and 2) run scheduled notebooks (with papermill) on them. This raises two issues which we will be trying to adress:

  • resources usage (having them run constantly for each user might become costly)
  • access to scheduled jobs - these should not depend on particular user, as he may go for vacation or whatever.

There would be no issue with users having their own servers as well as team ones but for the sake of simplicity, having only team ones sounds good enough.

Most JupyterHub authenticators allow you to map the username used for authentication to a different username for jupyter:

Perhaps you could override that function (can be done in-line in your to return your teamname?

Yes @manics, that sounds like a perfect solution. Thanks a lot.