Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

SUBMARINE-462. Submarine server should support helm charts#270

Closed
JohnTing wants to merge 14 commits intoapache:masterfrom
JohnTing:SUBMARINE-462
Closed

SUBMARINE-462. Submarine server should support helm charts#270
JohnTing wants to merge 14 commits intoapache:masterfrom
JohnTing:SUBMARINE-462

Conversation

@JohnTing
Copy link
Copy Markdown
Contributor

@JohnTing JohnTing commented Apr 27, 2020

What is this PR for?

Currently, there are no tools to install submarine on k8s in one command.

Helm chart is a perfect tool we can choose. In order to do this:

Create helm charts supporting deployments of tensorflow operator, pytorch operator, and submarine server, MySQL.
Create Dockerfiles used to build submarine components' docker images and create tools to handle the required version push to docker hub.
Setup proxy using kubectl to access the submarine server locally
Verify that sample job spec can be submitted to the submarine server successfully.
Verify that workbench can be accessed in a local browser.
After this, if the user has a k8s cluster. The below command will get the installation done.

helm install /charts

What type of PR is it?

Feature

Todos

  • - Create helm charts supporting deployments of tensorflow operator, pytorch operator, and submarine server, MySQL.
  • - Create Dockerfiles used to build submarine components' docker images and create tools to handle the required version push to docker hub.
  • - Setup proxy using kubectl to access the submarine server locally
  • - Verify that sample job spec can be submitted to the submarine server successfully.
  • - Verify that workbench can be accessed in a local browser.
  • - documentation

What is the Jira issue?

https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-462

How should this be tested?

Screenshots (if appropriate)

image
image
image
image

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@xunliu xunliu changed the title SUBMARIN-462. Submarine server should support helm charts installation SUBMARINE-462. Submarine server should support helm charts installation May 5, 2020
@xunliu
Copy link
Copy Markdown
Member

xunliu commented May 7, 2020

@jiwq @tangzhankun Please help review this PR, Thanks!

@JohnTing JohnTing marked this pull request as draft May 7, 2020 18:24
Copy link
Copy Markdown
Member

@jiwq jiwq left a comment

Choose a reason for hiding this comment

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

Thanks for @JohnTing great contribution.

I suggest split the charts to three items, such as submarine/ kubeflow-tf-operator/kubeflow-pytorch-operator, more info see https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#method-2-separate-charts. If do it, we should modify the submarine charts to dependency on others.

Because it not must changed in this pr, so I accept refactor it in next pr.
cc: @liuxunorg @tangzhankun

if [[ -z "${submarine_dist_exists}" ]]; then
cd "${SUBMARINE_HOME}"
mvn clean package -DskipTests
mvn clean package -DskipTests -pl '!submarine-cloud'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why should modifying it?

Copy link
Copy Markdown
Contributor Author

@JohnTing JohnTing May 8, 2020

Choose a reason for hiding this comment

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

Thanks for @jiwq comment

When I build submarine-cloud with normal user, there will be a /submarine-cloud/bin/ submarine-operator and requires root permission to delete
I have to manually delete with root permissions to proceed to the next build
So I usually skip submarine-cloud when build

@JohnTing JohnTing marked this pull request as ready for review May 9, 2020 13:28
@xunliu
Copy link
Copy Markdown
Member

xunliu commented May 12, 2020

This PR, wait for me to take a look.

Copy link
Copy Markdown
Member

@xunliu xunliu left a comment

Choose a reason for hiding this comment

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

@JohnTing very cool!!! Thank you contribution this important feature.

I have 3 suggestions:

  1. Can you attach this helm running screenshot to this PR, so that it can be more easily understood by everyone.
  2. This PR contains helm files of tf, pytorch, and submarine. Too many contents are submitted at once. The best practice is to complete one helm for each PR.
  3. In addition, the submarine-operator helm file is missing from the submarine helm file,
    https://github.com/apache/submarine/tree/master/submarine-cloud/manifests/submarine-operator,
    Submarine-operator is submarine's automated operation and maintenance tool, just like tf-operator. You can wait for this PR to merge and create a new PR separately.

@xunliu
Copy link
Copy Markdown
Member

xunliu commented May 20, 2020

@JohnTing If you complete this PR, please notify me. Thanks!

@tangzhankun
Copy link
Copy Markdown
Contributor

@JohnTing could you please update based on our offline discussion?
@liuxunorg , As we discussed offline, we'll first go with no-operator helm charts. Once the operator is ready. We can easily update to use operator to deploy all things. For 0.4 release, let's go with the simplified version. Does this make sense?

@JohnTing
Copy link
Copy Markdown
Contributor Author

JohnTing commented May 22, 2020

@tangzhankun, Thanks for your comment
There are now 3 helm charts
submarine (server & database)
tensorflow (tensorflow-operator)
pytouch (pytouch -operator)

The current version is no submarine-operator
Am I missing something?

Wait, I forgot to delete submarine-operator

@xunliu
Copy link
Copy Markdown
Member

xunliu commented May 22, 2020

@JohnTing could you please update based on our offline discussion?
@liuxunorg , As we discussed offline, we'll first go with no-operator helm charts. Once the operator is ready. We can easily update to use operator to deploy all things. For 0.4 release, let's go with the simplified version. Does this make sense?

Good idea! i agree.

@JohnTing
Copy link
Copy Markdown
Contributor Author

@liuxunorg
This pr is done.
There are three helm charts.
submarine (server & database)
tensorflow (tensorflow-operator)
pytouch (pytouch-operator)
Wrote the document in setup-kubernetes.md.

@jiwq
Copy link
Copy Markdown
Member

jiwq commented May 23, 2020

tensorflow (tensorflow-operator)
pytouch (pytouch-operator)

@JohnTing I think we should rename the tensorflow to tfjob and pytorch to pytorchjob, because we need to be consistent with with CRD's singular name.

@tangzhankun
Copy link
Copy Markdown
Contributor

@JohnTing I'm kind of confusing. Why are we making 3 helm charts? Any technical reason for that?
I was expecting a single command like "helm install submarine". Anything I missed?

@JohnTing
Copy link
Copy Markdown
Contributor Author

@jiwq @liuxunorg I have updated this pr, please review it. Thanks.

@JohnTing
Copy link
Copy Markdown
Contributor Author

@JohnTing I'm kind of confusing. Why are we making 3 helm charts? Any technical reason for that?
I was expecting a single command like "helm install submarine". Anything I missed?

A few days ago, jiwq suggested that I should divide charts into three parts #270 (review)

@tangzhankun
Copy link
Copy Markdown
Contributor

tangzhankun commented May 26, 2020

@JohnTing , I've discussed with the intention of multiple helm charts with Wanqiang. Only one big concern is that it seems we'd have to release multiple helms chars if we would like "helm install stable/submarine"?

@JohnTing
Copy link
Copy Markdown
Contributor Author

@JohnTing , I've discussed with the intention of multiple helm charts with Wanqiang. Only one big concern is that it seems we'd have to release multiple helms chars if we would like "helm install stable/submarine"?

No, after I update dependencies , I can merge 3 helm charts into one now.

@jiwq
Copy link
Copy Markdown
Member

jiwq commented May 27, 2020

@JohnTing , I've discussed with the intention of multiple helm charts with Wanqiang. Only one big concern is that it seems we'd have to release multiple helms chars if we would like "helm install stable/submarine"?

No, after I update dependencies , I can merge 3 helm charts into one now.

@JohnTing Thanks for your patience and careful work. If we decide merge charts, maybe we should keep only the submarine charts under helm-charts folder. Due to charts that use file:// are not allowed in the official Helm repository, so if we want to release it to official repo, you should merge to one chart rather use the dependencies feature.

By the way, the purpose of the split proposal is for easy maintenance and scale at later, also the submarine user can select which machine learning framework can be deployed within him/her cluster. And in the initial stage, I did not consider to release the charts to official repo.

I suggest use the split proposal, but if we want to release it to official repo, I think the single chart is the best practice.

cc: @tangzhankun @liuxunorg

@JohnTing
Copy link
Copy Markdown
Contributor Author

Thanks @jiwq for your suggestion.

I changed the folder structure.
Placing charts in the charts directory will also automatically deploy,
so there is no need to set the dependency.

This is the current folder structure.
image

Copy link
Copy Markdown
Member

@jiwq jiwq left a comment

Choose a reason for hiding this comment

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

+1 LGTM If no more comments, I will commit it later. Thanks @JohnTing working for this.
cc: @liuxunorg @tangzhankun

@tangzhankun
Copy link
Copy Markdown
Contributor

tangzhankun commented May 28, 2020

@JohnTing Thanks for the hard work! @jiwq @liuxunorg Thanks for the review. Let's first go with the one helm charts without dependencies. This PR looks good to me.
Only one question, how does this image come from? Do we already have a Dockerfile for this? If so, we need to document how to build it.
"apache/submarine:server-0.4.0-SNAPSHOT"

@JohnTing
Copy link
Copy Markdown
Contributor Author

@tangzhankun
Yes, we already have several Dockerfiles to build server and database.
I have updated setup-kubernetes.md.

@tangzhankun
Copy link
Copy Markdown
Contributor

@JohnTing , Thanks for the clarification! LGTM. +1

@xunliu
Copy link
Copy Markdown
Member

xunliu commented May 28, 2020

Will merge if no more comments.

@xunliu xunliu changed the title SUBMARINE-462. Submarine server should support helm charts installation SUBMARINE-462. Submarine server should support helm charts May 28, 2020
@asfgit asfgit closed this in 29bc4fb May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants