3: 2020-08-23 (日) 02:49:18 iseki  |
現: 2020-08-23 (日) 11:46:06 iseki  |
| *** 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. |
| # | | # |
| # 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 |
| # | | # |
| # 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 |
| # | | # |
| # 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_prometheus = True | | #c.JupyterHub.authenticate_prometheus = True |
| + | |
| ## Class for authenticating users. | | ## Class for authenticating users. |
| # | | # |
| 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' |
| #c.LDAPAuthenticator.bind_dn_template = 'uid={username},cn=users,dc=example,dc=com' | | #c.LDAPAuthenticator.bind_dn_template = 'uid={username},cn=users,dc=example,dc=com' |
| #c.LDAPAuthenticator.use_ssl = True | | #c.LDAPAuthenticator.use_ssl = True |
| + | |
| ## The base URL of the entire application. | | ## The base URL of the entire application. |
| # | | # |
| # Use JupyterHub.bind_url | | # Use JupyterHub.bind_url |
| #c.JupyterHub.base_url = '/' | | #c.JupyterHub.base_url = '/' |
| + | |
| # My IP Address | | # My IP Address |
| my_ip_addr = '192.168.27.40' | | 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://'+my_ip_addr+':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. |
| # | | # |
| # 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. |
| # | | # |
| # 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. |
| # | | # |
| # If set to 0, no limit is enforced. | | # If set to 0, no limit is enforced. |
| #c.JupyterHub.concurrent_spawn_limit = 100 | | #c.JupyterHub.concurrent_spawn_limit = 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. |
| # | | # |
| # 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/share/jupyterhub' | | #c.JupyterHub.data_files_path = '/usr/local/anaconda/envs/jupyterhub38/share/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/jupyterhub.sqlite' | | c.JupyterHub.db_url = 'sqlite:////var/lib/jupyterhub/jupyterhub.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 |
| # Use with internal_ssl | | # Use with internal_ssl |
| #c.JupyterHub.external_ssl_authorities = {} | | #c.JupyterHub.external_ssl_authorities = {} |
| + | |
| ## Register extra tornado Handlers for jupyterhub. | | ## Register extra tornado Handlers for jupyterhub. |
| # | | # |
| # 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 |
| # .. versionadded:: 0.9 | | # .. versionadded:: 0.9 |
| c.JupyterHub.hub_bind_url = 'http://'+my_ip_addr+':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. |
| # | | # |
| # .. versionadded:: 0.8 | | # .. versionadded:: 0.8 |
| c.JupyterHub.hub_connect_ip = my_ip_addr | | c.JupyterHub.hub_connect_ip = my_ip_addr |
| + | |
| ## DEPRECATED | | ## DEPRECATED |
| # | | # |
| # 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. |
| # .. 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. |
| # | | # |
| #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. |
| # | | # |
| # 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 |
| # | | # |
| # .. 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_location = 'internal-ssl' | | #c.JupyterHub.internal_certs_location = 'internal-ssl' |
| + | |
| ## Enable SSL for all internal communication | | ## Enable SSL for all internal communication |
| # | | # |
| # 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). |
| # .. deprecated: 0.9 | | # .. deprecated: 0.9 |
| # Use JupyterHub.bind_url | | # Use JupyterHub.bind_url |
- | c.JupyterHub.ip = my_ip_addr | + | #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_interval = 300 | | #c.JupyterHub.last_activity_interval = 300 |
| + | |
| ## Dict of 'group': ['usernames'] to load at startup. | | ## Dict of 'group': ['usernames'] to load at startup. |
| # | | # |
| # 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. |
| # If set to 0, no limit is enforced. | | # If set to 0, no limit is enforced. |
| #c.JupyterHub.named_server_limit_per_user = 0 | | #c.JupyterHub.named_server_limit_per_user = 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. |
| # | | # |
| # 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. |
| # | | # |
| # - 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. |
| # | | # |
| # Use with internal_ssl | | # Use with internal_ssl |
| #c.JupyterHub.recreate_internal_certs = False | | #c.JupyterHub.recreate_internal_certs = 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_interval = 60 | | #c.JupyterHub.service_check_interval = 60 |
| + | |
| ## Dict of token:servicename to be loaded into the database. | | ## Dict of token:servicename to be loaded into the database. |
| # | | # |
| # services. | | # services. |
| #c.JupyterHub.service_tokens = {} | | #c.JupyterHub.service_tokens = {} |
| + | |
| ## List of service specification dictionaries. | | ## List of service specification dictionaries. |
| # | | # |
| # ] | | # ] |
| #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. |
| # | | # |
| #c.JupyterHub.spawner_class = 'coursewareuserspawner.CoursewareUserSpawner' | | #c.JupyterHub.spawner_class = 'coursewareuserspawner.CoursewareUserSpawner' |
| #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' |
| #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. |
| # | | # |
| # 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. |
| # of checking authentication tokens. | | # of checking authentication tokens. |
| #c.JupyterHub.trust_user_provided_tokens = False | | #c.JupyterHub.trust_user_provided_tokens = False |
| + | |
| ## Names to include in the subject alternative name. | | ## Names to include in the subject alternative name. |
| # | | # |
| # 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. |
| # | | # |
| # proxy server's IP address. | | # proxy server's IP address. |
| #c.JupyterHub.trusted_downstream_ips = [] | | #c.JupyterHub.trusted_downstream_ips = [] |
| + | |
| ## Upgrade the database automatically on start. | | ## Upgrade the database automatically on start. |
| # | | # |
| # 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/ |
| # | | # |
| # 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. |
| # | | # |
| # 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. |
| # | | # |
| # 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` |
| # 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. |
| # | | # |
| # 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. |
| # 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_limit = 0 | | #c.Spawner.consecutive_failure_limit = 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. |
| # 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. |
| # | | # |
| # 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. |
| # | | # |
| # - 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. |
| # | | # |
| # / 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. |
| # 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. |
| # | | # |
| # 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 |
| # | | # |
| # 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. |
| # | | # |
| # 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. |
| # 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. |
| # | | # |
| # 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. |
| # | | # |
| #c.Spawner.notebook_dir = '/home/jupyter' | | #c.Spawner.notebook_dir = '/home/jupyter' |
| #c.Spawner.notebook_dir = '/notebook' note set! it is because, this has bug! | | #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. |
| # | | # |
| # 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. |
| # 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. |
| # | | # |
| # 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. |
| # 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 |
| # 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 |
| # | | # |
| # 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_local = True | | #c.Spawner.ssl_alt_names_include_local = 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. |
| # | | # |
| # 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. |
| # | | # |
| #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. |
| # (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 |
| # | | # |
| # .. 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. |
| # | | # |
| # .. 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). |
| # | | # |
| # 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 |
| # 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. |
| # | | # |
| # 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. |
| # | | # |
| # 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. |
| # | | # |
| # 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 |