jupyterhub / sudospawner

Spawn JupyterHub single-user servers with sudo
BSD 3-Clause "New" or "Revised" License
50 stars 41 forks source link

Is it possible to use sudospawner with wrapspawner? #46

Open jjwright opened 7 years ago

jjwright commented 7 years ago

We've got a hub running with wrapspawner so that users can dynamically choose different spawner class options. I'm currently working on setting it up so it can be run as a non-root user but I'm stuck on how sudospawner could be used with wrapspawner since they both require setting the spawner_class in the configuration file. Has anyone had success setting up a hub this way?

minrk commented 6 years ago

With wrapspawner, you always set spawner_class to wrapspawner. After that, it's wrap spawner configuration that figures out what 'actual' spawner to launch, e.g.

from wrapspawner import WrapSpawner
from sudospawner import SudoSpawner
c.JupyterHub.spawner_class = WrapSpawner
c.WrapSpawner.child_class = SudoSpawner