flagflag  
2: 2020-08-21 (Fri) 17:45:56 iseki source Cur: 2020-08-23 (Sun) 11:46:06 iseki source
Line 1: Line 1:
*** LocalProcessSpawner​ 用 サンプル jupyterhub_config.py [#if3be708] *** LocalProcessSpawner​ 用 サンプル jupyterhub_config.py [#if3be708]
 # Configuration file for jupyterhub.  # Configuration file for jupyterhub.
 + 
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 # Application(SingletonConfigurable) configuration  # Application(SingletonConfigurable) configuration
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 + 
 ## This is an application.  ## This is an application.
 + 
 ## The date format used by logging formatters for %(asctime)s  ## The date format used by logging formatters for %(asctime)s
 #c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'  #c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'
 + 
 ## The Logging format template  ## The Logging format template
 #c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'  #c.Application.log_format = '[%(name)s]%(highlevel)s %(message)s'
 + 
 ## Set the log level by value or name.  ## Set the log level by value or name.
 #c.Application.log_level = 30  #c.Application.log_level = 30
 + 
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 # JupyterHub(Application) configuration  # JupyterHub(Application) configuration
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 + 
 ## An Application for starting a Multi-User Jupyter Notebook server.  ## An Application for starting a Multi-User Jupyter Notebook server.
 + 
 ## Maximum number of concurrent servers that can be active at a time.  ## Maximum number of concurrent servers that can be active at a time.
 #  #
Line 37: Line 37:
 #  If set to 0, no limit is enforced.  #  If set to 0, no limit is enforced.
 #c.JupyterHub.active_server_limit = 0  #c.JupyterHub.active_server_limit = 0
 + 
 ## Duration (in seconds) to determine the number of active users.  ## Duration (in seconds) to determine the number of active users.
 #c.JupyterHub.active_user_window = 1800  #c.JupyterHub.active_user_window = 1800
 + 
 ## Resolution (in seconds) for updating activity  ## Resolution (in seconds) for updating activity
 #  #
Line 48: Line 48:
 #  This avoids too many writes to the Hub database.  #  This avoids too many writes to the Hub database.
 #c.JupyterHub.activity_resolution = 30  #c.JupyterHub.activity_resolution = 30
 + 
 ## Grant admin users permission to access single-user servers.  ## Grant admin users permission to access single-user servers.
 #  #
 #  Users should be properly informed if this is enabled.  #  Users should be properly informed if this is enabled.
 #c.JupyterHub.admin_access = False  #c.JupyterHub.admin_access = False
 + 
 ## DEPRECATED since version 0.7.2, use Authenticator.admin_users instead.  ## DEPRECATED since version 0.7.2, use Authenticator.admin_users instead.
 #c.JupyterHub.admin_users = set()  #c.JupyterHub.admin_users = set()
 + 
 ## Allow named single-user servers per user  ## Allow named single-user servers per user
 #c.JupyterHub.allow_named_servers = False  #c.JupyterHub.allow_named_servers = False
 + 
 ## Answer yes to any questions (e.g. confirm overwrite)  ## Answer yes to any questions (e.g. confirm overwrite)
 #c.JupyterHub.answer_yes = False  #c.JupyterHub.answer_yes = False
 + 
 ## PENDING DEPRECATION: consider using services  ## PENDING DEPRECATION: consider using services
 #  #
Line 72: Line 72:
 #  Consider using services for general services that talk to the JupyterHub API.  #  Consider using services for general services that talk to the JupyterHub API.
 #c.JupyterHub.api_tokens = {}  #c.JupyterHub.api_tokens = {}
 + 
 ## Authentication for prometheus metrics  ## Authentication for prometheus metrics
 #c.JupyterHub.authenticate_promethe​us = True  #c.JupyterHub.authenticate_promethe​us = True
 + 
 ## Class for authenticating users.  ## Class for authenticating users.
 #  #
Line 100: Line 100:
 c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator'  c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator'
 c.PAMAuthenticator.open_sessions = False  c.PAMAuthenticator.open_sessions = False
 + 
 # for LDAP  # for LDAP
 #c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'  #c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
Line 106: Line 106:
 #c.LDAPAuthenticator.bind_dn_templa​te = 'uid={username},cn=users,dc=example,dc=c​om'  #c.LDAPAuthenticator.bind_dn_templa​te = 'uid={username},cn=users,dc=example,dc=c​om'
 #c.LDAPAuthenticator.use_ssl = True  #c.LDAPAuthenticator.use_ssl = True
 + 
 ## The base URL of the entire application.  ## The base URL of the entire application.
 #  #
Line 115: Line 115:
 #      Use JupyterHub.bind_url  #      Use JupyterHub.bind_url
 #c.JupyterHub.base_url = '/'  #c.JupyterHub.base_url = '/'
 +  
 + # My IP Address 
 + my_ip_addr = '192.168.27.40' 
 + 
 ## The public facing URL of the whole JupyterHub application.  ## The public facing URL of the whole JupyterHub application.
 #  #
 #  This is the address on which the proxy will bind. Sets protocol, ip, base_url  #  This is the address on which the proxy will bind. Sets protocol, ip, base_url
- c.JupyterHub.bind_url = 'http://192.168.27.20:8000' + c.JupyterHub.bind_url = 'http://'+my_ip_addr+':8000' 
 + 
 ## Whether to shutdown the proxy when the Hub shuts down.  ## Whether to shutdown the proxy when the Hub shuts down.
 #  #
Line 133: Line 136:
 #  The Hub should be able to resume from database state.  #  The Hub should be able to resume from database state.
 #c.JupyterHub.cleanup_proxy = True  #c.JupyterHub.cleanup_proxy = True
 + 
 ## Whether to shutdown single-user servers when the Hub shuts down.  ## Whether to shutdown single-user servers when the Hub shuts down.
 #  #
Line 144: Line 147:
 #  The Hub should be able to resume from database state.  #  The Hub should be able to resume from database state.
 #c.JupyterHub.cleanup_servers = True  #c.JupyterHub.cleanup_servers = True
 + 
 ## Maximum number of concurrent users that can be spawning at a time.  ## Maximum number of concurrent users that can be spawning at a time.
 #  #
Line 161: Line 164:
 #  If set to 0, no limit is enforced.  #  If set to 0, no limit is enforced.
 #c.JupyterHub.concurrent_spawn_limi​t = 100  #c.JupyterHub.concurrent_spawn_limi​t = 100
 + 
 ## The config file to load  ## The config file to load
 #c.JupyterHub.config_file = 'jupyterhub_config.py'  #c.JupyterHub.config_file = 'jupyterhub_config.py'
 + 
 ## DEPRECATED: does nothing  ## DEPRECATED: does nothing
 #c.JupyterHub.confirm_no_ssl = False  #c.JupyterHub.confirm_no_ssl = False
 + 
 ## Number of days for a login cookie to be valid. Default is two weeks.  ## Number of days for a login cookie to be valid. Default is two weeks.
 #c.JupyterHub.cookie_max_age_days = 14  #c.JupyterHub.cookie_max_age_days = 14
 + 
 ## The cookie secret to use to encrypt cookies.  ## The cookie secret to use to encrypt cookies.
 #  #
Line 177: Line 180:
 #  Should be exactly 256 bits (32 bytes).  #  Should be exactly 256 bits (32 bytes).
 #c.JupyterHub.cookie_secret = b''  #c.JupyterHub.cookie_secret = b''
 + 
 ## File in which to store the cookie secret.  ## File in which to store the cookie secret.
 #c.JupyterHub.cookie_secret_file = 'jupyterhub_cookie_secret'  #c.JupyterHub.cookie_secret_file = 'jupyterhub_cookie_secret'
 + 
 ## The location of jupyterhub data files (e.g. /usr/local/share/jupyterhub)  ## The location of jupyterhub data files (e.g. /usr/local/share/jupyterhub)
 #c.JupyterHub.data_files_path = '/usr/local/anaconda/envs/jupyterhub38/s​hare/jupyterhub'  #c.JupyterHub.data_files_path = '/usr/local/anaconda/envs/jupyterhub38/s​hare/jupyterhub'
 + 
 ## Include any kwargs to pass to the database connection. See  ## Include any kwargs to pass to the database connection. See
 #  sqlalchemy.create_engine for details.  #  sqlalchemy.create_engine for details.
 #c.JupyterHub.db_kwargs = {}  #c.JupyterHub.db_kwargs = {}
 + 
 ## url for the database. e.g. `sqlite:///jupyterhub.sqlite`  ## url for the database. e.g. `sqlite:///jupyterhub.sqlite`
 c.JupyterHub.db_url = 'sqlite:////var/lib/jupyterhub/jupyterhu​b.sqlite'  c.JupyterHub.db_url = 'sqlite:////var/lib/jupyterhub/jupyterhu​b.sqlite'
 + 
 ## log all database transactions. This has A LOT of output  ## log all database transactions. This has A LOT of output
 #c.JupyterHub.debug_db = False  #c.JupyterHub.debug_db = False
 + 
 ## DEPRECATED since version 0.8: Use ConfigurableHTTPProxy.debug  ## DEPRECATED since version 0.8: Use ConfigurableHTTPProxy.debug
 #c.JupyterHub.debug_proxy = False  #c.JupyterHub.debug_proxy = False
 + 
 ## If named servers are enabled, default name of server to spawn or open, e.g. by  ## If named servers are enabled, default name of server to spawn or open, e.g. by
 #  user-redirect.  #  user-redirect.
 #c.JupyterHub.default_server_name = ''  #c.JupyterHub.default_server_name = ''
 + 
 ## The default URL for users when they arrive (e.g. when user directs to "/")  ## The default URL for users when they arrive (e.g. when user directs to "/")
 #  #
 #  By default, redirects users to their own server.  #  By default, redirects users to their own server.
 #c.JupyterHub.default_url = ''  #c.JupyterHub.default_url = ''
 + 
 ## Dict authority:dict(files). Specify the key, cert, and/or ca file for an  ## Dict authority:dict(files). Specify the key, cert, and/or ca file for an
 #  authority. This is useful for externally managed proxies that wish to use  #  authority. This is useful for externally managed proxies that wish to use
Line 223: Line 226:
 #  Use with internal_ssl  #  Use with internal_ssl
 #c.JupyterHub.external_ssl_authorit​ies = {}  #c.JupyterHub.external_ssl_authorit​ies = {}
 + 
 ## Register extra tornado Handlers for jupyterhub.  ## Register extra tornado Handlers for jupyterhub.
 #  #
Line 230: Line 233:
 #  The Hub prefix will be added, so `/my-page` will be served at `/hub/my-page`.  #  The Hub prefix will be added, so `/my-page` will be served at `/hub/my-page`.
 #c.JupyterHub.extra_handlers = []  #c.JupyterHub.extra_handlers = []
 + 
 ## DEPRECATED: use output redirection instead, e.g.  ## DEPRECATED: use output redirection instead, e.g.
 #  #
 #  jupyterhub &>> /var/log/jupyterhub.log  #  jupyterhub &>> /var/log/jupyterhub.log
 #c.JupyterHub.extra_log_file = ''  #c.JupyterHub.extra_log_file = ''
 + 
 ## Extra log handlers to set on JupyterHub logger  ## Extra log handlers to set on JupyterHub logger
 #c.JupyterHub.extra_log_handlers = []  #c.JupyterHub.extra_log_handlers = []
 + 
 ## Generate certs used for internal ssl  ## Generate certs used for internal ssl
 #c.JupyterHub.generate_certs = False  #c.JupyterHub.generate_certs = False
 + 
 ## Generate default config file  ## Generate default config file
 #c.JupyterHub.generate_config = False  #c.JupyterHub.generate_config = False
 + 
 ## The URL on which the Hub will listen. This is a private URL for internal  ## The URL on which the Hub will listen. This is a private URL for internal
 #  communication. Typically set in combination with hub_connect_url. If a unix  #  communication. Typically set in combination with hub_connect_url. If a unix
Line 255: Line 258:
 #  #
 #  .. versionadded:: 0.9  #  .. versionadded:: 0.9
- c.JupyterHub.hub_bind_url = 'http://192.168.27.20:8081' + c.JupyterHub.hub_bind_url = 'http://'+my_ip_addr+':8081' 
 + 
 ## The ip or hostname for proxies and spawners to use for connecting to the Hub.  ## The ip or hostname for proxies and spawners to use for connecting to the Hub.
 #  #
Line 270: Line 273:
 #  #
 #  .. versionadded:: 0.8  #  .. versionadded:: 0.8
- c.JupyterHub.hub_connect_ip = '192.168.27.20' + c.JupyterHub.hub_connect_ip = my_ip_addr 
 + 
 ## DEPRECATED  ## DEPRECATED
 #  #
Line 281: Line 284:
 #      Use hub_connect_url  #      Use hub_connect_url
 #c.JupyterHub.hub_connect_port = 0  #c.JupyterHub.hub_connect_port = 0
 + 
 ## The URL for connecting to the Hub. Spawners, services, and the proxy will use  ## The URL for connecting to the Hub. Spawners, services, and the proxy will use
 #  this URL to talk to the Hub.  #  this URL to talk to the Hub.
Line 294: Line 297:
 #  .. versionadded:: 0.9  #  .. versionadded:: 0.9
 #c.JupyterHub.hub_connect_url = ''  #c.JupyterHub.hub_connect_url = ''
 + 
 ## The ip address for the Hub process to *bind* to.  ## The ip address for the Hub process to *bind* to.
 #  #
Line 304: Line 307:
 #  See `hub_connect_ip` for cases where the bind and connect address should  #  See `hub_connect_ip` for cases where the bind and connect address should
 #  differ, or `hub_bind_url` for setting the full bind URL.  #  differ, or `hub_bind_url` for setting the full bind URL.
- #c.JupyterHub.hub_ip = '192.168.27.20' 
 #c.JupyterHub.hub_ip = '127.0.0.1'  #c.JupyterHub.hub_ip = '127.0.0.1'
 c.JupyterHub.hub_ip = '0.0.0.0'  c.JupyterHub.hub_ip = '0.0.0.0'
 + 
 ## The internal port for the Hub process.  ## The internal port for the Hub process.
 #  #
Line 317: Line 319:
 #  See also `hub_ip` for the ip and `hub_bind_url` for setting the full bind URL.  #  See also `hub_ip` for the ip and `hub_bind_url` for setting the full bind URL.
 c.JupyterHub.hub_port = 8081  c.JupyterHub.hub_port = 8081
 + 
 ## Timeout (in seconds) to wait for spawners to initialize  ## Timeout (in seconds) to wait for spawners to initialize
 #  #
Line 332: Line 334:
 #  .. versionadded: 1.1.0  #  .. versionadded: 1.1.0
 #c.JupyterHub.init_spawners_timeout​ = 10  #c.JupyterHub.init_spawners_timeout​ = 10
 + 
 ## The location to store certificates automatically created by JupyterHub.  ## The location to store certificates automatically created by JupyterHub.
 #  #
 #  Use with internal_ssl  #  Use with internal_ssl
 #c.JupyterHub.internal_certs_locati​on = 'internal-ssl'  #c.JupyterHub.internal_certs_locati​on = 'internal-ssl'
 + 
 ## Enable SSL for all internal communication  ## Enable SSL for all internal communication
 #  #
Line 344: Line 346:
 #  sign notebook certificates as they're created.  #  sign notebook certificates as they're created.
 #c.JupyterHub.internal_ssl = False  #c.JupyterHub.internal_ssl = False
 + 
 ## The public facing ip of the whole JupyterHub application (specifically  ## The public facing ip of the whole JupyterHub application (specifically
 #  referred to as the proxy).  #  referred to as the proxy).
Line 354: Line 356:
 #  .. deprecated: 0.9  #  .. deprecated: 0.9
 #      Use JupyterHub.bind_url  #      Use JupyterHub.bind_url
- c.JupyterHub.ip = '192.168.27.20' + #c.JupyterHub.ip = my_ip_addr 
 + 
 ## Supply extra arguments that will be passed to Jinja environment.  ## Supply extra arguments that will be passed to Jinja environment.
 #c.JupyterHub.jinja_environment_options​ = {}  #c.JupyterHub.jinja_environment_options​ = {}
 + 
 ## Interval (in seconds) at which to update last-activity timestamps.  ## Interval (in seconds) at which to update last-activity timestamps.
 #c.JupyterHub.last_activity_interva​l = 300  #c.JupyterHub.last_activity_interva​l = 300
 + 
 ## Dict of 'group': ['usernames'] to load at startup.  ## Dict of 'group': ['usernames'] to load at startup.
 #  #
Line 370: Line 372:
 #  through the API.  #  through the API.
 #c.JupyterHub.load_groups = {}  #c.JupyterHub.load_groups = {}
 + 
 ## Specify path to a logo image to override the Jupyter logo in the banner.  ## Specify path to a logo image to override the Jupyter logo in the banner.
 #c.JupyterHub.logo_file = ''  #c.JupyterHub.logo_file = ''
 + 
 ## Maximum number of concurrent named servers that can be created by a user at a  ## Maximum number of concurrent named servers that can be created by a user at a
 #  time.  #  time.
Line 381: Line 383:
 #  If set to 0, no limit is enforced.  #  If set to 0, no limit is enforced.
 #c.JupyterHub.named_server_limit_per_us​er = 0  #c.JupyterHub.named_server_limit_per_us​er = 0
 + 
 ## File to write PID Useful for daemonizing JupyterHub.  ## File to write PID Useful for daemonizing JupyterHub.
 #c.JupyterHub.pid_file = ''  #c.JupyterHub.pid_file = ''
 + 
 ## The public facing port of the proxy.  ## The public facing port of the proxy.
 #  #
Line 393: Line 395:
 #      Use JupyterHub.bind_url  #      Use JupyterHub.bind_url
 #c.JupyterHub.port = 8000  #c.JupyterHub.port = 8000
 + 
 ## DEPRECATED since version 0.8 : Use ConfigurableHTTPProxy.api_url  ## DEPRECATED since version 0.8 : Use ConfigurableHTTPProxy.api_url
 #c.JupyterHub.proxy_api_ip = ''  #c.JupyterHub.proxy_api_ip = ''
 + 
 ## DEPRECATED since version 0.8 : Use ConfigurableHTTPProxy.api_url  ## DEPRECATED since version 0.8 : Use ConfigurableHTTPProxy.api_url
 #c.JupyterHub.proxy_api_port = 0  #c.JupyterHub.proxy_api_port = 0
 + 
 ## DEPRECATED since version 0.8: Use ConfigurableHTTPProxy.auth_token  ## DEPRECATED since version 0.8: Use ConfigurableHTTPProxy.auth_token
 #c.JupyterHub.proxy_auth_token = ''  #c.JupyterHub.proxy_auth_token = ''
 + 
 ## Interval (in seconds) at which to check if the proxy is running.  ## Interval (in seconds) at which to check if the proxy is running.
 #c.JupyterHub.proxy_check_interval = 30  #c.JupyterHub.proxy_check_interval = 30
 + 
 ## The class to use for configuring the JupyterHub proxy.  ## The class to use for configuring the JupyterHub proxy.
 #  #
Line 418: Line 420:
 #    - default: jupyterhub.proxy.ConfigurableHTTPProxy  #    - default: jupyterhub.proxy.ConfigurableHTTPProxy
 #c.JupyterHub.proxy_class = 'jupyterhub.proxy.ConfigurableHTTPProxy'​  #c.JupyterHub.proxy_class = 'jupyterhub.proxy.ConfigurableHTTPProxy'​
 + 
 ## DEPRECATED since version 0.8. Use ConfigurableHTTPProxy.command  ## DEPRECATED since version 0.8. Use ConfigurableHTTPProxy.command
 #c.JupyterHub.proxy_cmd = []  #c.JupyterHub.proxy_cmd = []
 + 
 ## Recreate all certificates used within JupyterHub on restart.  ## Recreate all certificates used within JupyterHub on restart.
 #  #
Line 428: Line 430:
 #  Use with internal_ssl  #  Use with internal_ssl
 #c.JupyterHub.recreate_internal_cer​ts = False  #c.JupyterHub.recreate_internal_cer​ts = False
 + 
 ## Redirect user to server (if running), instead of control panel.  ## Redirect user to server (if running), instead of control panel.
 #c.JupyterHub.redirect_to_server = True  #c.JupyterHub.redirect_to_server = True
 + 
 ## Purge and reset the database.  ## Purge and reset the database.
 #c.JupyterHub.reset_db = False  #c.JupyterHub.reset_db = False
 + 
 ## Interval (in seconds) at which to check connectivity of services with web  ## Interval (in seconds) at which to check connectivity of services with web
 #  endpoints.  #  endpoints.
 #c.JupyterHub.service_check_interva​l = 60  #c.JupyterHub.service_check_interva​l = 60
 + 
 ## Dict of token:servicename to be loaded into the database.  ## Dict of token:servicename to be loaded into the database.
 #  #
Line 444: Line 446:
 #  services.  #  services.
 #c.JupyterHub.service_tokens = {}  #c.JupyterHub.service_tokens = {}
 + 
 ## List of service specification dictionaries.  ## List of service specification dictionaries.
 #  #
Line 464: Line 466:
 #      ]  #      ]
 #c.JupyterHub.services = []  #c.JupyterHub.services = []
 + 
 ## Shuts down all user servers on logout  ## Shuts down all user servers on logout
 #c.JupyterHub.shutdown_on_logout = False  #c.JupyterHub.shutdown_on_logout = False
 + 
 ## The class to use for spawning single-user servers.  ## The class to use for spawning single-user servers.
 #  #
Line 487: Line 489:
 #c.JupyterHub.spawner_class = 'coursewareuserspawner.CoursewareUserSpa​wner'  #c.JupyterHub.spawner_class = 'coursewareuserspawner.CoursewareUserSpa​wner'
 #c.JupyterHub.spawner_class = 'dockerspawner.SwarmSpawner'  #c.JupyterHub.spawner_class = 'dockerspawner.SwarmSpawner'
 + 
 #c.DockerSpawner.image = 'niicloudoperation/jupyterhub-singleuser​'  #c.DockerSpawner.image = 'niicloudoperation/jupyterhub-singleuser​'
 #c.DockerSpawner.image = 'niicloudoperation/notebook'  #c.DockerSpawner.image = 'niicloudoperation/notebook'
Line 499: Line 501:
 #    "coursewarehub": "niicloudoperation/jupyterhub-singleuser",  #    "coursewarehub": "niicloudoperation/jupyterhub-singleuser",
 #}  #}
- c.DockerSpawner.remove = True + #c.DockerSpawner.remove = True 
- c.DockerSpawner.extra_create_kwargs​ = {'user': 'root'}+ #c.DockerSpawner.extra_create_kwargs = {'user': 'root'}
 #c.DockerSpawner.extra_host_config = {'runtime': 'nvidia'}  #c.DockerSpawner.extra_host_config = {'runtime': 'nvidia'}
 c.Spawner.environment = {'GRANT_SUDO': 'yes'}  c.Spawner.environment = {'GRANT_SUDO': 'yes'}
- notebook_dir = '/home/jovyan/work' + #notebook_dir = '/home/jovyan/work' 
- c.DockerSpawner.notebook_dir = notebook_dir + #c.DockerSpawner.notebook_dir = notebook_dir 
- c.DockerSpawner.volumes = { 'jupyterhub-user-{username}': notebook_dir } + #c.DockerSpawner.volumes = { 'jupyterhub-user-{username}': notebook_dir } 
 + 
 #from jupyter_client.localinterfaces import public_ips  #from jupyter_client.localinterfaces import public_ips
 #c.JupyterHub.hub_ip = public_ips()[0]  #c.JupyterHub.hub_ip = public_ips()[0]
- +  
- +  
 + 
 ## Path to SSL certificate file for the public facing interface of the proxy  ## Path to SSL certificate file for the public facing interface of the proxy
 #  #
 #  When setting this, you should also set ssl_key  #  When setting this, you should also set ssl_key
 #c.JupyterHub.ssl_cert = ''  #c.JupyterHub.ssl_cert = ''
 + 
 ## Path to SSL key file for the public facing interface of the proxy  ## Path to SSL key file for the public facing interface of the proxy
 #  #
 #  When setting this, you should also set ssl_cert  #  When setting this, you should also set ssl_cert
 #c.JupyterHub.ssl_key = ''  #c.JupyterHub.ssl_key = ''
 + 
 ## Host to send statsd metrics to. An empty string (the default) disables sending  ## Host to send statsd metrics to. An empty string (the default) disables sending
 #  metrics.  #  metrics.
 #c.JupyterHub.statsd_host = ''  #c.JupyterHub.statsd_host = ''
 + 
 ## Port on which to send statsd metrics about the hub  ## Port on which to send statsd metrics about the hub
 #c.JupyterHub.statsd_port = 8125  #c.JupyterHub.statsd_port = 8125
 + 
 ## Prefix to use for all metrics sent by jupyterhub to statsd  ## Prefix to use for all metrics sent by jupyterhub to statsd
 #c.JupyterHub.statsd_prefix = 'jupyterhub'  #c.JupyterHub.statsd_prefix = 'jupyterhub'
 + 
 ## Run single-user servers on subdomains of this host.  ## Run single-user servers on subdomains of this host.
 #  #
Line 546: Line 548:
 #  When using SSL (i.e. always) this also requires a wildcard SSL certificate.  #  When using SSL (i.e. always) this also requires a wildcard SSL certificate.
 #c.JupyterHub.subdomain_host = ''  #c.JupyterHub.subdomain_host = ''
 + 
 ## Paths to search for jinja templates, before using the default templates.  ## Paths to search for jinja templates, before using the default templates.
 #c.JupyterHub.template_paths = []  #c.JupyterHub.template_paths = []
 + 
 ## Extra variables to be passed into jinja templates  ## Extra variables to be passed into jinja templates
 #c.JupyterHub.template_vars = {}  #c.JupyterHub.template_vars = {}
 + 
 ## Extra settings overrides to pass to the tornado application.  ## Extra settings overrides to pass to the tornado application.
 #c.JupyterHub.tornado_settings = {}  #c.JupyterHub.tornado_settings = {}
 + 
 ## Trust user-provided tokens (via JupyterHub.service_tokens) to have good  ## Trust user-provided tokens (via JupyterHub.service_tokens) to have good
 #  entropy.  #  entropy.
Line 575: Line 577:
 #  of checking authentication tokens.  #  of checking authentication tokens.
 #c.JupyterHub.trust_user_provided_token​s = False  #c.JupyterHub.trust_user_provided_token​s = False
 + 
 ## Names to include in the subject alternative name.  ## Names to include in the subject alternative name.
 #  #
Line 584: Line 586:
 #  Use with internal_ssl  #  Use with internal_ssl
 #c.JupyterHub.trusted_alt_names = []  #c.JupyterHub.trusted_alt_names = []
 + 
 ## Downstream proxy IP addresses to trust.  ## Downstream proxy IP addresses to trust.
 #  #
Line 593: Line 595:
 #  proxy server's IP address.  #  proxy server's IP address.
 #c.JupyterHub.trusted_downstream_ip​s = []  #c.JupyterHub.trusted_downstream_ip​s = []
 + 
 ## Upgrade the database automatically on start.  ## Upgrade the database automatically on start.
 #  #
Line 599: Line 601:
 #  backed up to a local file automatically.  #  backed up to a local file automatically.
 #c.JupyterHub.upgrade_db = False  #c.JupyterHub.upgrade_db = False
 + 
 ## Callable to affect behavior of /user-redirect/  ## Callable to affect behavior of /user-redirect/
 #  #
Line 610: Line 612:
 #  behavior.  #  behavior.
 #c.JupyterHub.user_redirect_hook = None  #c.JupyterHub.user_redirect_hook = None
 + 
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 # Spawner(LoggingConfigurable) configuration  # Spawner(LoggingConfigurable) configuration
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 + 
 ## Base class for spawning single-user notebook servers.  ## Base class for spawning single-user notebook servers.
 #  #
Line 624: Line 626:
 #  created for each user. If there are 20 JupyterHub users, there will be 20  #  created for each user. If there are 20 JupyterHub users, there will be 20
 #  instances of the subclass.  #  instances of the subclass.
 + 
 ## Extra arguments to be passed to the single-user server.  ## Extra arguments to be passed to the single-user server.
 #  #
Line 631: Line 633:
 #  documentation for your spawner to verify!  #  documentation for your spawner to verify!
 #c.Spawner.args = []  #c.Spawner.args = []
 + 
 ## An optional hook function that you can implement to pass `auth_state` to the  ## An optional hook function that you can implement to pass `auth_state` to the
 #  spawner after it has been initialized but before it starts. The `auth_state`  #  spawner after it has been initialized but before it starts. The `auth_state`
Line 644: Line 646:
 #      c.Spawner.auth_state_hook = userdata_hook  #      c.Spawner.auth_state_hook = userdata_hook
 #c.Spawner.auth_state_hook = None  #c.Spawner.auth_state_hook = None
 + 
 ## The command used for starting the single-user server.  ## The command used for starting the single-user server.
 #  #
Line 657: Line 659:
 #  documentation for your spawner to verify!  #  documentation for your spawner to verify!
 #c.Spawner.cmd = ['jupyterhub-singleuser']  #c.Spawner.cmd = ['jupyterhub-singleuser']
 + 
 ## Maximum number of consecutive failures to allow before shutting down  ## Maximum number of consecutive failures to allow before shutting down
 #  JupyterHub.  #  JupyterHub.
Line 667: Line 669:
 #  A limit of 0 means no limit and consecutive failures will not be tracked.  #  A limit of 0 means no limit and consecutive failures will not be tracked.
 #c.Spawner.consecutive_failure_limi​t = 0  #c.Spawner.consecutive_failure_limi​t = 0
 + 
 ## Minimum number of cpu-cores a single-user notebook server is guaranteed to  ## Minimum number of cpu-cores a single-user notebook server is guaranteed to
 #  have available.  #  have available.
Line 679: Line 681:
 #  for it to be enforced.  #  for it to be enforced.
 #c.Spawner.cpu_guarantee = None  #c.Spawner.cpu_guarantee = None
 + 
 ## Maximum number of cpu-cores a single-user notebook server is allowed to use.  ## Maximum number of cpu-cores a single-user notebook server is allowed to use.
 #  #
Line 694: Line 696:
 #  for it to be enforced.  #  for it to be enforced.
 #c.Spawner.cpu_limit = None  #c.Spawner.cpu_limit = None
 + 
 ## Enable debug-logging of the single-user server  ## Enable debug-logging of the single-user server
 #c.Spawner.debug = False  #c.Spawner.debug = False
 + 
 ## The URL the single-user server should start in.  ## The URL the single-user server should start in.
 #  #
Line 709: Line 711:
 #  - You can set this to `/lab` to have JupyterLab start by default, rather than Jupyter Notebook.  #  - You can set this to `/lab` to have JupyterLab start by default, rather than Jupyter Notebook.
 c.Spawner.default_url = '/lab'  c.Spawner.default_url = '/lab'
 + 
 ## Disable per-user configuration of single-user servers.  ## Disable per-user configuration of single-user servers.
 #  #
Line 719: Line 721:
 #  / containers.  #  / containers.
 #c.Spawner.disable_user_config = False  #c.Spawner.disable_user_config = False
 + 
 ## Whitelist of environment variables for the single-user server to inherit from  ## Whitelist of environment variables for the single-user server to inherit from
 #  the JupyterHub process.  #  the JupyterHub process.
Line 727: Line 729:
 #  single-user server's process.  #  single-user server's process.
 #c.Spawner.env_keep = ['PATH', 'PYTHONPATH', 'CONDA_ROOT', 'CONDA_DEFAULT_ENV', 'VIRTUAL_ENV', 'LANG', 'LC_ALL']  #c.Spawner.env_keep = ['PATH', 'PYTHONPATH', 'CONDA_ROOT', 'CONDA_DEFAULT_ENV', 'VIRTUAL_ENV', 'LANG', 'LC_ALL']
 + 
 ## Extra environment variables to set for the single-user server's process.  ## Extra environment variables to set for the single-user server's process.
 #  #
Line 746: Line 748:
 #  continues to work after upgrades!  #  continues to work after upgrades!
 #c.Spawner.environment = {}  #c.Spawner.environment = {}
 + 
 ## Timeout (in seconds) before giving up on a spawned HTTP server  ## Timeout (in seconds) before giving up on a spawned HTTP server
 #  #
Line 752: Line 754:
 #  wait before assuming that the server is unable to accept connections.  #  wait before assuming that the server is unable to accept connections.
 #c.Spawner.http_timeout = 30  #c.Spawner.http_timeout = 30
 + 
 ## The IP address (or hostname) the single-user server should listen on.  ## The IP address (or hostname) the single-user server should listen on.
 #  #
Line 758: Line 760:
 #  interface.  #  interface.
 #c.Spawner.ip = ''  #c.Spawner.ip = ''
 + 
 ## Minimum number of bytes a single-user notebook server is guaranteed to have  ## Minimum number of bytes a single-user notebook server is guaranteed to have
 #  available.  #  available.
Line 773: Line 775:
 #  for it to be enforced.  #  for it to be enforced.
 #c.Spawner.mem_guarantee = None  #c.Spawner.mem_guarantee = None
 + 
 ## Maximum number of bytes a single-user notebook server is allowed to use.  ## Maximum number of bytes a single-user notebook server is allowed to use.
 #  #
Line 791: Line 793:
 #  for it to be enforced.  #  for it to be enforced.
 #c.Spawner.mem_limit = None  #c.Spawner.mem_limit = None
 + 
 ## Path to the notebook directory for the single-user server.  ## Path to the notebook directory for the single-user server.
 #  #
Line 804: Line 806:
 #  path! They can do so with many other means.  #  path! They can do so with many other means.
 #c.Spawner.notebook_dir = '/home/jupyter'  #c.Spawner.notebook_dir = '/home/jupyter'
- c.Spawner.notebook_dir = '~/notebook' + #c.Spawner.notebook_dir = '/notebook'     note set!  it is because, this has bug! 
 + 
 ## An HTML form for options a user can specify on launching their server.  ## An HTML form for options a user can specify on launching their server.
 #  #
Line 832: Line 834:
 #  so using this functionality might cause your JupyterHub upgrades to break.  #  so using this functionality might cause your JupyterHub upgrades to break.
 #c.Spawner.options_form = traitlets.Undefined  #c.Spawner.options_form = traitlets.Undefined
 + 
 ## Interval (in seconds) on which to poll the spawner for single-user server's  ## Interval (in seconds) on which to poll the spawner for single-user server's
 #  status.  #  status.
Line 841: Line 843:
 #  from the configurable proxy.  #  from the configurable proxy.
 #c.Spawner.poll_interval = 30  #c.Spawner.poll_interval = 30
 + 
 ## The port for single-user servers to listen on.  ## The port for single-user servers to listen on.
 #  #
Line 851: Line 853:
 #  New in version 0.7.  #  New in version 0.7.
 #c.Spawner.port = 0  #c.Spawner.port = 0
 + 
 ## An optional hook function that you can implement to do work after the spawner  ## An optional hook function that you can implement to do work after the spawner
 #  stops.  #  stops.
Line 857: Line 859:
 #  This can be set independent of any concrete spawner implementation.  #  This can be set independent of any concrete spawner implementation.
 #c.Spawner.post_stop_hook = None  #c.Spawner.post_stop_hook = None
 + 
 ## An optional hook function that you can implement to do some bootstrapping work  ## An optional hook function that you can implement to do some bootstrapping work
 #  before the spawner starts. For example, create a directory for your user or  #  before the spawner starts. For example, create a directory for your user or
Line 875: Line 877:
 #      c.Spawner.pre_spawn_hook = my_hook  #      c.Spawner.pre_spawn_hook = my_hook
 #c.Spawner.pre_spawn_hook = None  #c.Spawner.pre_spawn_hook = None
 + 
 ## List of SSL alt names  ## List of SSL alt names
 #  #
Line 881: Line 883:
 #  runtime by Spawner that know their names.  #  runtime by Spawner that know their names.
 #c.Spawner.ssl_alt_names = []  #c.Spawner.ssl_alt_names = []
 + 
 ## Whether to include DNS:localhost, IP:127.0.0.1 in alt names  ## Whether to include DNS:localhost, IP:127.0.0.1 in alt names
 #c.Spawner.ssl_alt_names_include_lo​cal = True  #c.Spawner.ssl_alt_names_include_lo​cal = True
 + 
 ## Timeout (in seconds) before giving up on starting of single-user server.  ## Timeout (in seconds) before giving up on starting of single-user server.
 #  #
Line 892: Line 894:
 #  and its location is known.  #  and its location is known.
 #c.Spawner.start_timeout = 60  #c.Spawner.start_timeout = 60
 + 
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 # Authenticator(LoggingConfigurable) configuration  # Authenticator(LoggingConfigurable) configuration
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 + 
 ## Base class for implementing an authentication provider for JupyterHub  ## Base class for implementing an authentication provider for JupyterHub
 + 
 ## Set of users that will have admin rights on this JupyterHub.  ## Set of users that will have admin rights on this JupyterHub.
 #  #
Line 913: Line 915:
 #c.Authenticator.admin_users = set()  #c.Authenticator.admin_users = set()
 c.Authenticator.admin_users = {'admin'}  c.Authenticator.admin_users = {'admin'}
 + 
 ## The max age (in seconds) of authentication info before forcing a refresh of  ## The max age (in seconds) of authentication info before forcing a refresh of
 #  user auth info.  #  user auth info.
Line 922: Line 924:
 #  (nothing by default).  #  (nothing by default).
 #c.Authenticator.auth_refresh_age = 300  #c.Authenticator.auth_refresh_age = 300
 + 
 ## Automatically begin the login process  ## Automatically begin the login process
 #  #
Line 933: Line 935:
 #  .. versionadded:: 0.8  #  .. versionadded:: 0.8
 #c.Authenticator.auto_login = False  #c.Authenticator.auto_login = False
 + 
 ## Blacklist of usernames that are not allowed to log in.  ## Blacklist of usernames that are not allowed to log in.
 #  #
Line 944: Line 946:
 #  .. versionadded: 0.9  #  .. versionadded: 0.9
 #c.Authenticator.blacklist = set()  #c.Authenticator.blacklist = set()
 + 
 ## Enable persisting auth_state (if available).  ## Enable persisting auth_state (if available).
 #  #
Line 961: Line 963:
 #  New in JupyterHub 0.8  #  New in JupyterHub 0.8
 #c.Authenticator.enable_auth_state = False  #c.Authenticator.enable_auth_state = False
 + 
 ## An optional hook function that you can implement to do some bootstrapping work  ## An optional hook function that you can implement to do some bootstrapping work
 #  during authentication. For example, loading user account details from an  #  during authentication. For example, loading user account details from an
Line 992: Line 994:
 #      c.Authenticator.post_auth_hook = my_hook  #      c.Authenticator.post_auth_hook = my_hook
 #c.Authenticator.post_auth_hook = None  #c.Authenticator.post_auth_hook = None
 + 
 ## Force refresh of auth prior to spawn.  ## Force refresh of auth prior to spawn.
 #  #
Line 1004: Line 1006:
 #  user logs in again.  #  user logs in again.
 #c.Authenticator.refresh_pre_spawn = False  #c.Authenticator.refresh_pre_spawn = False
 + 
 ## Dictionary mapping authenticator usernames to JupyterHub users.  ## Dictionary mapping authenticator usernames to JupyterHub users.
 #  #
 #  Primarily used to normalize OAuth user names to local users.  #  Primarily used to normalize OAuth user names to local users.
 #c.Authenticator.username_map = {}  #c.Authenticator.username_map = {}
 + 
 ## Regular expression pattern that all valid usernames must match.  ## Regular expression pattern that all valid usernames must match.
 #  #
Line 1017: Line 1019:
 #  If not set, allow any username.  #  If not set, allow any username.
 #c.Authenticator.username_pattern = ''  #c.Authenticator.username_pattern = ''
 + 
 ## Whitelist of usernames that are allowed to log in.  ## Whitelist of usernames that are allowed to log in.
 #  #
Line 1026: Line 1028:
 #  If empty, does not perform any additional restriction.  #  If empty, does not perform any additional restriction.
 #c.Authenticator.whitelist = set()  #c.Authenticator.whitelist = set()
 + 
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 # CryptKeeper(SingletonConfigurable) configuration  # CryptKeeper(SingletonConfigurable) configuration
 #--------------------------------------​----------------------------------------​  #--------------------------------------​----------------------------------------​
 + 
 ## Encapsulate encryption configuration  ## Encapsulate encryption configuration
 #  #
 #  Use via the encryption_config singleton below.  #  Use via the encryption_config singleton below.
 + 
 ##  ##
 #c.CryptKeeper.keys = []  #c.CryptKeeper.keys = []
 + 
 ## The number of threads to allocate for encryption  ## The number of threads to allocate for encryption
 #c.CryptKeeper.n_threads = 16  #c.CryptKeeper.n_threads = 16
#br #br


Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
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
Today

Who's Online

40 user(s) are online (3 user(s) are browsing xpwiki)

Members: 0
Guests: 40

more...

Access Counter

Today : 4093409340934093
Yesterday : 5790579057905790
Total : 2365688923656889236568892365688923656889236568892365688923656889
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com