9. Configuration and Source Code Reference

9.1. app

expand icon

9.1. app

9.1.1. Module: binderhub.app

The binderhub application

9.1.2. BinderHub

class binderhub.app.BinderHub(**kwargs)

An Application for starting a builder.

config c.BinderHub.build_namespace = Unicode('default')

Kubernetes namespace to spawn build pods in.

Note that the docker_push_secret must refer to a secret in this namespace.

config c.BinderHub.builder_image_spec = Unicode('jupyter/repo2docker:v0.2.5')

The builder image to be used for doing builds

config c.BinderHub.config_file = Unicode('binderhub_config.py')

Config file to load.

If a relative path is provided, it is taken relative to current directory

config c.BinderHub.debug = Bool(False)

Turn on debugging.

config c.BinderHub.docker_image_prefix = Unicode('')

Prefix for all built docker images.

If you are pushing to gcr.io, you would have this be:
gcr.io/<your-project-name>/

Set according to whatever registry you are pushing to.

Defaults to “”, which is probably not what you want :)

config c.BinderHub.docker_push_secret = Unicode('docker-push-secret')

A kubernetes secret object that provides credentials for pushing built images.

config c.BinderHub.github_auth_token = Unicode(None)

GitHub OAuth token to use for talking to the GitHub API.

Might get throttled otherwise!

config c.BinderHub.google_analytics_code = Unicode(None)

The Google Analytics code to use on the main page.

Note that we’ll respect Do Not Track settings, despite the fact that GA does not. We will not load the GA scripts on browsers with DNT enabled.

config c.BinderHub.hub_login_url = Unicode(None)

The hub login URL to redirect the user to after image is built.

It’ll get all runtime parameters as query parameters, and it is the responsibility of the hub to launch this properly

config c.BinderHub.log_datefmt = Unicode('%Y-%m-%d %H:%M:%S')

The date format used by logging formatters for %(asctime)s

config c.BinderHub.log_format = Unicode('[%(name)s]%(highlevel)s %(message)s')

The Logging format template

config c.BinderHub.log_level = Enum(30)

Set the log level by value or name.

config c.BinderHub.port = Int(8585)

Port for the builder to listen on.

config c.BinderHub.repo_providers = Dict()

List of Repo Providers to register and try

config c.BinderHub.use_registry = Bool(True)

Set to true to push images to a registry & check for images in registry.

Set to false to use only local docker images. Useful when running in a single node.

config c.BinderHub.build_namespace = Unicode('default')

Kubernetes namespace to spawn build pods in.

Note that the docker_push_secret must refer to a secret in this namespace.

config c.BinderHub.builder_image_spec = Unicode('jupyter/repo2docker:v0.2.5')

The builder image to be used for doing builds

config c.BinderHub.config_file = Unicode('binderhub_config.py')

Config file to load.

If a relative path is provided, it is taken relative to current directory

config c.BinderHub.debug = Bool(False)

Turn on debugging.

config c.BinderHub.docker_image_prefix = Unicode('')

Prefix for all built docker images.

If you are pushing to gcr.io, you would have this be:
gcr.io/<your-project-name>/

Set according to whatever registry you are pushing to.

Defaults to “”, which is probably not what you want :)

config c.BinderHub.docker_push_secret = Unicode('docker-push-secret')

A kubernetes secret object that provides credentials for pushing built images.

config c.BinderHub.github_auth_token = Unicode(None)

GitHub OAuth token to use for talking to the GitHub API.

Might get throttled otherwise!

config c.BinderHub.google_analytics_code = Unicode(None)

The Google Analytics code to use on the main page.

Note that we’ll respect Do Not Track settings, despite the fact that GA does not. We will not load the GA scripts on browsers with DNT enabled.

config c.BinderHub.hub_login_url = Unicode(None)

The hub login URL to redirect the user to after image is built.

It’ll get all runtime parameters as query parameters, and it is the responsibility of the hub to launch this properly

initialize(*args, **kwargs)

Load configuration settings.

config c.BinderHub.port = Int(8585)

Port for the builder to listen on.

config c.BinderHub.repo_providers = Dict()

List of Repo Providers to register and try

config c.BinderHub.use_registry = Bool(True)

Set to true to push images to a registry & check for images in registry.

Set to false to use only local docker images. Useful when running in a single node.