cassinyio/SwarmSpawner

Question on docker volumes in multiple hosts

Closed this issue · 5 comments

Hi @barrachri, thank you very much for the SwarmSpawner, it has helped me a lot!

I have successfully managed to run the Jupyterhub with your spawner, but I have one general question. Since it is a Swarm network, it is most likely that the spawned notebook will be spread across multiple hosts, and there is no guarantee that the same container will be spawned on the same host in the future. What is the strategy to ensure that the same user can access the previously created container?

Hi, what do you mean about accessing the same container?

For each container that is spawned, the user workspace is persisted into a local file system with docker volume based on the guide here. However, this docker volume is only local to each host machine, which means that for multihost configuration, any data in the user workspace is kept only if the future spawning occurs at the same host machine. I hope I make it clearer :)

Ahh ok!

well this is one the of issue you have to deal with when you use services.
NFS could be a solution.
Have you thought about using also git?

Anyway I'll be happy to have a private chat about your issue and what are you trying to achieve :)

Checkout the pull request #15.
I think this would help 👍

thanks @wakonp, your pull request would definitely help to solve my issue :)