对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

升级 Ops Manager 和后端数据库版本

Update the major and minor versions of your Ops Manager instance and backing databases in the Ops Manager Resource Specification that the Kubernetes Operator uses to manage your deployment.

警告

要保持现有设置和可用性,请在当前 Ops Manager 实例中备份以下内容:

  • 将您的conf-mms.properties到安全位置。 conf-mms.properties存储 Ops Manager 实例的设置。

  • gen.key文件保存到安全位置。 gen.key提供了对MongoDB Ops Manager的后端数据库和用户凭证进行加密和解密的详细信息。 MongoDB Ops Manager可能会在升级过程中删除这些文件。

应用程序数据库不存在正式支持的备份方法。如果升级失败,联系MongoDB支持部门以帮助修复Ops Manager版本的问题。

  1. 按照升级MongoDB Ops Manager中的注意事项、先决条件和过程升级MongoDB Ops Manager 。

    重要

    升级时,请勿跳过主要Ops Manager版本。升级到当前主要版本的最新可用补丁发布,然后升级到下一个主要版本。重复此进程,直到达到目标版本。示例,要从 7.0.x升级到 8.0,请先升级到最新可用的 7.0 补丁发布。要查找当前版本的升级路径,请参阅升级Ops Manager。

  2. 参考 使用兼容的MongoDB 版本 确保 后端数据库 MongoDB使用与新的MongoDB Ops Manager 版本兼容的 MongoDB 版本。

  3. 如果需要将后端数据库升级到兼容的MongoDB版本,请参阅升级MongoDB版本。

要升级MongoDB Ops Manager和应用程序数据库版本,请完成以下步骤:

1
  1. spec.version设置为新的 Ops Manager 版本。

  2. 如果您升级了应用程序数据库,请将spec.applicationDatabase.version设置为兼容的 MongoDB 版本。

重要

请务必选择兼容的 MongoDB Server 版本

兼容版本因 MongoDB 数据库资源使用的基础图片而异。

警告

如以下示例所示,由于与当前Ops Manager部署关联的应用程序数据库资源以滚动方式升级,因此您必须在开始升级进程之前将 featureCompatibilityVersion 显式设立为应用程序数据库正在运行的当前MongoDB版本。

这可以防止升级进程中Ops Manager和应用程序数据库之间潜在的数据错位问题。

1apiVersion: mongodb.com/v1
2kind: MongoDBOpsManager
3metadata:
4 name: om
5spec:
6 topology: SingleCluster # optional, SingleCluster by default
7 opsManagerURL: https://link.to.configured.load-balancer.example.com # optional OM URL for the operator
8replicas: 1
9version: "8.0.0"
10 adminCredentials: ops-manager-admin-secret
11 configuration:
12 mms.fromEmailAddr: admin@example.com
13 mms.security.allowCORS: "false"
14 security:
15 tls:
16 ca: issuer-ca
17 backup:
18 enabled: true
19 encryption:
20 kmip:
21 server:
22 url: kmip.corp.mongodb.com:5696
23 ca: mongodb-kmip-certificate-authority-pem
24 headDB:
25 storage: "30Gi"
26 labelSelector:
27 matchLabels:
28 app: my-app
29 opLogStores:
30 - name: oplog1
31 # Sets labels for the oplog store.
32 assignmentLabels: ["test1", "test2"]
33 mongodbResourceRef:
34 name: my-oplog-db
35 mongodbUserRef:
36 name: my-oplog-user
37 s3Stores:
38 - name: s3store1
39 # Sets labels for the S3 store.
40 assignmentLabels: ["test1", "test2"]
41
42 mongodbResourceRef:
43 name: my-s3-metadata-db
44 mongodbUserRef:
45 name: my-s3-store-user
46 s3SecretRef:
47 name: my-s3-credentials
48 pathStyleAccessEnabled: true
49 s3BucketEndpoint: s3.region.amazonaws.com
50 s3BucketName: my-bucket
51 applicationDatabase:
52 passwordSecretKeyRef:
53 name: om-db-user-secret
54 key: password
55 members: 3
56 topology: SingleCluster
57 version: "7.0.21-ubi8"
58 featureCompatibilityVersion: "6.0" # During upgrade, set this FCV value to your currently deployed AppDB version.
59 security:
60 certsSecretPrefix: appdb
61 tls:
62 ca: issuer-ca
2
kubectl apply -f <om-resource-specification>.yaml

Kubernetes 会使用新规范自动重新配置您的部署。 您可以在MongoDB Ops ManagerCloud Manager应用程序中看到这些更改的反映。