From 0ebbc350c6d90dfddb204c1408e8d247e71126d4 Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Sat, 17 Feb 2024 16:16:51 +0800 Subject: [PATCH 1/2] e2e guide doc Signed-off-by: LiZhenCheng9527 --- .../content/en/docs/developer-guide/_index.md | 11 +++++ docs/content/en/docs/developer-guide/e2e.md | 46 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 docs/content/en/docs/developer-guide/_index.md create mode 100644 docs/content/en/docs/developer-guide/e2e.md diff --git a/docs/content/en/docs/developer-guide/_index.md b/docs/content/en/docs/developer-guide/_index.md new file mode 100644 index 000000000..3fc30c2f2 --- /dev/null +++ b/docs/content/en/docs/developer-guide/_index.md @@ -0,0 +1,11 @@ +--- +title: "Developer Guide" +linkTitle: "Developer Guide" +weight: 6 +description: > + Provide guidance on details regarding development of Kurator. +--- + +Here we will outline how to conduct development of Kurator and provide coding standards and guidelines. + +The developer guide for Kurator aims to standardize development practices and onboard new contributors efficiently. diff --git a/docs/content/en/docs/developer-guide/e2e.md b/docs/content/en/docs/developer-guide/e2e.md new file mode 100644 index 000000000..d62dc5223 --- /dev/null +++ b/docs/content/en/docs/developer-guide/e2e.md @@ -0,0 +1,46 @@ +--- +title: "Kurator E2E Test" +linkTitle: "Kurator E2E Test" +weight: 30 +description: > + Kurator End2End Test Guide +--- + +Kurator has provided E2E Test in order to avoid potential impacts of future changes on the overall project, reduce future maintenance costs, and improve code and architecture quality. + +## Preparation For running E2E Test + +### Install Kind + +```console +# For AMD64 / x86_64 +[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64 +# For ARM64 +[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-arm64 +chmod +x ./kind +sudo mv ./kind /usr/local/bin/kind +``` + +### Install Helm + +- Manual installation + +```console +1.Download the required version(https://github.com/helm/helm/releases) +2.Extract a zip file(tar -zxvf helm-vXXX-linux-amd64.tar.gz) +3.Find the helm program in the extracted directory and move it to the desired directory(mv linux-amd64/helm /usr/local/bin/helm) +``` + +- Script Installation + +```console +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 +chmod 700 get_helm.sh +./get_helm.sh +``` + +## Steps For Running E2E Test + +- Script to Install Kubernetes Test Cluster Environment. `bash hack/e2e-test/build-cluster.sh` +- Deploying a Newest Built Kurator Image to the Cluster. `bash hack/e2e-test/install-kurator.sh` +- Running Kurator E2E Tests. `bash hack/e2e-test/run-e2e.sh` From c733d11f051c878880f7f71d7fb5c54ebada6807 Mon Sep 17 00:00:00 2001 From: LiZhenCheng9527 Date: Sat, 17 Feb 2024 16:55:55 +0800 Subject: [PATCH 2/2] fix by comments Signed-off-by: LiZhenCheng9527 --- docs/content/en/docs/developer-guide/e2e.md | 39 ++++++++++++++++----- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/docs/content/en/docs/developer-guide/e2e.md b/docs/content/en/docs/developer-guide/e2e.md index d62dc5223..1c45867c3 100644 --- a/docs/content/en/docs/developer-guide/e2e.md +++ b/docs/content/en/docs/developer-guide/e2e.md @@ -14,10 +14,13 @@ Kurator has provided E2E Test in order to avoid potential impacts of future chan ```console # For AMD64 / x86_64 -[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64 +curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64 + # For ARM64 -[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-arm64 +curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-arm64 + chmod +x ./kind + sudo mv ./kind /usr/local/bin/kind ``` @@ -26,21 +29,41 @@ sudo mv ./kind /usr/local/bin/kind - Manual installation ```console -1.Download the required version(https://github.com/helm/helm/releases) -2.Extract a zip file(tar -zxvf helm-vXXX-linux-amd64.tar.gz) -3.Find the helm program in the extracted directory and move it to the desired directory(mv linux-amd64/helm /usr/local/bin/helm) +Can download the required version of helm you need from https://github.com/helm/helm/releases + +To extract the zip file of helm, run: + tar -zxvf helm-vXXX-linux-amd64.tar.gz + +Find the helm program in the extracted directory and move it to the desired directory, run: + mv linux-amd64/helm /usr/local/bin/helm ``` - Script Installation ```console curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 + chmod 700 get_helm.sh + ./get_helm.sh ``` ## Steps For Running E2E Test -- Script to Install Kubernetes Test Cluster Environment. `bash hack/e2e-test/build-cluster.sh` -- Deploying a Newest Built Kurator Image to the Cluster. `bash hack/e2e-test/install-kurator.sh` -- Running Kurator E2E Tests. `bash hack/e2e-test/run-e2e.sh` +- Install Kubernetes Test Cluster Environment. + + ```console + bash hack/e2e-test/build-cluster.sh + ``` + +- Deploy kurator. + + ```console + bash hack/e2e-test/install-kurator.sh + ``` + +- Run Kurator E2E Tests. + + ```console + bash hack/e2e-test/run-e2e.sh + ```