cheapandfair / cheapandfair-gateways-2024

0 stars 2 forks source link

check persistence of data in $HOME #11

Closed rpwagner closed 1 day ago

rpwagner commented 1 day ago

Make sure things like ~/.cheapandfair.json persist when user containers are restarted in JupyterHub

rpwagner commented 1 day ago

@zonca We should move files needed to be persisted to ~/work, like the token file. This will probably mean passing a parameter to git to find the SSH key.

(base) jovyan@eaa409ad7973:~/work$ echo 'foo' >  ~/.cheapandfair.json
(base) jovyan@eaa409ad7973:~/work$ ls -a ~/
.  ..  .bash_logout  .bashrc  .cache  .cheapandfair.json  .conda  .config  .ipython  .jupyter  .local  .npm  .profile  work

After shutting down the my server and logging back in

(base) jovyan@454c4e2f4df4:~/work$ ls -a ~/
.  ..  .bash_logout  .bashrc  .cache  .conda  .config  .ipython  .jupyter  .local  .npm  .profile  work
zonca commented 1 day ago

I was expecting the entire home folder of the user to be inside a persistent volume

zonca commented 1 day ago

When I deploy on jet stream it is the entire home folder which is persistent.

So I think you can change the configuration of Jupiter hub fix this.

rpwagner commented 1 day ago

The typical pattern is to have work be persistent. I'll try making the home directory persistent and see what changes.

rpwagner commented 1 day ago

If you the example JupyterHub config from JetStream to compare that could help

rpwagner commented 1 day ago

do you have anything critical on the hub right now? this will require me deleting the current volumes

zonca commented 1 day ago

I am deploying under kubernetes so the configuration of the spawner is different

zonca commented 1 day ago

Delete everything

rpwagner commented 1 day ago

OK, it's working. I wasn't sure how the home directory was handled since it gets loaded from the container image initially. I though the volume might mount over it.

rpwagner commented 1 day ago

fixed