diff --git a/jupyterhub/.env b/jupyterhub/.env index 82ce710e2..d452a7505 100644 --- a/jupyterhub/.env +++ b/jupyterhub/.env @@ -5,7 +5,7 @@ JUPYTER_CONFIG_DIR=/opt/stochss-config/.jupyter #AUTH_CLASS=jupyterhub.auth.DummyAuthenticator -JUPYTERHUB_VERSION=1.1.0 +JUPYTERHUB_VERSION=3.1.1 DOCKER_HUB_IMAGE=stochss-hub diff --git a/jupyterhub/jupyterhub_config.py b/jupyterhub/jupyterhub_config.py index 125fa01ee..ecf736b0e 100644 --- a/jupyterhub/jupyterhub_config.py +++ b/jupyterhub/jupyterhub_config.py @@ -228,6 +228,67 @@ def update_users_sets(): elif parts[1] == 'blacklist': blacklist.add(name) + ## Roles managed by JupyterHub + # c.JupyterHub.load_groups = { + # 'stochss-admin-users': list(admin), 'stochss-power-users': list(power_users) + # } + + ## Roles managed by JupyterHub + # c.JupyterHub.load_roles = [ + # { + # 'name': 'idle-culler', + # 'description': 'Culls idle servers after 8hrs', + # "scopes": ["read:users:name", "read:users:activity", "servers"], + # "services": ["cull-idle"] + # }, + # { + # 'name': 'server-rights', + # 'description': 'Allows parties to start and stop user servers', + # 'scopes': [ + # 'admin-ui', + # # Admin users scope + # 'admin:users', + # # Teir 1 + # 'admin:auth_state','users','read:roles:users','delete:users', + # # Teir 2 + # 'read:users','list:users','users:activity', + # # Teir 3 + # 'read:users:name','read:users:groups','read:users:activity','read:users:name','read:users:activity', + # # Read roles scope + # 'read:roles', + # # Teir 1 + # 'read:roles:users','read:roles:services','read:roles:groups', + # # Admin servers scope + # 'admin:servers', + # # Teir 1 + # 'admin:server_state','servers', + # # Teir 2 + # 'read:servers','delete:servers', + # # Teir 3 + # 'read:users:name', + # # Tokens scope + # 'tokens','read:tokens', + # # Admin groups scope + # 'admin:groups', + # # Teir 1 + # 'groups','read:roles:groups','delete:groups', + # # Teir 2 + # 'read:groups','list:groups', + # # Teir 3 + # 'read:groups:name','read:groups:name', + # # List/Read services scope + # 'list:services','read:services','read:services:name', + # 'read:hub','access:servers','access:services','proxy','shutdown','read:metrics' + # ], + # 'users': [ + # 'jupyterhub-user-bmrumsey-40gmail-2ecom,' 'jupyterhub-user-brumsey-40unca-2eedu', + # 'bmrumsey-40gmail-2ecom,' 'brumsey-40unca-2eedu' + # ], + # 'groups': ['stochss-admin-users'], + # "services": ["cull-idle"] + # } + # ] + def get_user_cpu_count_or_fail(): ''' Get the user cpu count or raise error. @@ -267,6 +328,7 @@ def pre_spawn_hook(spawner): log.info(f"Beginning pre_spawn_hook for {spawner.user.name}") # Update admins, power users, and blacklist users update_users_sets() + # Remove the memory limit for power users if c.StochSS.user_cpu_count == 0: spawner.mem_limit = None diff --git a/requirements.txt b/requirements.txt index 671f6e35f..4c6a55181 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +jupyterhub==3.1.1 python-libsbml==5.18.0 python-libsedml==2.0.9 python-libcombine==0.2.7