From 17608653e4a33e358e6f60606228749c35df87a1 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 7 Jan 2025 17:00:49 +0100 Subject: [PATCH 01/17] Start documentation to use Docker Desktop Related to https://github.com/jupyterhub/mybinder.org-deploy/issues/3157 --- docs/source/getting_started/docker_desktop.md | 24 +++++++++++++++++++ docs/source/getting_started/index.rst | 1 + 2 files changed, 25 insertions(+) create mode 100644 docs/source/getting_started/docker_desktop.md diff --git a/docs/source/getting_started/docker_desktop.md b/docs/source/getting_started/docker_desktop.md new file mode 100644 index 000000000..1abb46ce1 --- /dev/null +++ b/docs/source/getting_started/docker_desktop.md @@ -0,0 +1,24 @@ +# Getting started with local development + +This page contains a starting point for people who want to know more about the BinderHub deployment by playing around with a local development instance running on Kubernetes with [Docker Desktop](https://docs.docker.com/desktop/). + +## Install Docker Desktop + +Install Docker Desktop on [Mac](https://docs.docker.com/desktop/setup/install/mac-install/), [Windows](https://docs.docker.com/desktop/setup/install/windows-install/), or [Linux](https://docs.docker.com/desktop/setup/install/linux/). And [turn on Kubernetes](https://docs.docker.com/desktop/features/kubernetes/#install-and-turn-on-kubernetes). + +## Set up `kubectl` to connect to Docker Desktop + +You can connect `kubectl` with Docker Desktop. +To do so, run the following command: + +``` +kubectl config use-context docker-desktop +``` + +You can test this out by running: + +``` +kubectl get -A pods +``` + +and a list of all running pods should be printed. diff --git a/docs/source/getting_started/index.rst b/docs/source/getting_started/index.rst index f61b55744..a6747dc8c 100644 --- a/docs/source/getting_started/index.rst +++ b/docs/source/getting_started/index.rst @@ -9,6 +9,7 @@ permissions, as well as contextual information about the mybinder.org deployment .. toctree:: :maxdepth: 3 + docker_desktop getting_started production_environment terminology From 2c23aea8e0e6ad23cae2f25de90c55c0b0a190a3 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 7 Jan 2025 17:11:39 +0100 Subject: [PATCH 02/17] Add Docker Desktop to deploy.py Related to https://github.com/jupyterhub/mybinder.org-deploy/issues/3157 --- deploy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy.py b/deploy.py index 889e68877..b87e0e5a4 100755 --- a/deploy.py +++ b/deploy.py @@ -437,6 +437,7 @@ def main(): "release", help="Release to deploy", choices=[ + "docker-desktop", "staging", "prod", "ovh", @@ -479,6 +480,9 @@ def main(): args = argparser.parse_args() + if args.release == "docker-desktop": + args.local = True + # if one argument given make cluster == release cluster = args.cluster or args.release @@ -520,6 +524,8 @@ def main(): setup_auth_gcloud(args.release, cluster, args.dry_run) elif cluster in AWS_DEPLOYMENTS: setup_auth_aws(cluster, args.dry_run) + elif cluster == "docker-desktop": + pass else: raise Exception("Cloud cluster not recognised!") From 426810f2014d55a92e904424c4f292664c4f5a51 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Tue, 7 Jan 2025 18:04:16 +0100 Subject: [PATCH 03/17] Expand notes for local development Relates to https://github.com/jupyterhub/mybinder.org-deploy/issues/3157 --- config/docker-desktop.yaml | 26 ++++++++++++++++ docs/source/getting_started/docker_desktop.md | 30 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 config/docker-desktop.yaml diff --git a/config/docker-desktop.yaml b/config/docker-desktop.yaml new file mode 100644 index 000000000..3be7c4943 --- /dev/null +++ b/config/docker-desktop.yaml @@ -0,0 +1,26 @@ +binderhub: + registry: + username: "your-username" + # This is unsafe! Only se for local development + password: "your-password" + + ingress: + hosts: + - localhost + + jupyterhub: + ingress: + hosts: + - localhost + +prometheus: + enabled: false + +grafana: + enabled: false + +cryptnono: + enabled: false + +cluster-autoscaler: + enabled: false \ No newline at end of file diff --git a/docs/source/getting_started/docker_desktop.md b/docs/source/getting_started/docker_desktop.md index 1abb46ce1..7a5d72f07 100644 --- a/docs/source/getting_started/docker_desktop.md +++ b/docs/source/getting_started/docker_desktop.md @@ -22,3 +22,33 @@ kubectl get -A pods ``` and a list of all running pods should be printed. + +## Deploy Harbor to Docker Desktop + +Run the following command: + +``` +helm repo add harbor https://helm.goharbor.io +``` + +``` +helm install harbor harbor/harbor +``` + +## Deploy mybinder.org to Docker Desktop + +Run the following command: + +``` +source cert-manager.env +``` + +``` +for d in ./mybinder*/; do + helm dependency update "$d" +done +``` + +``` +python deploy.py docker-desktop +``` \ No newline at end of file From 4b5208d957bdcbebb284a1ff0ed4777aee9db1fd Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 13:20:57 +0100 Subject: [PATCH 04/17] Rename file in documentation --- docs/source/getting_started/index.rst | 2 +- .../getting_started/{docker_desktop.md => local_environment.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/source/getting_started/{docker_desktop.md => local_environment.md} (100%) diff --git a/docs/source/getting_started/index.rst b/docs/source/getting_started/index.rst index a6747dc8c..10f32ec82 100644 --- a/docs/source/getting_started/index.rst +++ b/docs/source/getting_started/index.rst @@ -9,7 +9,7 @@ permissions, as well as contextual information about the mybinder.org deployment .. toctree:: :maxdepth: 3 - docker_desktop + local_environment getting_started production_environment terminology diff --git a/docs/source/getting_started/docker_desktop.md b/docs/source/getting_started/local_environment.md similarity index 100% rename from docs/source/getting_started/docker_desktop.md rename to docs/source/getting_started/local_environment.md From a40f61b302207101b0fe3e73613c78dc0c45cf91 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 14:06:15 +0100 Subject: [PATCH 05/17] Support other local Kubernetes in addition to Docker Desktop --- .../{docker-desktop.yaml => localhost.yaml} | 0 deploy.py | 6 ++--- .../getting_started/local_environment.md | 26 +++++++++++++------ 3 files changed, 21 insertions(+), 11 deletions(-) rename config/{docker-desktop.yaml => localhost.yaml} (100%) diff --git a/config/docker-desktop.yaml b/config/localhost.yaml similarity index 100% rename from config/docker-desktop.yaml rename to config/localhost.yaml diff --git a/deploy.py b/deploy.py index b87e0e5a4..7e245511c 100755 --- a/deploy.py +++ b/deploy.py @@ -437,7 +437,7 @@ def main(): "release", help="Release to deploy", choices=[ - "docker-desktop", + "localhost", "staging", "prod", "ovh", @@ -480,7 +480,7 @@ def main(): args = argparser.parse_args() - if args.release == "docker-desktop": + if args.release == "localhost": args.local = True # if one argument given make cluster == release @@ -524,7 +524,7 @@ def main(): setup_auth_gcloud(args.release, cluster, args.dry_run) elif cluster in AWS_DEPLOYMENTS: setup_auth_aws(cluster, args.dry_run) - elif cluster == "docker-desktop": + elif cluster == "localhost": pass else: raise Exception("Cloud cluster not recognised!") diff --git a/docs/source/getting_started/local_environment.md b/docs/source/getting_started/local_environment.md index 7a5d72f07..d29ccb3af 100644 --- a/docs/source/getting_started/local_environment.md +++ b/docs/source/getting_started/local_environment.md @@ -1,20 +1,30 @@ # Getting started with local development -This page contains a starting point for people who want to know more about the BinderHub deployment by playing around with a local development instance running on Kubernetes with [Docker Desktop](https://docs.docker.com/desktop/). +This page contains a starting point for people who want to know more about the BinderHub deployment by playing around with a local development instance. -## Install Docker Desktop +## Local Kubernetes + +You will need a local Kubernetes cluster. A few options are + +- [Kubernetes with Docker Desktop](https://docs.docker.com/desktop/features/kubernetes/) (recommended) +- [minikube](https://minikube.sigs.k8s.io/docs/) +- [k3d](https://k3d.io/stable/) +- [kind](https://kind.sigs.k8s.io/) + +### Install Docker Desktop Install Docker Desktop on [Mac](https://docs.docker.com/desktop/setup/install/mac-install/), [Windows](https://docs.docker.com/desktop/setup/install/windows-install/), or [Linux](https://docs.docker.com/desktop/setup/install/linux/). And [turn on Kubernetes](https://docs.docker.com/desktop/features/kubernetes/#install-and-turn-on-kubernetes). -## Set up `kubectl` to connect to Docker Desktop +## Set up `kubectl` -You can connect `kubectl` with Docker Desktop. To do so, run the following command: ``` -kubectl config use-context docker-desktop +kubectl config use-context k8s-context-name ``` +If using Docker Desktop, `k8s-context-name` is `docker-desktop`. + You can test this out by running: ``` @@ -23,7 +33,7 @@ kubectl get -A pods and a list of all running pods should be printed. -## Deploy Harbor to Docker Desktop +## Deploy Harbor Run the following command: @@ -35,7 +45,7 @@ helm repo add harbor https://helm.goharbor.io helm install harbor harbor/harbor ``` -## Deploy mybinder.org to Docker Desktop +## Deploy mybinder.org Run the following command: @@ -50,5 +60,5 @@ done ``` ``` -python deploy.py docker-desktop +python deploy.py localhost ``` \ No newline at end of file From e7aa8483d3702ed8d6907edd4979beb762629901 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 14:08:17 +0100 Subject: [PATCH 06/17] Add ingress for static in localhost --- config/localhost.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/localhost.yaml b/config/localhost.yaml index 3be7c4943..8542d28bd 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -13,6 +13,12 @@ binderhub: hosts: - localhost +static: + ingress: + hosts: + - localhost + - localhost + prometheus: enabled: false From 9c6c37fc75b964f1c27d309b02a5c24c160e3959 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 14:17:27 +0100 Subject: [PATCH 07/17] Disable analytics publisher --- config/localhost.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/localhost.yaml b/config/localhost.yaml index 8542d28bd..4537d7c2b 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -19,6 +19,9 @@ static: - localhost - localhost +analyticsPublisher: + enabled: false + prometheus: enabled: false From c4b8ccd4ada356352800463fe501a646f5d71eb3 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 15:22:13 +0100 Subject: [PATCH 08/17] Disable record of events in the cloud Fixes File "/usr/local/lib/python3.11/site-packages/google/auth/_default.py", line 691, in default raise exceptions.DefaultCredentialsError(_CLOUD_SDK_MISSING_CREDENTIALS) google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information. --- config/localhost.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/localhost.yaml b/config/localhost.yaml index 4537d7c2b..a3d3ac1c5 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -1,4 +1,12 @@ binderhub: + config: + BinderHub: + use_registry: false + + extraConfig: + # Disable send events to StackDriver on Google Cloud + 01-eventlog: + registry: username: "your-username" # This is unsafe! Only se for local development From c2f807842a70d9769a9fd74ef8be42812caa4e47 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 15:21:43 +0100 Subject: [PATCH 09/17] Add call to charpress in documentation --- docs/source/getting_started/local_environment.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/getting_started/local_environment.md b/docs/source/getting_started/local_environment.md index d29ccb3af..2655b71f8 100644 --- a/docs/source/getting_started/local_environment.md +++ b/docs/source/getting_started/local_environment.md @@ -59,6 +59,10 @@ for d in ./mybinder*/; do done ``` +``` +chartpress --skip-build +``` + ``` python deploy.py localhost ``` \ No newline at end of file From 52a437ef30fd4d07e3ef7492487b68d963b4d91d Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 15:35:12 +0100 Subject: [PATCH 10/17] Disable TLS for static in localhost --- config/localhost.yaml | 2 ++ mybinder/templates/static/ingress.yaml | 2 ++ mybinder/values.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/config/localhost.yaml b/config/localhost.yaml index a3d3ac1c5..92aef023f 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -23,6 +23,8 @@ binderhub: static: ingress: + tls: + enabled: false hosts: - localhost - localhost diff --git a/mybinder/templates/static/ingress.yaml b/mybinder/templates/static/ingress.yaml index fd6126fd8..b7dfba8c4 100644 --- a/mybinder/templates/static/ingress.yaml +++ b/mybinder/templates/static/ingress.yaml @@ -30,9 +30,11 @@ spec: port: number: 80 {{- end }} + {{- if .Values.static.ingress.tls.enabled }} tls: - secretName: {{ .Values.static.ingress.tls.secretName }} hosts: {{- range $host := .Values.static.ingress.hosts }} - {{ $host }} {{- end }} + {{- end }} diff --git a/mybinder/values.yaml b/mybinder/values.yaml index b5e14e1d7..2008b0a22 100644 --- a/mybinder/values.yaml +++ b/mybinder/values.yaml @@ -528,6 +528,7 @@ static: kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" tls: + enabled: true secretName: kubelego-tls-static # values ref: https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml From cceea30030e5faa854a3d80e783b89eb08d8da84 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 15:35:32 +0100 Subject: [PATCH 11/17] Update ingress hosts for localhost --- config/localhost.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/localhost.yaml b/config/localhost.yaml index 92aef023f..97905c1d0 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -19,15 +19,14 @@ binderhub: jupyterhub: ingress: hosts: - - localhost + - jupyterhub.localhost static: ingress: tls: enabled: false hosts: - - localhost - - localhost + - static.localhost analyticsPublisher: enabled: false From 3a4c98a97696dc30f21823e7a519a27abe2f81de Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 15:49:56 +0100 Subject: [PATCH 12/17] Disable HTTPS for binderhub on localhost --- config/localhost.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/localhost.yaml b/config/localhost.yaml index 97905c1d0..cead715b4 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -13,6 +13,9 @@ binderhub: password: "your-password" ingress: + https: + # This is unsafe! Only se for local development + enabled: false hosts: - localhost @@ -24,6 +27,7 @@ binderhub: static: ingress: tls: + # This is unsafe! Only se for local development enabled: false hosts: - static.localhost From 2a6514a1c6b652c7106e293950ee6b6e26df9a83 Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Wed, 8 Jan 2025 15:50:18 +0100 Subject: [PATCH 13/17] Add last section to documentation of localhost --- docs/source/getting_started/local_environment.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/source/getting_started/local_environment.md b/docs/source/getting_started/local_environment.md index 2655b71f8..9f37f8b0f 100644 --- a/docs/source/getting_started/local_environment.md +++ b/docs/source/getting_started/local_environment.md @@ -15,8 +15,9 @@ You will need a local Kubernetes cluster. A few options are Install Docker Desktop on [Mac](https://docs.docker.com/desktop/setup/install/mac-install/), [Windows](https://docs.docker.com/desktop/setup/install/windows-install/), or [Linux](https://docs.docker.com/desktop/setup/install/linux/). And [turn on Kubernetes](https://docs.docker.com/desktop/features/kubernetes/#install-and-turn-on-kubernetes). -## Set up `kubectl` +## Set up `kubectl` to connect to Kubernetes +Once you have `kubectl` installed, you can connect it with your local Kubernetes. To do so, run the following command: ``` @@ -33,7 +34,7 @@ kubectl get -A pods and a list of all running pods should be printed. -## Deploy Harbor +## Deploy Harbor to Kubernetes Run the following command: @@ -45,7 +46,7 @@ helm repo add harbor https://helm.goharbor.io helm install harbor harbor/harbor ``` -## Deploy mybinder.org +## Deploy mybinder.org to Kubernetes Run the following command: @@ -65,4 +66,8 @@ chartpress --skip-build ``` python deploy.py localhost -``` \ No newline at end of file +``` + +## Access your mybinder.org + +Open http://localhost with your favourite web browser. \ No newline at end of file From 56e8b4d9c90273160f81469b4cc2a3cd19f494a6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:50:44 +0000 Subject: [PATCH 14/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- config/localhost.yaml | 2 +- docs/source/getting_started/local_environment.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/localhost.yaml b/config/localhost.yaml index cead715b4..8c5ceda06 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -45,4 +45,4 @@ cryptnono: enabled: false cluster-autoscaler: - enabled: false \ No newline at end of file + enabled: false diff --git a/docs/source/getting_started/local_environment.md b/docs/source/getting_started/local_environment.md index 9f37f8b0f..cb9c7c369 100644 --- a/docs/source/getting_started/local_environment.md +++ b/docs/source/getting_started/local_environment.md @@ -70,4 +70,4 @@ python deploy.py localhost ## Access your mybinder.org -Open http://localhost with your favourite web browser. \ No newline at end of file +Open http://localhost with your favourite web browser. From 807c0a720975512b0dd71289d5188a7bfddc420e Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Thu, 9 Jan 2025 10:07:06 +0100 Subject: [PATCH 15/17] Add hub_url to binderhub.config.BinderHub for localhost. --- config/localhost.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/localhost.yaml b/config/localhost.yaml index 8c5ceda06..0b303f227 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -1,6 +1,8 @@ binderhub: config: BinderHub: + # Use Kubernetes DNS + hub_url: http://hub:8081 use_registry: false extraConfig: @@ -17,12 +19,12 @@ binderhub: # This is unsafe! Only se for local development enabled: false hosts: - - localhost + - 127.0.0.1.nip.io jupyterhub: ingress: hosts: - - jupyterhub.localhost + - jupyterhub.127.0.0.1.nip.io static: ingress: @@ -30,7 +32,7 @@ static: # This is unsafe! Only se for local development enabled: false hosts: - - static.localhost + - static.127.0.0.1.nip.io analyticsPublisher: enabled: false From 3f762688d8bbf9ae50fce383f402d2ba9650d06b Mon Sep 17 00:00:00 2001 From: Raniere Silva Date: Thu, 9 Jan 2025 11:07:21 +0100 Subject: [PATCH 16/17] Force use of IP other than 127.0.0.1 for localhost and overwrite Helm chart with the provided IP address. --- config/localhost.yaml | 5 ++++- deploy.py | 19 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/config/localhost.yaml b/config/localhost.yaml index 0b303f227..3e9c74e1c 100644 --- a/config/localhost.yaml +++ b/config/localhost.yaml @@ -1,8 +1,11 @@ +# 127.0.0.1.nip.io will not work because when pods try to use it, +# the domain will resolve to the pod itself. +# The deploy.py overwrite the 127.0.0.1 to the user IP address. binderhub: config: BinderHub: # Use Kubernetes DNS - hub_url: http://hub:8081 + hub_url: http://jupyterhub.127.0.0.1.nip.io use_registry: false extraConfig: diff --git a/deploy.py b/deploy.py index 7e245511c..06cdfa1e5 100755 --- a/deploy.py +++ b/deploy.py @@ -198,7 +198,7 @@ def get_config_files(release, config_dir="config"): return config_files -def deploy(release, name=None, dry_run=False, diff=False): +def deploy(release, name=None, dry_run=False, diff=False, ip_address=None): """Deploys a federation member to a k8s cluster. Waits for deployments and daemonsets to become Ready @@ -238,6 +238,14 @@ def deploy(release, name=None, dry_run=False, diff=False): for config_file in config_files: helm.extend(["-f", config_file]) + if release == "localhost": + helm.extend([ + "--set", f"binderhub.config.BinderHub.hub_url=http://jupyterhub.{ip_address}.nip.io", + "--set", f"binderhub.ingress.hosts={{{ip_address}.nip.io}}", + "--set", f"binderhub.jupyterhub.ingress.hosts={{jupyterhub.{ip_address}.nip.io}}", + "--set", f"static.ingress.hosts={{static.{ip_address}.nip.io}}", + ]) + check_call(helm, dry_run) print( BOLD + GREEN + f"SUCCESS: Helm {helm_commands[0]} for {release} completed" + NC, @@ -460,6 +468,10 @@ def main(): action="store_true", help="If the script is running locally, skip auth step", ) + argparser.add_argument( + "--local-ip", + help="IP address of the local machine", + ) argparser.add_argument( "--dry-run", action="store_true", @@ -483,6 +495,9 @@ def main(): if args.release == "localhost": args.local = True + if args.local_ip is None: + raise ValueError("Cluster localhost requires IP address.") + # if one argument given make cluster == release cluster = args.cluster or args.release @@ -536,7 +551,7 @@ def main(): if args.stage in ("all", "certmanager"): setup_certmanager(args.dry_run, args.diff) if args.stage in ("all", "mybinder"): - deploy(args.release, args.name, args.dry_run, args.diff) + deploy(args.release, args.name, args.dry_run, args.diff, args.local_ip) if __name__ == "__main__": From c0f49e44b588a4e9d16c3cf701ce8facda5f0b70 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:09:30 +0000 Subject: [PATCH 17/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- deploy.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/deploy.py b/deploy.py index 06cdfa1e5..4c6fa2788 100755 --- a/deploy.py +++ b/deploy.py @@ -239,12 +239,18 @@ def deploy(release, name=None, dry_run=False, diff=False, ip_address=None): helm.extend(["-f", config_file]) if release == "localhost": - helm.extend([ - "--set", f"binderhub.config.BinderHub.hub_url=http://jupyterhub.{ip_address}.nip.io", - "--set", f"binderhub.ingress.hosts={{{ip_address}.nip.io}}", - "--set", f"binderhub.jupyterhub.ingress.hosts={{jupyterhub.{ip_address}.nip.io}}", - "--set", f"static.ingress.hosts={{static.{ip_address}.nip.io}}", - ]) + helm.extend( + [ + "--set", + f"binderhub.config.BinderHub.hub_url=http://jupyterhub.{ip_address}.nip.io", + "--set", + f"binderhub.ingress.hosts={{{ip_address}.nip.io}}", + "--set", + f"binderhub.jupyterhub.ingress.hosts={{jupyterhub.{ip_address}.nip.io}}", + "--set", + f"static.ingress.hosts={{static.{ip_address}.nip.io}}", + ] + ) check_call(helm, dry_run) print(