Skip to content

Commit 3ddc1e8

Browse files
committed
refactor: exctract calling traefik setup from ensure_jupyterhub_package func
1 parent a059d6f commit 3ddc1e8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tljh/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def ensure_jupyterhub_package(prefix):
115115
os.path.join(HERE, "requirements-hub-env.txt"),
116116
upgrade=True,
117117
)
118-
traefik.ensure_traefik_binary(prefix)
119118

120119

121120
def ensure_usergroups():
@@ -536,6 +535,7 @@ def main():
536535

537536
logger.info("Setting up JupyterHub...")
538537
ensure_jupyterhub_package(HUB_ENV_PREFIX)
538+
traefik.ensure_traefik_binary(HUB_ENV_PREFIX)
539539

540540
# Stop the http server with the progress page before traefik starts
541541
if args.progress_page_server_pid:

tljh/traefik.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def check_traefik_version(traefik_bin):
9191

9292
@backoff.on_exception(backoff.expo, Exception, max_tries=2, giveup=fatal_error)
9393
def ensure_traefik_binary(prefix):
94-
"""Download and install the traefik binary to a location identified by a prefix path such as '/opt/tljh/hub/'"""
94+
"""
95+
Ensure that a traefik binary of a hardcoded version is made available at a
96+
prefix path such as '/opt/tljh/hub/'.
97+
"""
9598
if plat is None:
9699
raise OSError(
97100
f"Error. Platform: {os.uname().sysname} / {machine} Not supported."

0 commit comments

Comments
 (0)