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:29:57 UTC
[submarine] branch master updated: SUBMARINE-930. Update test-k8s
doc
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 848b6f1 SUBMARINE-930. Update test-k8s doc
848b6f1 is described below
commit 848b6f111ceb69a0d34942b7f107c45d28461b61
Author: KUAN-HSUN-LI <b0...@ntu.edu.tw>
AuthorDate: Tue Jul 13 15:07:41 2021 +0800
SUBMARINE-930. Update test-k8s doc
### What is this PR for?
test-k8s page is outdated, update the command and synchronize the command with GitHub Actions test command.
### What type of PR is it?
[Documentation]
### Todos
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-930
### How should this be tested?
### Screenshots (if appropriate)
![image](https://user-images.githubusercontent.com/38066413/125409717-c282b680-e3ee-11eb-81b4-64e7bde4b384.png)
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: KUAN-HSUN-LI <b0...@ntu.edu.tw>
Signed-off-by: Kai-Hsun Chen <ka...@apache.org>
Closes #666 from KUAN-HSUN-LI/SUBMARINE-930 and squashes the following commits:
142de6ff [KUAN-HSUN-LI] SUBMARINE-930. Move the test-k8s from integrationTest to integrationTestK8s
ef5cfb35 [KUAN-HSUN-LI] SUBMARINE-930. Update test-k8s doc
---
website/docs/devDocs/IntegrationTest.md | 30 ------------------
website/docs/devDocs/IntegrationTestK8s.md | 49 ++++++++++++++++++++++++++++++
website/sidebars.js | 1 +
3 files changed, 50 insertions(+), 30 deletions(-)
diff --git a/website/docs/devDocs/IntegrationTest.md b/website/docs/devDocs/IntegrationTest.md
index 21c2b8c..dd94141 100644
--- a/website/docs/devDocs/IntegrationTest.md
+++ b/website/docs/devDocs/IntegrationTest.md
@@ -23,36 +23,6 @@ title: How to Run Integration Test
3. These two test modules can be applied to different test scenarios. (In the future, these two test modules may be combined or adjusted)
-## k8s test
-
-k8s test: When the user submits the code to his/her repository or the `apache/submarine` git repository, the travis test task will automatically start.
-
-test-k8s runs test cases in travis. It will first create a k8s cluster by using the kind tool in travis,
-
-and then compile and package the submarine project in `submarine-dist` directory to build a docker image.
-
-Then use this latest code to build a docker image and deploy a submarine system in k8s. Then run test case in the `test-k8s/..` directory.
-
-### Run k8s test in locally
-
-Executing the following command will perform the following actions:
-
-```
-mvn -Phadoop-2.9 clean package install -DskipTests verify -DskipRat -am -pl submarine-test/test-k8s
-```
-
-1. The submarine project will be compiled and packaged to generate `submarine-dist/target/submarine-<version>.tar.gz`
-2. Call the `submarine-cloud/hack/integration-test.sh` script
-
- + Call the `build.sh` script under `submarine/dev-support/docker-images/` to generate the latest `submarine`, `database` and `operator` docker images.
- + Call `submarine-cloud/hack/kind-cluster-build.sh` to create a k8s cluster
- + Call `submarine-cloud/hack/deploy-submarine.sh` to deploy the submarine system in the k8s cluster using the latest `submarine`, `database` and `operator` docker images.
- + Call the test cases in `submarine-test/test-k8s/` for testing.
-
-### Run k8s test in Github Action
-
-Each time a code is submitted, Github Action is automatically triggered for testing.
-
## E2E test
### E2E tests can be executed both locally and in Travis (For workbench developer)
diff --git a/website/docs/devDocs/IntegrationTestK8s.md b/website/docs/devDocs/IntegrationTestK8s.md
new file mode 100644
index 0000000..75c2802
--- /dev/null
+++ b/website/docs/devDocs/IntegrationTestK8s.md
@@ -0,0 +1,49 @@
+---
+title: How to Run Integration K8s Test
+---
+
+<!---
+ Licensed 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. See accompanying LICENSE file.
+-->
+
+## Introduction
+
+* It checks the API on each page works correctly.
+
+* You can run the test-k8s either locally or on GitHub Actions.
+ * Before running the test-k8s, the minikube (KinD) cluster must be created.
+ * Then, compile and package the submarine project in `submarine-dist` directory for building a docker image.
+ * Otherwise, the 8080 port in submarine-traefik should be forward.
+ * Finally, the test case under the `test-k8s` directory is ready to run.
+
+## Run k8s test locally
+
+1. Ensure you have setup the KinD cluster or minikube cluster. If you haven't, follow this [`minikube tutorial`](https://minikube.sigs.k8s.io/docs/start/)
+
+2. Build the submarine from source and upgrade the server pod through this [`guide`](./Development/#build-from-source)
+
+3. Forward port
+
+ ```bash
+ kubectl port-forward --address 0.0.0.0 service/submarine-traefik 8080:80
+ ```
+
+4. Execute the test command
+
+ ```bash
+ mvn verify -DskipRat -pl :submarine-test-k8s -Phadoop-2.9 -B
+ ```
+
+## Run k8s test in GitHub Actions
+
+Each time a code is submitted, GitHub Actions is automatically triggered for testing.
diff --git a/website/sidebars.js b/website/sidebars.js
index 1a65115..69c3a42 100644
--- a/website/sidebars.js
+++ b/website/sidebars.js
@@ -67,6 +67,7 @@ module.exports = {
"devDocs/BuildFromCode",
"devDocs/Development",
"devDocs/IntegrationTest",
+ "devDocs/IntegrationTestK8s"
],
"Community": [
"community/README",
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org