-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Dask Gateway clusters from config #135
Comments
dask-gateway doesn't require creating an intermediate |
Thanks for the info Jim. |
@jcrist one issue with this still, the code generated to connect the client is something like
but when auth is enabled, you don't have the security object and so that raises TypeError: Gateway expects a `ssl_context` argument of type ssl.SSLContext, instead got None Do you or @ian-r-rose have any guesses on if that can be supported? Nothing comes to my mind immediately. |
@TomAugspurger good question. I don't think there is a good way to do this right now from the labextension side. As you point out, the code template to generate a client connection is pretty dumb: dask-labextension/src/index.ts Lines 566 to 571 in 46cbdc1
If the client has a way to pick up an SSL key from the environment context, that would be best from my perspective. dask-labextension/src/clusters.tsx Lines 813 to 857 in 46cbdc1
so only the address is tracked at the moment. |
Could we make the template configurable and formatted on the server side? Then it could use |
@jcrist yes, that would be doable. Would you envision users setting the template in their config, or adding some kind of entrypoint to |
I was thinking this would be part of the user-side config for dask-labextension. I do think in the long run we'll want to special-case dask-gateway for the lab extension, but exposing the template to the user will resolve this issue, and feels like a useful thing to do generally (there's other kwargs the user might potentially want to set as well). |
I see that @consideRatio found a fix using the jupyterhub:
hub:
extraConfig:
10-patch-dask-labextension-config: |-
c.KubeSpawner.environment.setdefault("DASK_LABEXTENSION__FACTORY__MODULE", "dask_gateway")
c.KubeSpawner.environment.setdefault("DASK_LABEXTENSION__FACTORY__CLASS", "GatewayCluster")
c.KubeSpawner.environment.setdefault("DASK_LABEXTENSION__FACTORY__ARGS", "[]")
c.KubeSpawner.environment.setdefault("DASK_LABEXTENSION__FACTORY__KWARGS", "{}") However, the |
Right now, IIUC, to create a cluster using the button the config takes a python class, args, and kwargs to create the cluster. This isn't flexible enough for dask-gateway, which requires creating an intermediate Gateway object.
Two options
dask-gateway
to have a "simple" way of creating a cluster that just uses the defaults (cc @jcrist).dask/dask-gateway#55 is related, but more focused on expanding dask-labextension to take advantage of dask-gateway
The text was updated successfully, but these errors were encountered: