Skip to content

Commit

Permalink
Fix daskboard proxy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ivukotic committed Dec 11, 2023
1 parent c168422 commit c2629da
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dask_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ kubernetes:
- scheduler
- --port
- "8786"
- -bokeh-prefix
- daskboard
# - -bokeh-prefix
# - daskboard
- --bokeh-port
- "8787"
resources:
Expand Down
20 changes: 10 additions & 10 deletions kube/nginx_proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ data:
listen 8080;
server_name localhost;
location ^~ /daskboard/ {
proxy_pass http://<dask-scheduler>:8787;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
proxy_pass http://dask-ivukotic-fb1cf4c5-5:8787;
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_http_version 1.1;
# proxy_redirect off;
# proxy_buffering off;
# proxy_set_header Upgrade $http_upgrade;
# # proxy_set_header Connection $connection_upgrade;
# proxy_read_timeout 86400;
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions private_jupyter_notebook_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
# Set shell to bash as AnalysisBase assumes it
# force login shell to pickup ~/.bash_profile
c.NotebookApp.terminado_settings = {"shell_command": ["/bin/bash", "-l"]}


def host_allowlist(handler, host):
handler.log.info("Request to proxy to host " + host)
return True
# return host.startswith("192.170") or host.startswith("2605:9a00:10:200a") or host.startswith("dask-")


# for dask dashboards to be visible
c.ServerProxy.host_allowlist = host_allowlist

0 comments on commit c2629da

Please sign in to comment.