Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Migrate wbuchwalter/fairing #5

Merged
merged 112 commits into from
Nov 6, 2018
Merged

Conversation

wbuchwalter
Copy link
Contributor

@wbuchwalter wbuchwalter commented Nov 2, 2018

Follow up to #2 with correct licence change applied.


This change is Reviewable

@wbuchwalter
Copy link
Contributor Author

/approve

@wbuchwalter
Copy link
Contributor Author

wbuchwalter commented Nov 2, 2018

@jlewi I will let you merge this one once you have reviewed that licensing is correct.
Note that in this state, fairing does not work with the current version of Kubeflow because of JupyterHub as described in #6.

I am working on a fix. I will open a PR here once this one is merged.

Also not that @ashahba has been working on a PR to add a new builder using configmaps (faster build than using Knative, but less flexible wbuchwalter/fairing#27). This PR will be transferred here as well so it can be discussed by the community.

@jlewi
Copy link
Contributor

jlewi commented Nov 5, 2018

/assign @r2d4

@r2d4 Can you take a lead on reviewing this please?

Copy link
Member

@r2d4 r2d4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @wbuchwalter, thanks for the contribution. I took a first pass at reviewing this and I just have a few questions on the overall design. Is there is a design document somewhere?

.vscode/settings.json Outdated Show resolved Hide resolved
Dockerfile.dev Outdated Show resolved Hide resolved
Dockerfile.jupyter Outdated Show resolved Hide resolved
echo "FAIRING_DEV_DOCKER_USERNAME is unset. Set it to your docker username to use this command"; \
else \
pip install . ;\
docker build -t ${FAIRING_DEV_DOCKER_USERNAME}/fairing:latest -f Dockerfile.dev . ; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some ideas on how we could get rid of scripts like this, but for now you might want to avoid pushing anything with "latest" and tag with git commit sha.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific script is to make easier to help developers try their changes without having to go through the pip release process.
You would set FAIRING_DEV_DOCKER_USERNAME to your username and this would push a dev version to your dockerhub. This image is then pulled instead of the regular base image.
So latest is needed so that you don't have to go modify this script on every change.

Dockerfile.jupyter Outdated Show resolved Hide resolved
See: [Installing Knative Build Component](https://github.com/knative/docs/blob/master/build/installing-build-component.md)


### Container Registry Secret
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should reuse the user service account that gets created instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand with service account you are referring to?


Kubeflow needs to be pre-installed in the cluster.

### Knative Build Component
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that Knative is a heavy dependency to build images on the cluster. If we're just appending python files, we can do it much simpler and quicker without knative.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Knative is the solution that came out after discussing with @jlewi.
You can see some of the context for that in this thread: kubeflow/kubeflow#1240 (comment)

Note that @ashahba has a PR opened on the old repo to use configmaps directly and bypass the build step entirely (wbuchwalter/fairing#27). I ll move this PR here once this one get merged. However this approach does not allow for a lot of flexibility since you cannot customize the remote environment.

Curious to hear your idea.

self.ps_count = ps_count
self.worker_count = worker_count

def add_jobs(self, svc, count, img, name, volumes, volume_mounts):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about using the k8s clients directly here?

return svc

def stream_logs(self, image_name, image_tag):
mp_client = MetaparticleClient()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the dependency on metaparticle? It seems a bit unnecessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Context for metaparticle here: kubeflow/kubeflow#1240 (comment).
However I am not convinced anymore that this is the right approach since metaparticle is not maintained it seems.
We can remove it in a later PR.

fairing/builders/knative/knative.py Outdated Show resolved Hide resolved
@wbuchwalter
Copy link
Contributor Author

@r2d4 Addressed some of your comments.
For everything related to removing metaparticle and using k8s client directly instead, I agree with the direction however I would like that to be done in a follow-up PR so that I don't block all the progress of other PRs.
Same applies to Knative, I am not specifically attached to Knative and I am curious to hear what you propose, but it would be nicer to discuss this in a separate issue and implement what is decided in a follow-up PR.

What do you think?

@r2d4
Copy link
Member

r2d4 commented Nov 6, 2018

Yep SGTM.

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: r2d4, wbuchwalter

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 70732cf into kubeflow:master Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants