VincentBerger / JupyterNotebooks

0 stars 0 forks source link

Kill Student Notebook server before folder deployment #2

Open donzef opened 4 years ago

donzef commented 4 years ago

Suggestion: Kill student notebook server before folder

Attached a .YML file performing this task, using the JuypterHub API.

The UrlApiPrefix is at: UrlApiPrefix: "https://{{ inventory_hostname }}/hub/api"

To test, you'll a Token registered in the JupyterHub config file like this one: c.JupyterHub.api_tokens = {'b6c6ed97922d46b580dbb8989f81ffe65': 'francois'}

The token can be generated from the JupyterHub -> File --> Hub Control Panel --> Token

Then, you can create an Ansible variable with the following format: token="token 546655612349146ddbb72dd9856439920"

KillSomeStudentServers.txt

VincentBerger commented 4 years ago

Why do you want to do this ? Is there a downside to running the playbook with the server running ? I tested it, it works, there's no lock or anything. Sure we see the directory disappear and reappear, but then what ?

donzef commented 4 years ago

As I bumped several times into Jupyter hanging for a while and asking for clearing the associated workspace, I some doubts about robustness of Jupyter to handle such changes.