• 持续交付部署

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

    添加choerodon chart仓库

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

    创建数据库

    helm install c7n/mysql-client \
        --set env.MYSQL_HOST=c7n-mysql.c7n-system.svc \
        --set env.MYSQL_PORT=3306 \
        --set env.MYSQL_USER=root \
        --set env.MYSQL_PASS=password \
        --set env.SQL_SCRIPT="\
              CREATE USER IF NOT EXISTS 'choerodon'@'%' IDENTIFIED BY 'password';\
              CREATE DATABASE IF NOT EXISTS devops_service DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\
              CREATE DATABASE IF NOT EXISTS gitlab_service DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\
              CREATE DATABASE IF NOT EXISTS workflow_service DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\
              GRANT ALL PRIVILEGES ON devops_service.* TO choerodon@'%';\
              GRANT ALL PRIVILEGES ON gitlab_service.* TO choerodon@'%';\
              GRANT ALL PRIVILEGES ON workflow_service.* TO choerodon@'%';\
              FLUSH PRIVILEGES;" \
        --version 0.1.0 \
        --name create-c7ncd-db \
        --namespace c7n-system
    

    部署devops service

    部署gitlab service

    部署workflow service