Skip to content

Commit

Permalink
docs: update zentao docs
Browse files Browse the repository at this point in the history
Signed-off-by: hxcGit <houxc_mail@163.com>
  • Loading branch information
xavier-hou committed Jul 8, 2022
1 parent fcdc44e commit bcd63d0
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 52 deletions.
75 changes: 40 additions & 35 deletions docs/plugins/zentao.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# zentao Plugin

This plugin installs [zentao](https://zentao.net/) in an existing Kubernetes cluster by go client.
This plugin installs [ZenTao](https://zentao.net/) in an existing Kubernetes cluster by go client.

**Notes:**

- Zentao will be installed in K8S cluster, please prepare a k8s cluster before using zentao plugin.
For local build, you can use `hack/e2e/e2e-up.sh` to create a k8s cluster via `Kind`.
- Zentao will be installed in K8s cluster, please prepare a K8s cluster before using ZenTao plugin.
For local build, you can use `hack/e2e/e2e-up.sh` to create a K8s cluster via `Kind`.
- Currently, all fields list in the example config file below are required. You can modify them according to your needs.
- This plugin is not supported to run on `arm64` architecture now.

Expand All @@ -32,80 +32,85 @@ tools:
dependsOn: []
# options for the plugin
options:
# namespace for zentao application
# namespace for ZenTao application
namespace: 'zentao'
# storageClassName used to match pv and pvc
storageClassName: 'zentao-storage'
# two PersistentVolumes for zentao and mysql should be specified
# two PersistentVolumes for ZenTao and mysql should be specified
persistentVolume:
# name of zentao pv
# name of ZenTao pv
zentaoPVName: 'zentao-pv'
# capacity of zentao pv
# capacity of ZenTao pv
zentaoPVCapacity: '1G'
# name of mysql pv
mysqlPVName: 'mysql-pv'
# capacity of mysql pv
mysqlPVCapacity: '1G'
# two PersistentVolumeClaims for zentao and mysql should be specified
# two PersistentVolumeClaims for ZenTao and mysql should be specified
persistentVolumeClaim:
# name of zentao pvc
# name of ZenTao pvc
zentaoPVCName: 'zentao-pvc'
# capacity of zentao pvc
# capacity of ZenTao pvc
zentaoPVCCapacity: '1G'
# name of mysql pvc
mysqlPVCName: 'mysql-pv'
# capacity of mysql pvc
mysqlPVCCapacity: '1G'
# zentao application is deployed by K8S Deployment
# ZenTao application is deployed by K8s Deployment
deployment:
# name of zentao deployment
# name of ZenTao deployment
name: 'zentao-dp'
# number of application replica
replicas: 3
# zentao image
# ZenTao image
image: 'easysoft/zentao:latest'
# initial password name for mysql database, you can specify any name you like
mysqlPasswdName: 'MYSQL_ROOT_PASSWORD'
# initial password value for mysql database, you can specify any value you like
mysqlPasswdValue: '1234567'
# zentao application is exposed via K8S Service
# ZenTao application is exposed via K8s Service
service:
# name of zentao service
# name of ZenTao service
name: 'zentao-svc'
# nodePort of zentao service, currently zentao plugin only support `nodePort` type
# nodePort of ZenTao service, currently ZenTao plugin only support `nodePort` type
nodePort: 30081
```
## Deployment
### Step1: Prepare a Kubernetes Cluster
- If you already have a kubernetes cluster, ignore this step.
- If not, you can use `hack/e2e/e2e-up.sh` to create a k8s cluster via `Kind` as test environment.
```shell
bash hack/e2e/e2e-up.sh
```

### Step2: Create Zentao Application via Config File
- Create a zentao config file following the usage example above.
```shell
./dtm apply -f zentao.yaml --debug
```

### Step3: Initialize Zentao Application
- Visit `http://NodeIP:NodePort`("NodeIP" and "NodePort" are Kubernets node IP and node port) to start the initialization process. Press `Start Installation` button to the next step.
- If you already have a Kubernetes cluster, ignore this step.
- If not, you can use `hack/e2e/e2e-up.sh` to create a K8s cluster via `Kind` as test environment.

```shell
bash hack/e2e/e2e-up.sh
```

### Step2: Create ZenTao Application via Config File

- Create a ZenTao config file following the usage example above.

```shell
./dtm apply -f ZenTao.yaml --debug
```

### Step3: Initialize ZenTao Application

1. Visit `http://NodeIP:NodePort`("NodeIP" and "NodePort" are Kubernets node IP and node port) to start the initialization process. Press `Start Installation` button to the next step.
![](zentao/zentao-welcome.jpg)

- You don't need to do anything about the system check and it's done automatically. If there are system check items that do not pass, please make sure that the previous operation is correct. If it still doesn't work, create an issue to track your problem.
2. You don't need to do anything about the system check and it's done automatically. If there are system check items that do not pass, please make sure that the previous operation is correct. If it still doesn't work, create an issue to track your problem.
![](zentao/zentao-systemCheck.jpg)

- Fill in database password filed with `options.deployment.mysqlPasswdValue` which was set previously in `zentao.yaml`.
3. Fill in database password filed with `options.deployment.mysqlPasswdValue` which was set previously in `ZenTao.yaml`.
![](zentao/zentao-configuration.jpg)

- If everything proceeds successfully, you will see the Zendo introduction.
4. If everything proceeds successfully, you will see the Zendo introduction.
![](zentao/zentao-intro.jpg)

- Fill in your company name and create an administrator account.
5. Fill in your company name and create an administrator account.
![](zentao/zentao-account.jpg)

- Now, the Zendo application has been successfully deployed.
6. Now, the Zendo application has been successfully deployed.
![](zentao/zentao-web.jpg)
39 changes: 22 additions & 17 deletions docs/plugins/zentao.zh.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 禅道插件
# zentao(禅道)插件

该插件将通过`client-go`库在 Kubernetes 集群中安装[禅道应用](https://zentao.net/).

**注意:**

- 使用该插件之前,用户需要准备好 Kubernetes 集群,并正确设置 KUBECONFIG 配置。本地测试时,用户可以通过`hack/e2e/e2e-up.sh`创建临时 Kubernetes 集群。
- 用户可以根据自己的需求修改以下配置文件中的字段,所有列出的字段都需要被设置。
- 该插件暂时不支持运行在`arm64`系统架构;`amd64`架构已经过测试运行正常
- 该插件暂时不支持运行在`arm64` CPU 架构上;在`amd64` CPU 架构上运行正常

## 用法示例

Expand Down Expand Up @@ -77,34 +77,39 @@ tools:
## 部署
### 第一步:准备一个Kubernetes集群
- 如果已经部署Kubernetes集群环境,可以忽略第一步。
- 如果尚未部署Kubernetes集群环境,可以使用脚本`hack/e2e/e2e-up.sh`来创建一个Kubernetes测试环境,该脚本会基于`Kind`创建集群。
```shell
bash hack/e2e/e2e-up.sh
```
### 第一步:准备一个 Kubernetes 集群
- 如果已经部署 Kubernetes 集群环境,可以忽略第一步。
- 如果尚未部署 Kubernetes 集群环境,可以使用脚本`hack/e2e/e2e-up.sh`来创建一个 Kubernetes 测试环境,该脚本会基于`Kind`创建集群。

```shell
bash hack/e2e/e2e-up.sh
```

### 第二步:利用配置文件创建禅道应用

- 根据上面提供的示例用法创建一个`zentao.yaml`.
```shell
./dtm apply -f zentao.yaml --debug
```

```shell
./dtm apply -f zentao.yaml --debug
```

### 第三步:初始化禅道应用
- 浏览器访问`http://NodeIP:NodePort`("NodeIP"与"NodePort"对应Kubernets节点IP和节点端口)来初始化禅道服务。点击`开始安装`按钮进入下一步。

1. 浏览器访问`http://NodeIP:NodePort`("NodeIP"与"NodePort"对应 Kubernets 节点IP和节点端口)来初始化禅道服务。点击`开始安装`按钮进入下一步。
![](zentao/zentao-welcome.jpg)

- 针对系统检查步骤,用户不需要做任何操作,系统检查会自动完成。如果存在未通过的检查项,请确保之前的部署流程均按照上述文档指示进行。如果仍不能解决问题,请在社区新建issue来跟踪相关问题
2. 针对系统检查步骤,用户不需要做任何操作,系统检查会自动完成。如果存在未通过的检查项,请确保之前的部署流程均按照上述文档指示进行。如果仍不能解决问题,请在社区新建 issue 来跟踪相关问题
![](zentao/zentao-systemCheck.jpg)

- 数据库部署步骤只需在`数据库密码`栏填入之前设置的`options.deployment.mysqlPasswdValue`值。
3. 数据库部署步骤只需在`数据库密码`栏填入之前设置的`options.deployment.mysqlPasswdValue`值。
![](zentao/zentao-configuration.jpg)

- 如果上述所有操作均成功完成,这时将展示禅道应用介绍界面。
4. 如果上述所有操作均成功完成,这时将展示禅道应用介绍界面。
![](zentao/zentao-intro.jpg)

- 填写用户的公司信息并创建管理员账户,然后点击`保存`。
5. 填写用户的公司信息并创建管理员账户,然后点击`保存`。
![](zentao/zentao-account.jpg)

- 至此,禅道服务就部署成功啦
6. 至此,禅道服务就部署成功啦
![](zentao/zentao-web.jpg)

0 comments on commit bcd63d0

Please sign in to comment.