5.8.1升级至5.9.0文档

版本变更

5.9.0 版本变更

控制台升级

  • helm
  • Basic Edition

  • 如控制台为 allinone 启动,执行以下操作

  1. docker stop rainbond-allinone && docker rm rainbond-allinone
  2. #该命令参数需要和之前启动的rainbond-allinone容器一致
  3. docker run -d -p 7070:7070 -v ~/.ssh:/root/.ssh -v ~/rainbonddata:/app/data \
  4. --name=rainbond-allinone --restart=always \
  5. registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:v5.9.0-release-allinone

如控制台为通过应用市场安装,进入控制台应用内,选择升级到 5.9.0 版本

数据中心升级

1. 更新 grctl 命令

  1. docker run -it --rm -v /:/rootfs registry.cn-hangzhou.aliyuncs.com/goodrain/rbd-grctl:v5.9.0-release copy
  2. mv /usr/local/bin/rainbond-grctl /usr/local/bin/grctl && grctl install

注意:如果遇到无法安装 grctl 可以参考grctl 安装文档

2. 执行升级命令

  1. grctl cluster upgrade --new-version=v5.9.0-release

3.更换 operator 镜像并修改挂载

  1. kubectl edit deploy rainbond-operator -n rbd-system
  • 替换镜像为以下

    1. registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v5.9.0-release
  • 修改挂载的配置如下,注意 volumeMounts 以及volume 格式对齐

    1. volumeMounts:
    2. - mountPath: /var
    3. name: vardir
    4. - mountPath: /run
    5. name: rundir
    6. volumes:
    7. - hostPath:
    8. path: /run
    9. type: Directory
    10. name: rundir
    11. - hostPath:
    12. path: /var
    13. type: Directory
    14. name: vardir

配置文件如下:

  1. # 需要配置 image volumeMounts 以及 volumes 字段的内容
  2. # Please edit the object below. Lines beginning with a '#' will be ignored,
  3. # and an empty file will abort the edit. If an error occurs while saving this file will be
  4. # reopened with the relevant failures.
  5. #
  6. apiVersion: apps/v1
  7. kind: Deployment
  8. metadata:
  9. annotations:
  10. deployment.kubernetes.io/revision: "1"
  11. meta.helm.sh/release-name: rainbond
  12. meta.helm.sh/release-namespace: rbd-system
  13. creationTimestamp: "2022-10-10T03:28:19Z"
  14. generation: 1
  15. labels:
  16. app.kubernetes.io/managed-by: Helm
  17. control-plane: rainbond-operator
  18. release: rainbond
  19. name: rainbond-operator
  20. namespace: rbd-system
  21. resourceVersion: "926"
  22. uid: 5fd3bcf3-52e2-4a29-a653-511bb0cd7058
  23. spec:
  24. progressDeadlineSeconds: 600
  25. replicas: 1
  26. revisionHistoryLimit: 10
  27. selector:
  28. matchLabels:
  29. control-plane: rainbond-operator
  30. strategy:
  31. rollingUpdate:
  32. maxSurge: 25%
  33. maxUnavailable: 25%
  34. type: RollingUpdate
  35. template:
  36. metadata:
  37. creationTimestamp: null
  38. labels:
  39. control-plane: rainbond-operator
  40. release: rainbond
  41. spec:
  42. containers:
  43. - args:
  44. - --leader-elect
  45. - --zap-log-level=4
  46. command:
  47. - /manager
  48. image: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond-operator:v5.9.0-release
  49. imagePullPolicy: IfNotPresent
  50. livenessProbe:
  51. failureThreshold: 3
  52. httpGet:
  53. path: /healthz
  54. port: 8081
  55. scheme: HTTP
  56. initialDelaySeconds: 15
  57. periodSeconds: 20
  58. successThreshold: 1
  59. timeoutSeconds: 1
  60. name: rainbond-operator
  61. readinessProbe:
  62. failureThreshold: 3
  63. httpGet:
  64. path: /readyz
  65. port: 8081
  66. scheme: HTTP
  67. initialDelaySeconds: 5
  68. periodSeconds: 10
  69. successThreshold: 1
  70. timeoutSeconds: 1
  71. resources:
  72. requests:
  73. cpu: 100m
  74. memory: 64Mi
  75. securityContext:
  76. allowPrivilegeEscalation: false
  77. terminationMessagePath: /dev/termination-log
  78. terminationMessagePolicy: File
  79. volumeMounts:
  80. - mountPath: /var
  81. name: vardir
  82. - mountPath: /run
  83. name: rundir
  84. dnsPolicy: ClusterFirst
  85. restartPolicy: Always
  86. schedulerName: default-scheduler
  87. securityContext: {}
  88. serviceAccount: rainbond-operator
  89. serviceAccountName: rainbond-operator
  90. terminationGracePeriodSeconds: 10
  91. volumes:
  92. - hostPath:
  93. path: /run
  94. type: Directory
  95. name: rundir
  96. - hostPath:
  97. path: /var
  98. type: Directory
  99. name: vardir
  • 等待 operator 启动完成以后重启 node 以及 chaos
  1. kubectl delete ds rbd-chaos rbd-node -n rbd-system
5.8.1升级至5.9.0文档 - 图1caution

非 helm 安装的 Rainbond,出现以下报错为正常现象,可以忽略

  1. error: update rainbond components: get rbdcomponent rbd-app-ui: rbdcomponents.rainbond.io "rbd-app-ui" not found