• 部署前端
    • 添加choerodon chart仓库
    • 部署 choerodon front

    部署前端

    添加choerodon chart仓库

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

    部署 choerodon front

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

    • 编写参数配置文件 choerodon-front.yaml

    1. env:
    2. open:
    3. API_HOST: http://api.example.choerodon.io
    4. CLIENT_ID: choerodon
    5. DEVOPS_HOST: ws://devops.example.choerodon.io
    6. FILE_SERVER: http://minio.example.choerodon.io
    7. HEADER_TITLE_NAME: Choerodon
    8. HTTP: http
    9. WEBSOCKET_SERVER: ws://notify.example.choerodon.io
    10. COOKIE_SERVER:
    11. CUSTOM_THEME_COLOR:
    12. ingress:
    13. enabled: true
    14. host: c7n.example.choerodon.io
    15. preJob:
    16. preConfig:
    17. db:
    18. dbname: base_service
    19. enabledelete: true
    20. host: c7n-mysql.c7n-system.svc
    21. password: password
    22. port: 3306
    23. upattrs: sort,parent_id
    24. username: choerodon
    25. service:
    26. enabled: true
    • 部署服务
    1. helm install c7n/choerodon-front \
    2. -f choerodon-front.yaml \
    3. --name choerodon-front \
    4. --version 0.19.1 \
    5. --namespace c7n-system
    • 添加oauth client

      • 编写参数配置文件 c7n-front-client.yaml
    1. env:
    2. MYSQL_HOST: c7n-mysql.c7n-system.svc
    3. MYSQL_PASS: password
    4. MYSQL_PORT: 3306
    5. MYSQL_USER: root
    6. SQL_SCRIPT: |
    7. INSERT INTO base_service.oauth_client (name,organization_id,resource_ids,secret,scope,authorized_grant_types,web_server_redirect_uri,access_token_validity,refresh_token_validity,additional_information,auto_approve,object_version_number,created_by,creation_date,last_updated_by,last_update_date)VALUES('choerodon',1,'default','secret','default','password,implicit,client_credentials,authorization_code,refresh_token','http://c7n.example.choerodon.io',3600,3600,'{}','default',1,0,NOW(),0,NOW());
    • 部署服务
    1. helm install c7n/mysql-client \
    2. -f c7n-front-client.yaml \
    3. --version 0.1.0 \
    4. --name c7n-front-client \
    5. --namespace c7n-system
    • 验证部署

      • 验证命令
    1. curl $(kubectl get svc choerodon-front -o jsonpath="{.spec.clusterIP}" -n c7n-system)
    • 出现以下类似信息即为成功部署
    1. <!DOCTYPE html><html><head><meta http-equiv="Content-type"content="text/html; charset=utf-8"><title>Choerodon</title><link rel="shortcut icon"href="favicon.ico"></head><body><div id="app"></div><script type="text/javascript"src="app/vendor_19e4b950.js"></script><script type="text/javascript"src="app/main_19e4b950.js"></script></body></html>