Navigation

Upgrade Ops Manager and Backing Database Versions

On this page

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

Prerequisites

Warning

To maintain existing settings and availability, back up the following in your current Ops Manager instance:

  • Your conf-mms.properties to a secure location. The conf-mms.properties stores settings for the Ops Manager instance.
  • Your gen.key files to a secure location. The gen.key provides details to encrypt and decrypt Ops Managers backing databases and user credentials. Ops Manager might delete these files as part of the upgrade process.
  • Your application database. If the upgrade fails, you need a current backup to restore your Ops Manager instance.
  1. Upgrade Ops Manager by following the considerations, prerequisites, and procedure in Upgrade Ops Manager.
  2. Reference Use a Compatible MongoDB Version to ensure your backing databases use a MongoDB version that is compatible with the new Ops Manager version.
  3. If you need to upgrade your backing databases to a compatible MongoDB version, see Upgrade MongoDB Version and FCV.

Procedure

  1. In your Ops Manager Resource Specification, set the following:

    For example, the following resource updates Ops Manager from 4.0 to 5.0 and the application database to MongoDB 4.2.11-ent.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    apiVersion: mongodb.com/v1
    kind: MongoDBOpsManager
    metadata:
     name: om
    spec:
     replicas: 1
     version: "6.0.0"
     adminCredentials: ops-manager-admin
     configuration:
      mms.fromEmailAddr: admin@example.com
      mms.security.allowCORS: "false"
     backup:
      enabled: true
      encryption:
        kmip:
          server:
            url: kmip.corp.mongodb.com:5696
            ca: mongodb-kmip-certificate-authority-pem
      headDB:
       storage: "30Gi"
       labelSelector:
        matchLabels:
         app: my-app
      opLogStores:
       - name: oplog1
                           # Sets labels for the oplog store.
         assignmentLabels: ["test1", "test2"]
         mongodbResourceRef:
          name: my-oplog-db
         mongodbUserRef:
          name: my-oplog-user
      s3Stores:
       - name: s3store1
                           # Sets labels for the S3 store.
         assignmentLabels: ["test1", "test2"]
                           
         mongodbResourceRef:
          name: my-s3-metadata-db
         mongodbUserRef:
          name: my-s3-store-user
         s3SecretRef:
           name: my-s3-credentials
         pathStyleAccessEnabled: true
         s3BucketEndpoint: s3.region.amazonaws.com
         s3BucketName: my-bucket
    
     applicationDatabase:
       passwordSecretKeyRef:
        name: om-db-user-secret
        key: password
       members: 3
       version: "4.2.11-ent"
       persistent: true
    
  2. Reapply the configuration to Kubernetes:

    kubectl apply -f <om-resource-specification>.yaml
    

    Kubernetes automatically reconfigures your deployment with the new specifications. You can see these changes reflected in your Ops Manager or Cloud Manager application.