Skip to content

Commit 8cad5a5

Browse files
authored
(DOCSP-20210) Queryable backups updates (#834)
* (DOCSP-20210) Queryable backups updates * Edits, ready for a review * Edits, ready for a review * Edits, ready for a review * Edits, ready for a review * Tech review * 2nd round of tech review * edits * Tech review. Set the default to false * Tech review * tech review
1 parent f5b7959 commit 8cad5a5

8 files changed

+59
-136
lines changed

source/includes/steps-configure-om-queryable-backups.yaml

Lines changed: 16 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,22 @@ ref: create-pem-file
1111
title: "Create the PEM file for backups."
1212
content: |
1313
14-
Create the :opsmgr:`queryable.pem
15-
</reference/configuration/#brs.queryable.pem>`
14+
Create the :opsmgr:`Ops Manager queryable.pem </reference/configuration/#brs.queryable.pem>`
1615
file that you will use for accessing and querying backups based on
1716
your deployment's |tls| requirements. The PEM file contains a public
1817
key certificate and its associated private key that are needed to
19-
access and run queries on |onprem| backup snapshots.
18+
access and run queries on backup snapshots in |onprem|.
2019
2120
To learn more about the PEM file's requirements, see
22-
:opsmgr:`Authorization and Authentication Requirements
21+
:opsmgr:`Authorization and Authentication Requirements in Ops Manager
2322
</tutorial/query-backup/#authentication-and-authorization>`.
24-
2523
---
2624
stepnum: 3
2725
level: 4
2826
ref: create-queryable-pem-secret
29-
title: "Create a Secret containing the PEM file."
27+
title: "Create a secret containing the PEM file."
3028
content: |
31-
Run the following command to create a Secret with the
29+
Run the following command to create a secret with the
3230
:opsmgr:`queryable.pem </reference/configuration/#brs.queryable.pem>`
3331
file that you created in the previous step:
3432
@@ -40,25 +38,19 @@ content: |
4038
4139
.. include:: /includes/facts/fact-learn-more-secret-storage.rst
4240
---
43-
title: "Mount the Secret as a volume that |onprem| custom objects will use."
41+
title: "Configure |onprem| custom resource to use the secret."
4442
stepnum: 4
4543
level: 4
4644
ref: mount-pem-secret
4745
content: |
4846
49-
The |k8s-op-short| must be able to access the :opsmgr:`queryable.pem
50-
</reference/configuration/#brs.queryable.pem>` file in the mount point
51-
for the persistent volume in the Pod's container for |onprem|.
52-
53-
To mount the Secret, use one of these methods:
54-
55-
- Configure volumes using ``volumeClaimTemplates`` and specify the
56-
location for the :opsmgr:`queryable.pem
57-
</reference/configuration/#brs.queryable.pem>` file:
47+
Configure :opsmgrkube:`spec.backup.queryableBackupSecretRef.name` to
48+
reference the :opsmgr:`queryable.pem </reference/configuration/#brs.queryable.pem>`
49+
secret.
5850
59-
.. code-block:: yaml
60-
:linenos:
61-
:emphasize-lines: 9-35
51+
.. code-block:: yaml
52+
:linenos:
53+
:emphasize-lines: 8-12
6254
6355
apiVersion: mongodb.com/v1
6456
kind: MongoDBOpsManager
@@ -68,74 +60,10 @@ content: |
6860
replicas: 1
6961
version: 5.0.0
7062
adminCredentials: ops-manager-admin-secret
71-
configuration:
72-
mms.fromEmailAddr: "[email protected]"
73-
brs.queryable.pem: "/certs/queryable.pem"
74-
75-
statefulSet:
76-
spec:
77-
# the Persistent Volume Claim is created for each Ops Manager Pod
78-
volumeClaimTemplates:
79-
- metadata:
80-
name: queryable-volume
81-
spec:
82-
accessModes: [ "ReadWriteOnce" ]
83-
storageClassName: <your_storage_class_name>
84-
resources:
85-
requests:
86-
storage: 1G
87-
template:
88-
spec:
89-
containers:
90-
- name: mongodb-ops-manager
91-
volumeMounts:
92-
- name: queryable-volume
93-
- mountPath: /certs
94-
volumes:
95-
- name: queryable-pem
96-
secret:
97-
secretName: queryable-pem
98-
99-
applicationDatabase:
100-
members: 3
101-
version: 4.2.6-ent
102-
103-
- Configure volumes without using ``volumeClaimTemplates`` and specify
104-
the location for the :opsmgr:`queryable.pem
105-
</reference/configuration/#brs.queryable.pem>` file:
106-
107-
.. code-block:: yaml
108-
:linenos:
109-
:emphasize-lines: 9-24
110-
111-
apiVersion: mongodb.com/v1
112-
kind: MongoDBOpsManager
113-
metadata:
114-
name: ops-manager
115-
spec:
116-
replicas: 1
117-
version: 5.0.0
118-
adminCredentials: ops-manager-admin-secret
119-
configuration:
120-
brs.queryable.pem: "/certs/queryable.pem"
121-
mms.fromEmailAddr: "[email protected]"
122-
statefulSet:
123-
template:
124-
spec:
125-
containers:
126-
- name: mongodb-ops-manager
127-
volumeMounts:
128-
- name: queryable-volume
129-
- mountPath: /certs/
130-
131-
volumes:
132-
- name: queryable-pem
133-
secret:
134-
secretName: queryable-pem
135-
136-
applicationDatabase:
137-
members: 3
138-
version: 4.2.6-ent
63+
backup:
64+
enabled: true
65+
queryableBackupSecretRef:
66+
name: om-queryable-pem
13967
14068
---
14169
title: "Save your |onprem| config file."

source/includes/steps-multi-cluster-tls-openssl.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
stepnum: 1
33
level: 4
44
ref: mc-openssl-generate-certs-csrs
5-
title: "Use OpenSSL to generate CA certificates, CSRs, and server certificates."
5+
title: "Use OpenSSL to generate CA certificates, |csrs|, and server certificates."
66
content: |
77
88
a. (Optional). If you don't have a |certauth| key and root certificate for your
@@ -29,13 +29,13 @@ content: |
2929
-extensions v3_ca \
3030
-out ./certs/ca.crt
3131
32-
#. For each member cluster, generate a key for the Certificate Signing Request (CSR) with `genrsa <https://www.openssl.org/docs/man3.0/man1/genrsa.html>`__:
32+
#. For each member cluster, generate a key for the |csr| with `genrsa <https://www.openssl.org/docs/man3.0/man1/genrsa.html>`__:
3333
3434
.. code-block:: sh
3535
3636
openssl genrsa -out ./certs/{cluster-X-cert-key}.key 2048
3737
38-
#. For each member cluster, generate a CSR using its key with `openssl req <https://www.openssl.org/docs/man3.0/man1/openssl-req.html>`__.
38+
#. For each member cluster, generate a |csr| using its key with `openssl req <https://www.openssl.org/docs/man3.0/man1/openssl-req.html>`__.
3939
4040
.. code-block:: sh
4141
@@ -45,7 +45,7 @@ content: |
4545
-out ./certs/{cluster-X-cert-signing}.csr
4646
4747
#. For each member cluster, using the generated CA key, root
48-
certificate, and the CSR, generate a server certificate. The
48+
certificate, and the |csr|, generate a server certificate. The
4949
following procedure uses `openssl req <https://www.openssl.org/docs/man3.0/man1/openssl-req.html>`__
5050
in combination with ``bash -extfile`` and ``printf`` to first
5151
contstruct a ``subjectAltName`` parameter, and then inject it

source/includes/steps-multi-cluster-tls-tool.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ content: |
2323
tool generates a self-signed |certauth| key and root certificate.
2424
- The MongoDB multi-cluster resource name.
2525
- The central cluster name and namespace.
26-
- The country, state, and name of the organization for the
27-
Certificate Signing Request (CSR).
26+
- The country, state, and name of the organization for the |csr|.
2827
2928
The following example shows how to run the tool if you have a |certauth|
3029
key and root certificate:

source/multi-cluster-secure.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ to generate server certificates for each member cluster and then updates
2525
the |k8s-op-short| configuration on each member cluster.
2626

2727
Alternatively, you can :ref:`run OpenSSL commands <multi-cluster-tls-openssl>`
28-
directly on each member cluster to generate server certificates and CSRs,
28+
directly on each member cluster to generate server certificates and |csrs|,
2929
and then update the |k8s-op-short| configuration on each member cluster.
3030

3131
.. _multi-cluster-security-prereqs:
@@ -52,9 +52,9 @@ The tool runs OpenSSL commands and takes the following actions:
5252
- On each member cluster, uses a |certauth| key and root certificate that
5353
you specify, or generates a new self-signed |certauth| certificate and
5454
key if you don't specify a |certauth| key and root certificate.
55-
- Generates each cluster's Certificate Signing Request (CSR) and server
56-
certificates for each member cluster's host.
57-
- Based on these certificates and a CSR, creates a cluster certificate
55+
- Generates each cluster's |csr| and server certificates for each member
56+
cluster's host.
57+
- Based on these certificates and a |csr|, creates a cluster certificate
5858
secret for each member cluster. Each cluster certificate secret consists
5959
of all generated server certificates and each member cluster host's
6060
secret key. The host's secret key contains the server certificate
@@ -74,8 +74,8 @@ Configure TLS with OpenSSL
7474
In this procedure you:
7575

7676
- Use OpenSSL to generate member cluster's |certauth| root certificates
77-
and CSRs, and server certificates for each member cluster's host.
78-
- Based on these certificates and CSRs, use OpenSSL to create the member
77+
and |csrs|, and server certificates for each member cluster's host.
78+
- Based on these certificates and |csrs|, use OpenSSL to create the member
7979
cluster certificate secrets. Each cluster certificate secret consists
8080
of all generated server certificates and each member cluster host's
8181
secret key. The host's secret key contains the server certificate

source/reference/k8s-operator-om-specification.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,18 @@ Optional |onprem| Resource Settings
502502
:manual:`dbAdminAnyDatabase
503503
</reference/built-in-roles/#dbAdminAnyDatabase>` roles.
504504

505+
.. opsmgrkube:: spec.backup.queryableBackupSecretRef.name
506+
507+
*Type*: string
508+
509+
Name of the secret that contains the :opsmgr:`queryable.pem </reference/configuration/#brs.queryable.pem>`
510+
file from |onprem| that you will use for accessing and querying backups
511+
based on your deployment's |tls| requirements.The PEM file contains
512+
a public key certificate and its associated private key that are needed
513+
to access and run queries on backup snapshots in |onprem|.
514+
To query backups, specify the value for this parameter. If not set,
515+
backups are not affected, but you can't query them.
516+
505517
.. opsmgrkube:: spec.backup.statefulSet.spec
506518

507519
*Type*: collection

source/reference/k8s/example-openshift-replica-set.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ spec:
2121
enabled: true
2222
modes: ["SCRAM","X509"]
2323
connectivity:
24-
# The "localhost" routes are there just to make sure the localhost
25-
# TLS SAN is created in the CSR, per OpenShift route requirements.
26-
# "ocroute" is the configured route in openshift
24+
# The "localhost" routes are included to enable the creation of localhost
25+
# TLS SAN in the CSR, per OpenShift route requirements.
26+
# "ocroute" is the configured route in OpenShift.
2727
replicaSetHorizons:
2828
- "ocroute": "my-external-0.{redacted}:443"
2929
"localhost": "localhost:27017"

source/tutorial/configure-om-queryable-backups.txt

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,27 @@ for |onprem| resources that you deploy in the |k8s-op-short|.
2222
.. note:: In the |onprem| documentation, queryable backups are also
2323
referred to as queryable snapshots, or queryable restores.
2424

25-
Queryable backups allow you to :opsmgr:`run queries
26-
</tutorial/query-backup/#query-backup-handle-tls-authentication-manually>`
27-
on specific backup snapsnots from your |onprem| resources. Querying
28-
|onprem| backups helps you compare data from different snapshots
29-
and identify the best snapshot to use for :opsmgr:`restoring data
30-
</tutorial/restore-single-database/#restore-from-queryable-backup>`.
25+
Queryable backups allow you to :opsmgr:`run queries </tutorial/query-backup/#query-backup-handle-tls-authentication-manually>`
26+
on specific backup snapsnots from your |onprem| resources. Querying |onprem|
27+
backups helps you compare data from different snapshots and identify the
28+
best snapshot to use for :opsmgr:`restoring data </tutorial/restore-single-database/#restore-from-queryable-backup>`.
3129

3230
In the following procedure you:
3331

34-
- Create the :opsmgr:`queryable.pem
35-
</reference/configuration/#brs.queryable.pem>` file that holds the
36-
certificatesfor accessing the backup snapshots that you intend to query.
37-
38-
- Create the secret containing the :opsmgr:`queryable.pem
39-
</reference/configuration/#brs.queryable.pem>` file.
40-
41-
- Configure a persistent volume that is attached to the |onprem|
42-
|k8s| Pod in the |k8s-op-short|.
43-
44-
- Specify the mount point for the secret in the persistent volume's
45-
configuration.
46-
32+
- Create the :opsmgr:`queryable.pem </reference/configuration/#brs.queryable.pem>`
33+
file that holds the certificates for accessing the backup snapshots that you intend to query.
34+
- Create the secret containing the :opsmgr:`queryable.pem </reference/configuration/#brs.queryable.pem>` file.
35+
- Configure an |onprem| custom resource to use the secret for queryable backups.
4736
- Save the |onprem| custom resource configuration and apply it.
4837

49-
Once the |k8s-op-short| deploys the updated configuration for the
50-
|onprem| custom resource, |onprem| can read the Secret from the
51-
specified location in the :opsmgr:`queryable.pem
52-
</reference/configuration/#brs.queryable.pem>` parameter in |onprem|.
53-
You can now access the backup snapshots and run queries on them.
38+
Once the |k8s-op-short| deploys the updated configuration for its custom
39+
resource, |onprem| can read the secret from the :opsmgrkube:`spec.backup.queryableBackupSecretRef.name`
40+
parameter. You can now access the backup snapshots and run queries on them.
5441

5542
Prerequisites
5643
-------------
5744

58-
Before you configure queryable backups, complete the following:
45+
Before you configure queryable backups, complete the following tasks:
5946

6047
- :doc:`Install the Kubernetes Operator </tutorial/install-k8s-operator>`.
6148

@@ -69,8 +56,5 @@ Procedure
6956

7057
.. include:: /includes/steps/configure-om-queryable-backups.rst
7158

72-
After you configure queryable backups, you can :opsmgr:`query them
73-
</tutorial/query-backup/>` to select the best backup snapshot to use for
74-
:opsmgr:`restoring data
75-
</tutorial/restore-single-database/#restore-from-queryable-backup>`.
76-
59+
After you configure queryable backups, you can :opsmgr:`query them </tutorial/query-backup/>`
60+
to select the best backup snapshot to use for :opsmgr:`restoring data </tutorial/restore-single-database/#restore-from-queryable-backup>`.

source/tutorial/om-arch.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ changes to the ``MongoDBOpsManager`` |k8s-crd|.
157157
.. _om-arch-steps:
158158

159159
1. The |k8s-op-short| creates or updates the
160-
``<om_resource_name>-db-config`` Secret. This secret contains
160+
``<om_resource_name>-db-config`` secret. This secret contains
161161
the configurations that the {+mdbagent+} uses to start the
162162
Application Database replica set.
163163

@@ -168,7 +168,7 @@ changes to the ``MongoDBOpsManager`` |k8s-crd|.
168168
- Each Pod runs one {+mdbagent+} instance. Each {+mdbagent+} starts a
169169
|mongod| instance on its Pod.
170170
- The |k8s-op-short| mounts the ``<om_resource_name>-db-config``
171-
Secret to each Pod. The {+mdbagent+} uses this secret to
171+
secret to each Pod. The {+mdbagent+} uses this secret to
172172
configure the Application Database replica set.
173173

174174
3. The |k8s-op-short| creates or updates the ``<om_resource_name>``
@@ -191,7 +191,7 @@ changes to the ``MongoDBOpsManager`` |k8s-crd|.
191191

192192
4. The |k8s-op-short| invokes |onprem| APIs to create an admin user.
193193
The |k8s-op-short| saves this admin user's credentials in the
194-
``<om_resource_name>-admin-key`` Secret. The |k8s-op-short|
194+
``<om_resource_name>-admin-key`` secret. The |k8s-op-short|
195195
uses these credentials for all other |onprem| API invocations.
196196

197197
.. note::

0 commit comments

Comments
 (0)