• 微服务开发框架部署

    在此之前,应该准备好Mysql、Harbor、Gitlab、Minio,Chartmuseum这些组件的信息。按以下搭建顺序进行搭建,请不要随意调整搭建顺序。 以下验证部署是否成功如未特别说明则执行验证的环境为任意一台集群Master节点。
    部署成功后Choerodon平台默认登录名为admin,默认密码为admin。

    添加Choerodon Chart仓库

    helm repo add c7n https://openchart.choerodon.com.cn/choerodon/c7n/
    helm repo update
    
    0.19以前的base-service的数据库为iam_service,0.19以后更名为base_service,对于配置文件中是使用iam_service还是base_service遵从一下标准: 如果是新安装的版本,就使用base_service,如果是升级上来的版本,原版本数据库使用的是什么数据库名称,配置文件中就配置对应的数据库名称

    创建数据库

      helm install c7n/mysql-client \
          -f create-c7nfw-db.yaml \
          --version 0.1.0 \
          --name create-c7nfw-db \
          --namespace c7n-system
    

    部署 register server

      env:
        open:
          REGISTER_SERVICE_NAMESPACE: c7n-system
      rbac:
        create: true
      service:
        enabled: true
        name: register-server
    
      helm install c7n/go-register-server \
        -f register-server.yaml \
        --name register-server \
        --version 0.21.0 \
        --namespace c7n-system
    

    部署 base service

    部署 manager service

      env:
        open:
          CHOERODON_GATEWAY_DOMAIN: api.example.choerodon.io
          CHOERODON_SWAGGER_OAUTH_URL: http://api.example.choerodon.io/oauth/oauth/authorize
          EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://register-server.c7n-system:8000/eureka/
          SPRING_CLOUD_CONFIG_URI: http://register-server.c7n-system:8000/
          SPRING_DATASOURCE_PASSWORD: password
          SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
          SPRING_DATASOURCE_USERNAME: choerodon
          SPRING_REDIS_DATABASE: 1
          SPRING_REDIS_HOST: c7n-redis.c7n-system.svc
          SPRING_REDIS_PORT: 6379
      preJob:
        preInitDB:
          datasource:
            password: password
            url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/manager_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
            username: choerodon
    
      helm install c7n/manager-service \
          -f manager-service.yaml \
          --name manager-service \
          --version 0.21.0 \
          --namespace c7n-system
    

    部署 asgard service

      env:
        open:
          EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://register-server.c7n-system:8000/eureka/
          SPRING_CLOUD_CONFIG_URI: http://register-server.c7n-system:8000/
          SPRING_DATASOURCE_PASSWORD: password
          SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/asgard_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
          SPRING_DATASOURCE_USERNAME: choerodon
          SPRING_REDIS_DATABASE: 2
          SPRING_REDIS_HOST: c7n-redis.c7n-system.svc
          SPRING_REDIS_PORT: 6379
      preJob:
        timeout: 1800
        preInitDB:
          datasource:
            password: password
            url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/asgard_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
            username: choerodon
    

    部署 notify service

      env:
        open:
          EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://register-server.c7n-system:8000/eureka/
          SPRING_CLOUD_CONFIG_URI: http://register-server.c7n-system:8000/
          SPRING_DATASOURCE_PASSWORD: password
          SPRING_DATASOURCE_URL: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/notify_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
          SPRING_DATASOURCE_USERNAME: choerodon
          SPRING_REDIS_DATABASE: 4
          SPRING_REDIS_HOST: c7n-redis.c7n-system.svc
      ingress:
        enabled: true
        host: notify.example.choerodon.io
      preJob:
        timeout: 1800
        preInitDB:
          datasource:
            password: password
            url: jdbc:mysql://c7n-mysql.c7n-system.svc:3306/notify_service?useUnicode=true&characterEncoding=utf-8&useSSL=false&useInformationSchema=true&remarks=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
            username: choerodon
      service:
        enabled: true
        name: notify-service
    

    部署 api gateway

    部署 oauth server

    部署 file service