You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by ka...@apache.org on 2021/07/14 09:37:53 UTC

[submarine] branch master updated: SUBMARINE-932. [Dev] Add operator docs to devDocs

This is an automated email from the ASF dual-hosted git repository.

kaihsun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 145151a  SUBMARINE-932. [Dev] Add operator docs to devDocs
145151a is described below

commit 145151aba9f34e4e1c4a04d4ccbe9dd80cb3b672
Author: MortalHappiness <b0...@ntu.edu.tw>
AuthorDate: Tue Jul 13 23:49:37 2021 +0800

    SUBMARINE-932. [Dev] Add operator docs to devDocs
    
    ### What is this PR for?
    
    Add operator docs to devDocs
    
    ### What type of PR is it?
    [Documentation]
    
    ### Todos
    * [x] Project Architecture: Change submarine-cloud to submarine-cloud-v2
    * [x] Development Guide: Add how to develop operator
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-932
    
    ### How should this be tested?
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: MortalHappiness <b0...@ntu.edu.tw>
    
    Signed-off-by: Kai-Hsun Chen <ka...@apache.org>
    
    Closes #673 from MortalHappiness/SUBMARINE-932 and squashes the following commits:
    
    5119cde6 [MortalHappiness] SUBMARINE-932. [Dev] Add operator docs to devDocs
---
 website/docs/devDocs/Development.md | 63 +++++++++++++++++++++++++++++++++++++
 website/docs/devDocs/README.md      |  4 +--
 2 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/website/docs/devDocs/Development.md b/website/docs/devDocs/Development.md
index d391685..6eda09a 100644
--- a/website/docs/devDocs/Development.md
+++ b/website/docs/devDocs/Development.md
@@ -146,3 +146,66 @@ Checkstyle plugin may help to detect violations directly from the IDE.
    ```bash
    helm upgrade --set submarine.database.dev=true submarine ./helm-charts/submarine
    ```
+
+## Develop operator
+
+- Before building
+
+  1. We assume the developer use **minikube** as a local kubernetes cluster.
+  2. Make sure you have **NOT** installed the submarine helm-chart in the cluster.
+
+1. Start the minikube cluster
+
+  ```bash
+  minikube start --vm-driver=docker --kubernetes-version v1.15.11
+  ```
+
+2. Install the dependencies
+
+  ```bash
+  cd submarine-cloud-v2/
+  go mod vendor
+  ```
+
+3. Run the operator out-of-cluster
+
+  ```bash
+  make
+  ./submarine-operator
+  ```
+
+4. Deploy a Submarine
+
+  ```bash
+  kubectl apply -f artifacts/examples/crd.yaml
+  kubectl create ns submarine-user-test
+  kubectl apply -n submarine-user-test -f artifacts/examples/example-submarine.yaml
+  ```
+
+5. Exposing service
+
+  ```bash
+  # Method1 -- use minikube ip
+  minikube ip  # you'll get the IP address of minikube, ex: 192.168.49.2
+
+  # Method2 -- use port-forwarding
+  kubectl port-forward --address 0.0.0.0 -n submarine-user-test service/traefik 32080:80
+  ```
+
+6. View workbench
+
+  If you use method 1 in step 5, please go to `http://{minikube ip}:32080`, ex: http://192.168.49.2:32080
+
+  If you use method 2 in step 5, please go to http://127.0.0.1:32080
+
+7. Delete submarine
+
+  ```bash
+  kubectl delete submarine example-submarine -n submarine-user-test
+  ```
+
+8. Stop the operator
+
+  Press ctrl+c to stop the operator.
+
+For other details, please check out the [README](https://github.com/apache/submarine/blob/master/submarine-cloud-v2/README.md) and [Developer Guide](https://github.com/apache/submarine/blob/master/submarine-cloud-v2/docs/developer-guide.md) on GitHub.
diff --git a/website/docs/devDocs/README.md b/website/docs/devDocs/README.md
index 83d5039..c56e99f 100644
--- a/website/docs/devDocs/README.md
+++ b/website/docs/devDocs/README.md
@@ -27,9 +27,9 @@ This document mainly describes the structure of each module of the Submarine pro
 
 Provide the CLI interface for submarine user. (Currently only support YARN service)
 
-### 2.2. submarine-cloud
+### 2.2. submarine-cloud-v2
 
-Define submarine operator. (Work in progress)
+The operator for Submarine application. For details, please see the [README on github](https://github.com/apache/submarine/blob/master/submarine-cloud-v2/README.md).
 
 ### 2.3. submarine-commons
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org