-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swarmspawner to support new-style Docker Swarm mode #216
Conversation
…ner with names changed and docker calls (mostly) adapted. Not yet tested at all
…s testing at all.
…t configuration for volume drivers.
…e) parameters. This is different from how containers are specified
Fixed indentation on code blogs
Resolves #215 |
…ks are proxied to from another machine inside the same network?) due to it preventing multiple notebook servers being launched
Wow a really needed PR. @minrk Hope it is merged soon. |
@scnerd Just a doubt? Will
|
Thanks, this is great! I think we should make SwarmSpawner inherit from DockerSpawner so as to avoid reimplementing too many things, but that can be done in a separate PR. |
I think inheritance would be great, though I think there are enough little differences in the configuration and behavior of each that I'd suggest creating a shared, abstract base class, and making both DockerSpawner and SwarmSpawner inherit from it. I meant to get around to this, but wanted to get the original SwarmSpawner tested and merged first before creating a branch that modified the main DockerSpawner. |
Added a new class called Swarmspawner by duplicating Dockerspawner and modifying it where needed. Removed deprecated fields instead of adapting them. My working sample hub config looks like the following:
Mounting volumes not yet tested. Not sure about other other features not explicitly tested in the above configuration.
To reduce the technical debt of this addition, it would probably be worthwhile extracting a superclass for both Dockerspawner and Swarmspawner (especially their shared attributes). Most of the major differences are isolated to a few functions (start, stop, poll, get_service/container, maybe one or two others).