• 部署敏捷管理
    • 添加choerodon chart仓库
    • 创建数据库
    • 部署 agile service
    • 部署 test manager service
    • 安装 elasticsearch-kb
    • 部署 knowledgebase service

    部署敏捷管理

    在此之前,应该准备好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 install c7n/mysql-client \
    2. -f create-c7nagile-db.yaml \
    3. --version 0.1.0 \
    4. --name create-c7nagile-db \
    5. --namespace c7n-system

    部署 agile service

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

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

    1. env:
    2. open:
    3. EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://register-server.c7n-system:8000/eureka/
    4. SPRING_CLOUD_CONFIG_ENABLED: true
    5. SPRING_CLOUD_CONFIG_URI: http://register-server.c7n-system:8000/
    6. SPRING_DATASOURCE_PASSWORD: password
    7. SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/agile_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    8. SPRING_DATASOURCE_USERNAME: choerodon
    9. SPRING_REDIS_DATABASE: 13
    10. SPRING_REDIS_HOST: c7n-redis.c7n-system.svc
    11. SERVICES_ATTACHMENT_URL: http://minio.example.choerodon.io
    12. preJob:
    13. preConfig:
    14. datasource:
    15. password: password
    16. url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    17. username: choerodon
    18. preInitDB:
    19. datasource:
    20. password: password
    21. url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/agile_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    22. username: choerodon
    • 部署服务
    1. helm install c7n/agile-service \
    2. -f agile-service.yaml \
    3. --name agile-service \
    4. --version 0.19.1 \
    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. UP

    部署 test manager service

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

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

    1. env:
    2. open:
    3. EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://register-server.c7n-system:8000/eureka/
    4. SPRING_CLOUD_CONFIG_ENABLED: true
    5. SPRING_CLOUD_CONFIG_URI: http://register-server.c7n-system:8000/
    6. SPRING_DATASOURCE_PASSWORD: password
    7. SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/test_manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    8. SPRING_DATASOURCE_USERNAME: choerodon
    9. SPRING_REDIS_DATABASE: 14
    10. SPRING_REDIS_HOST: c7n-redis.c7n-system.svc
    11. preJob:
    12. preConfig:
    13. datasource:
    14. password: password
    15. url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    16. username: choerodon
    17. preInitDB:
    18. datasource:
    19. password: password
    20. url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/test_manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    21. username: choerodon
    • 部署服务
    1. helm install c7n/test-manager-service \
    2. -f test-manager-service.yaml \
    3. --name test-manager-service \
    4. --version 0.19.1 \
    5. --namespace c7n-system
    • 验证部署

      • 验证命令
    1. 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
    • 出现以下类似信息即为成功部署
    1. UP

    安装 elasticsearch-kb

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

    • 安装 elasticsearch

    1. helm install c7n/elasticsearch-kb \
    2. --version 0.19.0 \
    3. --name elasticsearch-kb \
    4. --namespace c7n-system

    部署 knowledgebase service

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

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

    1. env:
    2. open:
    3. EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://register-server.c7n-system:8000/eureka/
    4. SERVICES_ATTACHMENT_URL: http://minio.example.choerodon.io/knowledgebase-service/
    5. SPRING_CLOUD_CONFIG_ENABLED: true
    6. SPRING_CLOUD_CONFIG_URI: http://register-server.c7n-system:8000/
    7. SPRING_DATASOURCE_PASSWORD: password
    8. SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/knowledgebase_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
    9. SPRING_DATASOURCE_USERNAME: choerodon
    10. ELASTICSEARCH_IP: elasticsearch-kb.c7n-system:9200
    11. preJob:
    12. preConfig:
    13. datasource:
    14. password: password
    15. url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    16. username: choerodon
    17. preInitDB:
    18. datasource:
    19. password: password
    20. url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/knowledgebase_service?useUnicode=true&characterEncoding=utf-8&useSSL=false
    21. username: choerodon
    • 部署服务
    1. helm install c7n/knowledgebase-service \
    2. -f knowledgebase-service.yaml \
    3. --name knowledgebase-service \
    4. --version 0.19.2 \
    5. --namespace c7n-system
    • 验证部署

      • 验证命令
    1. 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
    • 出现以下类似信息即为成功部署
    1. UP