zentao Plugin

This plugin installs ZenTao 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 the local build, you can use hack/e2e/e2e-up.sh to create a K8s cluster via Kind.
  • Currently, all fields listed 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.

Usage

The following content is an example of the “tool file”.

For more information on the main config, the tool file, and the var file of DevStream, see Core Concepts Overview and DevStream Configuration.

YAML

  1. config:
  2. state:
  3. backend: local
  4. options:
  5. stateFile: devstream.state
  6. tools:
  7. # name of the tool
  8. - name: zentao
  9. # id of the tool instance
  10. instanceID: default
  11. # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool
  12. dependsOn: []
  13. # options for the plugin
  14. options:
  15. # namespace for ZenTao application
  16. namespace: 'zentao'
  17. # storageClassName used to match pv and pvc
  18. storageClassName: 'zentao-storage'
  19. # two PersistentVolumes for ZenTao and mysql should be specified
  20. persistentVolumes:
  21. # name of ZenTao pv
  22. - pvName: "zentao-pv"
  23. # capacity of ZenTao pv
  24. pvCapacity: "1G"
  25. # name of mysql pv
  26. - pvName: "mysql-pv"
  27. # capacity of mysql pv
  28. pvCapacity: "1G"
  29. # two PersistentVolumeClaims for ZenTao and mysql should be specified
  30. persistentVolumeClaims:
  31. # name of ZenTao pvc
  32. - pvcName: "zentao-pvc"
  33. # capacity of ZenTao pvc
  34. pvcCapacity: "1G"
  35. # name of mysql pvc
  36. - pvcName: "mysql-pvc"
  37. # capacity of mysql pvc
  38. pvcCapacity: "1G"
  39. # ZenTao application is deployed by K8s Deployment
  40. deployment:
  41. # name of ZenTao deployment
  42. name: 'zentao-dp'
  43. # number of application replica
  44. replicas: 1
  45. # ZenTao image
  46. image: 'easysoft/zentao:latest'
  47. envs:
  48. - key: 'MYSQL_ROOT_PASSWORD'
  49. # initial password value for mysql database, you can specify any value you like
  50. value: '123456'
  51. # ZenTao application is exposed via K8s Service
  52. service:
  53. # name of ZenTao service
  54. name: 'zentao-svc'
  55. # nodePort of ZenTao service, currently ZenTao plugin only support `nodePort` type
  56. 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.

Bash

  1. bash hack/e2e/e2e-up.sh

Step2: Create ZenTao Application via Config File

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

Bash

  1. ./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 Plugin - 图1

  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 Plugin - 图2

  3. Fill in database password filed with options.deployment.mysqlPasswdValue which was set previously in ZenTao.yaml. zentao Plugin - 图3

  4. If everything proceeds successfully, you will see the Zendo introduction. zentao Plugin - 图4

  5. Fill in your company name and create an administrator account. zentao Plugin - 图5

  6. Now, the Zendo application has been successfully deployed. zentao Plugin - 图6