Skip to main content

5.1.0 升级说明

查看变更内容

注意

升级到 5.0.0+ 前请确保 Docker 版本在 20.10.16 及以上,如果低于此版本,请先升级 Docker。可通过 docker -v 命令查看 Docker 版本。

单机模式

  • 数据备份

  • 下载镜像(离线包

    docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-sc:2.0.1
    docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-command:node1018-python36
  • 修改 docker-compose.yaml 文件(默认路径:/data/mingdao/script/docker-compose.yaml)(修改后注意 yaml 文件格式对齐):

    1. 在原有 app 服务 environment 后追加 &app-environment

      services:
      app:
      environment: &app-environment
      ......
    2. 新增 sccommand 服务

        sc:
      image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-sc:2.0.1
      environment:
      <<: *app-environment
      volumes:
      - ./volume/data/:/data/

      command:
      image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-command:node1018-python36
      environment:
      <<: *app-environment

      修改示例:

    一些额外注意事项:

    1. 如果有自定义过存储组件的连接地址,并且是将连接地址配置为 127.0.0.1,则需要将 127.0.0.1 修改为 sc
      • 例如 ENV_MONGODB_URI: "mongodb://xxx:xxx@127.0.0.1:27017" 变量值需要改成:"mongodb://xxx:xxx@sc:27017"
    2. 如果启用了自定义文件对象存储,需要将对应挂载剪切sc 服务的 volumes
    3. 如果 app 服务中存在映射储存组件的相关端口(如:3306、27017、6379、9092、9200、9000),也需要剪切sc 服务的 ports
      • 参考如下(宿主机映射端口、宿主机挂载文件路径根据实际情况调整):
      services:
      sc:
      image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-sc:1.0.0
      environment:
      <<: *app-environment
      ports:
      - xxx:3306
      - xxx:27017
      volumes:
      - ./volume/data/:/data/
      - ./volume/file/s3-config.json:/usr/local/file/s3-config.json
    1. 如果原 app 服务存在扩展代码块依赖库的持久化挂载,需要将对应挂载剪切到 command 服务的 volumes 中,参考如下(宿主机挂载文件路径根据实际情况调整):
      services:
      command:
      image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-command:node1018-python36
      environment:
      <<: *app-environment
      volumes:
      - ./volume/command/package/python-3.6/site-packages/:/usr/local/lib/python3.6/site-packages/
      - ./volume/command/package/nodejs-10.18.0/node_modules/:/usr/local/node-10.18.0/lib/node_modules/
  • 数据集成服务升级到 1.17.1.510未启用则无需升级),参考 数据集成服务升级

  • 微服务升级到 5.1.0,参考 微服务升级

集群模式

  • 对数据存储相关的服务器进行备份

  • 下载镜像(离线包

    crictl pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-command:node1018-python36
  • 修改 service.yaml默认:/data/mingdao/script/kubernetes/service.yaml)中 command 服务对应的 Deployment 依赖镜像为:
    registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-command:node1018-python36

  • 修改 service.yaml,新增 computingschedule 服务,默认配置如下,根据实际需要自行调整参数值

    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: computingschedule
    namespace: default
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: computingschedule
    template:
    metadata:
    labels:
    app: computingschedule
    annotations:
    md-update: "20240123163208"
    spec:
    containers:
    - name: computingschedule
    image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-community:5.1.0
    env:
    - name: ENV_SERVERID
    value: "single:computingschedule"
    resources:
    limits:
    cpu: "24"
    memory: 2048Mi
    requests:
    cpu: "0.01"
    memory: 64Mi
    readinessProbe:
    tcpSocket:
    port: 9159
    initialDelaySeconds: 10
    periodSeconds: 10
    livenessProbe:
    tcpSocket:
    port: 9159
    initialDelaySeconds: 180
    periodSeconds: 10

    ---

    apiVersion: v1
    kind: Service
    metadata:
    name: computingschedule
    namespace: default
    spec:
    selector:
    app: computingschedule
    ports:
    - name: http-computingschedule
    port: 9158
    targetPort: 9158
    - name: grpc-computingschedule
    port: 9159
    targetPort: 9159

    ---
  • 微服务升级到 5.1.0,参考 微服务升级