Skip to content

Make local binder config more transparent #1992

@rgaiacs

Description

@rgaiacs

I'm having problems when using testing/local-binder-k8s-hub/binderhub_config.py because of

try:
jupyterhub_ip = subprocess.check_output(["minikube", "ip"], text=True).strip()
except (subprocess.SubprocessError, FileNotFoundError):
jupyterhub_ip = "192.168.1.100"
given that I'm not using minikube neither JupyterHub is answering to 192.168.1.100.

I want to change the code to use a user defined environment variable, for example LOCAL_BINDER_JUPYTERHUB_IP. If the user defines the variable, we use the IP address or domain provided by the user. If no LOCAL_BINDER_JUPYTERHUB_IP is provided, we show a warning and continue with localhost.

The documentation will be updated to reflect the change. Users of minikube can run

LOCAL_BINDER_JUPYTERHUB_IP=$(minikube ip) python3 -m binderhub -f testing/local-binder-k8s-hub/binderhub_config.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions