cassinyio / SwarmSpawner

This repo is deprecated. A spawner for JupyterHub
BSD 3-Clause "New" or "Revised" License
23 stars 36 forks source link

Question on docker volumes in multiple hosts #16

Closed hans-permana closed 7 years ago

hans-permana commented 7 years ago

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?

barrachri commented 7 years ago

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

hans-permana commented 7 years ago

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 :)

barrachri commented 7 years ago

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 :)

wakonp commented 7 years ago

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

hans-permana commented 7 years ago

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