tangzhankun commented on a change in pull request #143: SUBMARINE-333. Docs of Submarine with Kubeflow URL: https://github.com/apache/submarine/pull/143#discussion_r363137741
########## File path: docs/quick/k8s/submarine-kubeflow.md ########## @@ -0,0 +1,112 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Submarine with Kubeflow Tutorial +Submarine with Kubeflow runs on **Linux** and **macOS**. To be able to run Submarine, the requirements are: +* Java 8.x +* Kubeflow 0.6+ +* Submarine 0.3.0 + +## Prepare K8s cluster +We recommend to use [`kind`](https://kind.sigs.k8s.io/) to create the K8s cluster using Docker contianer "node". +``` +kind create cluster --image kindest/node:v1.15.6 --name submarine +``` + +> NOTICE: Kuebflow 0.7 compatible with kubernetes 1.14 and 1.15 + +### Deploy Dashboard +To deploy Dashboard, execute following command: +``` +kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml +``` + +### Create RBAC +``` +kubectl create serviceaccount cluster-admin-dashboard-sa +kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa +``` + +### Get access token +``` +kubectl get secrets +kubectl describe secret dashboard-admin-sa-token-6nhkx +``` + +### Running +Run the following command: +``` +kubectl proxy +``` + +Now access Dashboard at: +> http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ + +## Prepare Kubeflow + +### Download kfctl +Download the kfctl v0.7.0 release from the [Kubeflow Releases Page](https://github.com/kubeflow/kubeflow/releases/tag/v0.7.0). More info see [Kubeflow Prepare your environment](https://www.kubeflow.org/docs/started/k8s/kfctl-k8s-istio/#prepare-your-environment). + +Run the following command: +``` +tar -xvf kfctl_v0.7.0_darwin.tar.gz +mv kfctl_darwin /usr/local/bin/kfctl +``` + +### Deploy Kubeflow +We customlize the kubeflow compnents based the [offical manifests](https://raw.githubusercontent.com/kubeflow/manifests/v0.7-branch/kfdef/kfctl_k8s_istio.0.7.1.yaml), and output into `example/kfctl_k8s_istio.0.7.1.yaml`. + +Run the following command to deploy the kubeflow: +``` +kfctl apply -V -f example/kfctl_k8s_istio.0.7.1.yaml +``` + +Check the resources deployed in namespace kubeflow: +``` +kubectl -n kubeflow get all +``` + +## Prepare Submarine Server + +### Get package +You can dowload submarine 0.3.0 from releases page or build from source. + +### Configuration +Copy the kube config into `conf/k8s/config` or modify the `conf/submarine-site.xml`: +``` +<property> + <name>submarine.k8s.kube.config</name> + <value>PATH_TO_KUBE_CONFIG</value> +</property> +``` + +### Start Submarine Server +``` +./bin/submarine-daemon.sh start getMysqlJar +``` + +> http://127.0.0.1:8080/api/v1/jobs + +## Submit Submarine Job by REST Review comment: Submit Submarine TF job spec by REST? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org For additional commands, e-mail: dev-h...@submarine.apache.org