Skip to content
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

Closed
wants to merge 10 commits into from
Closed

WIP - Pangeo deployment #22

wants to merge 10 commits into from

Conversation

mrocklin
Copy link
Member

@mrocklin mrocklin commented Jan 7, 2018

I'm actively deploying off of this branch. I'm putting it here just for comments.

Copy link
Member Author

@mrocklin mrocklin left a 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
Copy link
Member Author

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?

Copy link
Collaborator

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
)
Copy link
Member Author

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)
Copy link
Member Author

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.

Copy link
Member Author

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.

@mrocklin mrocklin mentioned this pull request Jan 16, 2018
4 tasks
@yuvipanda
Copy link
Collaborator

I'm going to pick out commits from here and make separate PRs.

@yuvipanda
Copy link
Collaborator

First PR out of this: #25

@yuvipanda
Copy link
Collaborator

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:

  1. limits
  2. args

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.

@yuvipanda
Copy link
Collaborator

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))
Copy link
Member Author

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.

Copy link
Member Author

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.

@mrocklin
Copy link
Member Author

OK, I think I've salvaged everything I need out of here. Closing.

@mrocklin mrocklin closed this Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants