-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
WIP - Pangeo deployment #22
Conversation
This is a hack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions for @yuvipanda
self.worker_labels['org.pydata.dask/cluster-name'] = name | ||
self.worker_labels['app'] = 'dask' | ||
self.worker_labels['component'] = 'dask-worker' | ||
labels['org.pydata.dask/cluster-name'] = name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuvipanda can I ask what the motivation is here? Is this a standard namespacing scheme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, although I got it wrong! Docker labels are reversed like this, while k8s labels are not. I'l fix.
self.worker_meta = client.V1ObjectMeta( | ||
generate_name=name + '-', | ||
labels=labels | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a sensible approach? To get a pod spec from the user and create metadata ourselves?
with open(x) as f: | ||
x = yaml.load(f) | ||
if isinstance(x, dict): | ||
x = client.ApiClient().deserialize(_FakeResponse(x), cls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to find a way to make this function work. @yuvipanda I think that you pointed me to something in kubespawner but after several minutes searching through gitter logs I'm unable to find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the function below is the hack I used to get around this. It's entirely specialized for my application.
I'm going to pick out commits from here and make separate PRs. |
First PR out of this: #25 |
Ok, I closed #25, and rolled it into the bigger #26. I looked at the worker YAML spec in the pangeo-data repository, and figured that the easy direct things that can be specified are:
I added limits to #26 but not args. I also added a much easier escape mechanism with deep-merging dictionaries. If this approach looks right to you, IMO next step is to talk to some folks who would be using these kinda clusters and figuring out what their ideal workflow looks like. I think there's multiple ideal workflows - full GUI management via a Jupyter extension, completely writing it via code, YAML files, etc. I think core should just be independent of that, and we can figure out which UX we should prioritize first. Another important thing here is FUSE. Long term, I think giving workers this much permissions is a bad idea, but FlexVolume might not be good enough for you and you might need to wait for CSI to get out of alpha. |
Anything leftover from here? |
# TODO: this code is entirely untested | ||
link = '%sproxy/%d/status' % (os.environ['JUPYTERHUB_SERVICE_PREFIX'], | ||
self.scheduler.services['bokeh'].port) | ||
link = ipywidgets.HTML('<b>Dashboard:</b> <a href="%s" target="_blank">%s</a>' % (link, link)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to figure out what to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very useful in production, but it is also pretty specific. I'm not sure yet the best way to make this externally configurable.
OK, I think I've salvaged everything I need out of here. Closing. |
I'm actively deploying off of this branch. I'm putting it here just for comments.