部署敏捷管理

在此之前,应该准备好Mysql、Harbor、Gitlab、Minio,Chartmuseum这些组件的信息。按以下搭建顺序进行搭建,请不要随意调整搭建顺序。

添加choerodon chart仓库

  1. helm repo add c7n https://openchart.choerodon.com.cn/choerodon/c7n/
  2. helm repo update

创建数据库

  • 编写参数配置文件 create-c7nagile-db.yaml

    1. env:
    2. MYSQL_HOST: c7n-mysql.c7n-system.svc
    3. MYSQL_PORT: "3306"
    4. MYSQL_USER: root
    5. MYSQL_PASS: password
    6. SQL_SCRIPT: |
    7. CREATE USER IF NOT EXISTS 'choerodon'@'%' IDENTIFIED BY 'password';
    8. CREATE DATABASE IF NOT EXISTS agile_service DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    9. CREATE DATABASE IF NOT EXISTS knowledgebase_service DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    10. CREATE DATABASE IF NOT EXISTS test_manager_service DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    11. GRANT ALL PRIVILEGES ON test_manager_service.* TO choerodon@'%';
    12. GRANT ALL PRIVILEGES ON knowledgebase_service.* TO choerodon@'%';
    13. GRANT ALL PRIVILEGES ON agile_service.* TO choerodon@'%';
    14. FLUSH PRIVILEGES;
  • 执行安装

    1. helm upgrade --install create-c7nagile-db c7n/mysql-client \
    2. -f create-c7nagile-db.yaml \
    3. --create-namespace \
    4. --version 0.1.0 \
    5. --namespace c7n-system

部署 agile service

  • 若需了解项目详情及各项参数含义,请移步 choerodon/agile-service

  • 编写参数配置文件 agile-service.yaml

    1. preJob:
    2. preInitDB:
    3. datasource:
    4. url: jdbc:mysql://c7n-mysql.c7n-system:3306/?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&serverTimezone=Asia/Shanghai
    5. username: choerodon
    6. password: password
    7. datasources:
    8. # 多数据源初始化
    9. # 支持框架数据和agile进行分库 指定菜单初始化地址
    10. platform:
    11. url: jdbc:mysql://c7n-mysql.c7n-system:3306/?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&serverTimezone=Asia/Shanghai
    12. username: choerodon
    13. password: password
    14. driver: com.mysql.jdbc.Driver
    15. env:
    16. open:
    17. SPRING_APPLICATION_NAME: agile-service
    18. SPRING_REDIS_HOST: c7n-redis.c7n-system
    19. SPRING_REDIS_PORT: 6379
    20. SPRING_REDIS_DATABASE: 12
    21. EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://hzero-register.c7n-system:8000/eureka/
    22. SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system:3306/agile_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&useInformationSchema=true&remarks=true&serverTimezone=Asia/Shanghai
    23. SPRING_DATASOURCE_USERNAME: choerodon
    24. SPRING_DATASOURCE_PASSWORD: password
    25. SERVICES_ATTACHMENT_URL: https://minio.example.choerodon.io
  • 部署服务

    1. helm upgrade --install agile-service c7n/agile-service \
    2. -f agile-service.yaml \
    3. --create-namespace \
    4. --version 0.22.2 \
    5. --namespace c7n-system
  • 验证部署

    • 验证命令
    1. curl -s $(kubectl get po -n c7n-system -l choerodon.io/release=agile-service -o jsonpath="{.items[0].status.podIP}"):8379/actuator/health | jq -r .status
    • 出现以下类似信息即为成功部署
  1. ```
  2. UP
  3. ```

部署 test manager service

  • 若需了解项目详情及各项参数含义,请移步 choerodon/test-manager-service

  • 编写参数配置文件 test-manager-service.yaml

    1. preJob:
    2. preInitDB:
    3. datasource:
    4. url: jdbc:mysql://c7n-mysql.c7n-system:3306/?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
    5. username: choerodon
    6. password: password
    7. datasources:
    8. # 多数据源初始化
    9. # 支持框架数据和agile进行分库 指定菜单初始化地址
    10. platform:
    11. url: jdbc:mysql://c7n-mysql.c7n-system:3306/?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&serverTimezone=Asia/Shanghai
    12. username: choerodon
    13. password: password
    14. driver: com.mysql.jdbc.Driver
    15. env:
    16. open:
    17. SPRING_REDIS_HOST: c7n-redis.c7n-system
    18. SPRING_REDIS_PORT: 6379
    19. SPRING_REDIS_DATABASE: 13
    20. EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://hzero-register.c7n-system:8000/eureka/
    21. SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system:3306/test_manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
    22. SPRING_DATASOURCE_USERNAME: choerodon
    23. SPRING_DATASOURCE_PASSWORD: password
    24. CHOERODON_CLEANPERMISSION: false
    25. SERVICES_ATTACHMENT_URL: https://minio.example.choerodon.io
  • 部署服务

    1. helm upgrade --install test-manager-service c7n/test-manager-service \
    2. -f test-manager-service.yaml \
    3. --create-namespace \
    4. --version 0.22.2 \
    5. --namespace c7n-system
  • 验证部署

    • 验证命令
  1. ```
  2. curl -s $(kubectl get po -n c7n-system -l choerodon.io/release=test-manager-service -o jsonpath="{.items[0].status.podIP}"):8094/actuator/health | jq -r .status
  3. ```
  4. - 出现以下类似信息即为成功部署
  5. ```
  6. UP
  7. ```

安装 elasticsearch-kb

  • 若需了解项目详情及各项参数含义,请移步 choerodon/elasticsearch-kb

  • 安装 elasticsearch

    1. helm upgrade --install elasticsearch-kb c7n/elasticsearch-kb \
    2. --version 0.22.1 \
    3. --create-namespace \
    4. --namespace c7n-system

部署 knowledgebase service

  • 若需了解项目详情及各项参数含义,请移步 choerodon/knowledgebase-service

  • 编写参数配置文件 knowledgebase-service.yaml

    1. preJob:
    2. preInitDB:
    3. datasource:
    4. url: jdbc:mysql://c7n-mysql.c7n-system:3306/?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&serverTimezone=Asia/Shanghai
    5. username: choerodon
    6. password: password
    7. datasources:
    8. # 多数据源初始化 初始化菜单数据
    9. # 支持框架数据和agile进行分库 指定菜单初始化地址
    10. platform:
    11. url: jdbc:mysql://c7n-mysql.c7n-system:3306/?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&serverTimezone=Asia/Shanghai
    12. username: choerodon
    13. password: password
    14. driver: com.mysql.jdbc.Driver
    15. env:
    16. open:
    17. SPRING_REDIS_HOST: c7n-redis.c7n-system
    18. SPRING_REDIS_PORT: 6379
    19. SPRING_REDIS_DATABASE: 14
    20. EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://hzero-register.c7n-system:8000/eureka/
    21. SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system:3306/knowledgebase_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&serverTimezone=Asia/Shanghai
    22. SPRING_DATASOURCE_USERNAME: choerodon
    23. SPRING_DATASOURCE_PASSWORD: password
    24. SERVICES_ATTACHMENT_URL: https://minio.example.choerodon.io/knowledgebase-service/
    25. ELASTICSEARCH_IP: elasticsearch-kb:9200
  • 部署服务

    1. helm upgrade --install knowledgebase-service c7n/knowledgebase-service \
    2. -f knowledgebase-service.yaml \
    3. --create-namespace \
    4. --version 0.22.1 \
    5. --namespace c7n-system
  • 验证部署

    • 验证命令
  1. ```
  2. curl -s $(kubectl get po -n c7n-system -l choerodon.io/release=knowledgebase-service -o jsonpath="{.items[0].status.podIP}"):8281/actuator/health | jq -r .status
  3. ```
  4. - 出现以下类似信息即为成功部署
  5. ```
  6. UP
  7. ```