Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
fix: Register jupyterhub api token (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgwerner authored May 26, 2020
1 parent 0160d3e commit 9342037
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ansible/roles/jupyterhub/files/jupyterhub_config_fu.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,12 @@

# Mount volumes
c.DockerSpawner.volumes = {
f'{mnt_root}/{org_name}' + '/home/{username}': notebook_dir,
f'{mnt_root}/{org_name}' + '/home/{raw_username}': notebook_dir,
f'{mnt_root}/{org_name}/exchange': exchange_dir,
}

c.DockerSpawner.name_template = 'jupyter-{raw_username}'

##########################################
# END CUSTOM DOCKERSPAWNER
##########################################
4 changes: 4 additions & 0 deletions ansible/roles/jupyterhub/files/jupyterhub_config_lti11.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@
c.JupyterHub.admin_access = True

# Define some static services that jupyterhub will manage
# Although the cull-idle service is internal, and therefore does not need an explicit
# registration of the jupyterhub api token, we add it here so the internal api client
# can use the token to utilize RESTful endpoints with full CRUD priviledges.
announcement_port = os.environ.get('ANNOUNCEMENT_SERVICE_PORT') or '8889'
c.JupyterHub.services = [
{
'name': 'idle-culler',
'admin': True,
'command': [sys.executable, '-m', 'jupyterhub_idle_culler', '--timeout=3600'],
'api_token': os.environ.get('JUPYTERHUB_API_TOKEN'),
},
{
'name': 'announcement',
Expand Down
4 changes: 4 additions & 0 deletions ansible/roles/jupyterhub/files/jupyterhub_config_lti13.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@
c.JupyterHub.admin_access = True

# Define some static services that jupyterhub will manage
# Although the cull-idle service is internal, and therefore does not need an explicit
# registration of the jupyterhub api token, we add it here so the internal api client
# can use the token to utilize RESTful endpoints with full CRUD priviledges.
announcement_port = os.environ.get('ANNOUNCEMENT_SERVICE_PORT') or '8889'
c.JupyterHub.services = [
{
'name': 'idle-culler',
'admin': True,
'command': [sys.executable, '-m', 'jupyterhub_idle_culler', '--timeout=3600'],
'api_token': os.environ.get('JUPYTERHUB_API_TOKEN'),
},
{
'name': 'announcement',
Expand Down

0 comments on commit 9342037

Please sign in to comment.