Admin Guide
This page contains recipes and templates for administrative purposes.
Upgrading Jupyter/Jupyterlab
To upgrade Jupyterhub/Jupyterlab, do the following:
$ sudo su -
$ conda update --all
$ conda activate jupyterhub
$ service jupyterhub stop
$ conda update -c conda-forge --all
$ /opt/miniconda3/envs/jupyterhub/bin/jupyterhub upgrade-db -f /etc/jupyterhub/jupyterhub_config.py --db "sqlite:////etc/jupyterhub/jupyterhub.sqlite"
$ service jupyterhub start
$ service jupyterhub status
Output from jupyterhub upgrade-db
step should look like:
(jupyterhub) root@ds01:/etc/jupyterhub# /opt/miniconda3/envs/jupyterhub/bin/jupyterhub upgrade-db -f /etc/jupyterhub/jupyterhub_config.py --db "sqlite:////etc/jupyterhub/jupyterhub.sqlite"
[I 2023-10-13 08:45:59.597 JupyterHub dbutil:130] Upgrading sqlite:////etc/jupyterhub/jupyterhub.sqlite
[I 2023-10-13 08:45:59.597 JupyterHub dbutil:99] Backing up /etc/jupyterhub/jupyterhub.sqlite => /etc/jupyterhub/jupyterhub.sqlite.2023-10-13-084559
[I 2023-10-13 08:46:00.030 alembic.runtime.migration migration:213] Context impl SQLiteImpl.
[I 2023-10-13 08:46:00.030 alembic.runtime.migration migration:216] Will assume non-transactional DDL.
[I 2023-10-13 08:46:00.034 alembic.runtime.migration migration:619] Running upgrade 651f5419b74d -> 0eee8c825d24, added properties column
Output from service jupyterhub status
step should look like:
(jupyterhub) root@ds01:/etc/jupyterhub# service jupyterhub status
● jupyterhub.service - Jupyterhub
Loaded: loaded (/etc/systemd/system/jupyterhub.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2023-10-13 08:46:35 CEST; 1s ago
Main PID: 7665 (jupyterhub)
Tasks: 8 (limit: 4915)
CGroup: /system.slice/jupyterhub.service
├─7665 /opt/miniconda3/envs/jupyterhub/bin/python3.8 /opt/miniconda3/envs/jupyterhub/bin/jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
└─7691 node /opt/miniconda3/envs/jupyterhub/bin/configurable-http-proxy --ip 127.0.0.1 --port 8000 --api-ip 127.0.0.1 --api-port 8001 --error-target http://127.0.0.1:8081/notebook/hub/er
Oct 13 08:46:36 ds01 jupyterhub[7665]: [I 2023-10-13 08:46:36.074 JupyterHub roles:183] Role attribute server.scopes has been changed
Oct 13 08:46:36 ds01 jupyterhub[7665]: [I 2023-10-13 08:46:36.078 JupyterHub app:1984] Not using allowed_users. Any authenticated user will be allowed.
Oct 13 08:46:36 ds01 jupyterhub[7665]: [I 2023-10-13 08:46:36.098 JupyterHub app:2928] Initialized 0 spawners in 0.002 seconds
Oct 13 08:46:36 ds01 jupyterhub[7665]: [I 2023-10-13 08:46:36.102 JupyterHub metrics:278] Found 1 active users in the last ActiveUserPeriods.twenty_four_hours
Oct 13 08:46:36 ds01 jupyterhub[7665]: [I 2023-10-13 08:46:36.103 JupyterHub metrics:278] Found 1 active users in the last ActiveUserPeriods.seven_days
Oct 13 08:46:36 ds01 jupyterhub[7665]: [I 2023-10-13 08:46:36.103 JupyterHub metrics:278] Found 1 active users in the last ActiveUserPeriods.thirty_days
Oct 13 08:46:36 ds01 jupyterhub[7665]: [W 2023-10-13 08:46:36.104 JupyterHub proxy:746] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
Oct 13 08:46:36 ds01 jupyterhub[7665]: [I 2023-10-13 08:46:36.104 JupyterHub proxy:750] Starting proxy @ http://127.0.0.1:8000/notebook
Oct 13 08:46:36 ds01 jupyterhub[7665]: 08:46:36.317 [ConfigProxy] info: Proxying http://127.0.0.1:8000 to (no default)
Oct 13 08:46:36 ds01 jupyterhub[7665]: 08:46:36.319 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
Welcome Mail
This is the template for the Welcome mail for new users.
Welcome mail
Hello $USER,
Here’s your account:
- Host:
ds01.sintef.no
- User:
$USER
- Pass:
$PASSWORD
I suggest you log in (via SSH) and type passwd
to change it to something more secret. Also consider adding your SSH public key using ssh-copy-id
.
The most relevant directories are
- Code goes in
/home/$USER
. -
Project data goes in
/data/$USER
. -
A fast disk is available at
/yolo/$USER
.
Note that there are no backups! Further documentation is available at http://ds01.sintef.no/w/.
If you have questions, just ask.
Cheers,
- Volker
PS: If you’re not at SINTEF, you need to have the VPN running.