-
Notifications
You must be signed in to change notification settings - Fork 15
/
jupyterhub_config_local.py
66 lines (60 loc) · 1.54 KB
/
jupyterhub_config_local.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
"""
This file is only used for local development
and overrides some of the default values from the plugin.
"""
from pathlib import Path
from tljh_repo2docker import TLJH_R2D_ADMIN_SCOPE
import sys
HERE = Path(__file__).parent
c.JupyterHub.allow_named_servers = True
c.JupyterHub.services.extend(
[
{
"name": "tljhrepo2docker",
"url": "http://r2d-svc:6789",
"command": [
sys.executable,
"-m",
"tljh_repo2docker",
"--ip",
"0.0.0.0",
"--port",
"6789",
],
"oauth_no_confirm": True,
"oauth_client_allowed_scopes": [
TLJH_R2D_ADMIN_SCOPE,
],
},
]
)
c.JupyterHub.custom_scopes = {
TLJH_R2D_ADMIN_SCOPE: {
"description": "Admin access to myservice",
},
}
c.JupyterHub.load_roles = [
{
"description": "Role for tljh_repo2docker service",
"name": "tljh-repo2docker-service",
"scopes": [
"read:users",
"read:roles:users",
"admin:servers",
],
"services": ["tljhrepo2docker"],
},
{
"name": "tljh-repo2docker-service-admin",
"users": [], # List of users having admin right on tljh-repo2docker
"scopes": [TLJH_R2D_ADMIN_SCOPE],
},
{
"name": "user",
"scopes": [
"self",
# access to the env page
"access:services!service=tljhrepo2docker",
],
},
]