load balanced spawner #213
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #137
Turned out that having a spawner as a plugin to a spawner was a little tricky as there's all sorts of setup Jupyterhub does.
We could also use the existing SSH spawner plugin by subclassing and overriding the
choose_remote_host
method and bolting on some bits. This plugin is a little over the top for us as it does file transfers etc.Simple solution, runs the command through an SSH connection, similar to how
cylc play
does it.Here's the configuration to use it:
Unfortunately the UIS doesn't like being spawned onto other hosts, I think we need to patch the handlers with the location of the Hub. I've tried patching the
MainHandler
but that leaves me with the following error (Hub stdout):So ATM this can't be used to spawn UIS on other hosts which makes it a bit of a chocolate teapot.
Been looking at the JupyterHub
single-user
thinggy trying to figure out how to fix it. They configure their handlers quite differently (redirect rather than render) and seem to providehub-host
andhub-prefix
CLI opts?https://github.com/jupyterhub/jupyterhub/blob/3fec19d191119e4203c243f44c43e74c8fe62f04/jupyterhub/singleuser/mixins.py#L141-L155
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.py
, seerecipe/meta.yaml
).