Comments (16)
I propose we handle configuration redundantly with both a yaml file and a set of environment variables as follows (this is how dask does things in other projects):
-
We have a config module with a config dictionary that holds configuration
from daskernetes import config config['key'] = 'value'
-
We look for a config file in
.dask/daskernetes.yaml
and set that as the base for the configuration. We might make this path configurable with aDASKERNETES_CONFIG_PATH
environment variable. -
On import we take all environment variables of the form
DASKERNETES_FOO_BAR=value
, remove theDASKERNETES_
, lower-case and replace underscores with hyphens, resulting in>>> config {'foo-bar': 'value'}
I've found this approach to be useful. Operationally I find myself using the yaml file more for personal use and environment variables more for deployment. In either case it's nice for internal code to not care and just look at the centralized config
dictionary.
from dask-kubernetes.
from dask-kubernetes.
Yeah, thinking about this more critically now there might not be that much. Operationally I've needed two things:
- default worker pod spec, or perhaps a filename that holds such a spec
- how to point users to the bokeh diagnostics dashboard (this is the one thing in the current deployment that we don't have)
Looking through our code we don't have that many global constant values, so this sort of treatment may not be necessary. Some possible examples:
-
default labels (although maybe we start leaving this to the pod spec?)
self.pod_template.metadata.labels['dask.pydata.org/cluster-name'] = name self.pod_template.metadata.labels['app'] = 'dask' self.pod_template.metadata.labels['component'] = 'dask-worker'
-
(nope, that was all I could find)
from dask-kubernetes.
from dask-kubernetes.
There might not be one. I was looking around for hard-wired values and that is what I came up with. This lack of configuration is a decent argument to not have a serious configuration mechanism.
from dask-kubernetes.
from dask-kubernetes.
I do still need to find a solution to the following two problems:
- Default worker configuration so that admins can create worker specs and not have users deal with this
- Could use a magic filename
- Could use an environment variable
- Point users to the right location for the bokeh diagnostics server, as is proxied through the nbserverproxy
from dask-kubernetes.
from dask-kubernetes.
- Sure, we can put other information in the ipywidget that is determined by some external mechanism. Historically the "external mechanism" here was just a config option. I'd love to see an extension as well but ...
- I'm unlikely to do this work (unfamiliar with the Jupyter ecosystem and not too adept at JS)
- We should probably have a crude solution even without installing the extension
from dask-kubernetes.
from dask-kubernetes.
In the case of pangeo, yes, but I'm not sure what will happen in the general case.
I'm happy to write it, shouldn't be too hard! Can you list what all it should do?
I'm not sure what's best here and would appreciate feedback on these thoughts. I'll open a new issue for discussion on this subtopic.
from dask-kubernetes.
Using an environment variable to start point to a yaml file is implemented here: #41
from dask-kubernetes.
Continuing discussion on extension here: #23 (is this what you had in mind?)
from dask-kubernetes.
What are the cases where someone would want to change the default labels?
You can always add additional labels, and getting the defaults wrong might
have bad consequences. Curious what the use case would be!
Also, it looks like this was a request from @jacobtomlinson in the original message of this issue
For example it would nice to be able to set the name of the cluster to be the JUPYTERHUB_USER.
from dask-kubernetes.
from dask-kubernetes.
This has been resolved.
from dask-kubernetes.
Related Issues (20)
- Allow graceful shutdown HOT 3
- Dask dashboard not loading HOT 4
- Env var duplication HOT 2
- Ability to add different scheduler address to workers outside of standard format HOT 2
- Add a Changelog HOT 4
- Cluster creation constantly failing because of existing scheduler in "Terminating" status HOT 3
- Does dask-kubernetes compatible with newer version of k8rs? HOT 4
- Can not connect to k8s websocket deployed in Rancher HOT 5
- Update dask-kubernetes to a newer kr8s HOT 4
- Add Python 3.12 support HOT 1
- TOCTOU Bug while scaling down workers HOT 5
- Worker RestartPolicy not setable HOT 2
- Dask cluster creation issue with TLS HOT 1
- KubeCluster is shut down automatically even if shutdown_on_close is False HOT 1
- Go code failing to lint
- Dask Cluster with name longer than 53 chars is stuck in Created state, cannot be deleted
- Cannot Overwrite DASK_SCHEDULER_ADDRESS in Worker env HOT 1
- ConnectionClosedError during Dask Cluster Creation with k8s HOT 1
- Missing idleTimeout key in daskcluster_autoshutdown HOT 8
- Add IngressSpec besides ServiceSpec to Scheduler HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dask-kubernetes.