Skip to content

Commit c35a71b

Browse files
author
Dave Cuthbert
authored
DOCSP-22729 create connection pages v2 (#20)
* tmp * rm tmp * Revert commit * Add warning banners * Review feedback * Review feedback * Review feedback * Review feedback
1 parent 1bc80c8 commit c35a71b

15 files changed

+276
-23
lines changed

snooty.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
name = "cluster-sync"
22
title = "MongoDB Cluster-to-Cluster Sync"
33

4-
intersphinx = [ "https://docs.mongodb.com/manual/objects.inv" ]
4+
intersphinx = [ "https://www.mongodb.com/docs/atlas/objects.inv",
5+
"https://www.mongodb.com/docs/php-library/upcoming/objects.inv",
6+
"https://www.mongodb.com/docs/compass/current/objects.inv",
7+
"https://www.mongodb.com/docs/mongodb-shell/objects.inv",
8+
"https://www.mongodb.com/docs/master/objects.inv",
9+
"https://www.mongodb.com/docs/drivers/objects.inv",
10+
"https://www.mongodb.com/docs/database-tools/objects.inv",
11+
"https://www.mongodb.com/docs/mongocli/stable/objects.inv",
12+
"https://www.mongodb.com/docs/datalake/objects.inv"
13+
]
514

615
toc_landing_pages = ["/quickstart",
716
"/installation",
817
"reference/reference",
18+
"/connecting",
19+
"/using-mongosync",
20+
"/reference",
921
"/release-notes/release-notes",
1022
"/faq"
1123
]

source/connecting.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
11
.. _c2c-connecting:
2+
.. _c2c-conn-top-level:
23

34
========================
45
Connecting ``mongosync``
56
========================
67

78
.. include:: /includes/preview-warning
8-
9+
10+
.. include:: /includes/fact-connect-intro
11+
12+
.. contents:: On this page
13+
:local:
14+
:backlinks: none
15+
:depth: 1
16+
:class: singlecol
17+
18+
To configure a connection with :ref:`mongosync <c2c-mongosync>`, refer
19+
to the connection documentation that matches your environment:
20+
21+
- :ref:`c2c-conn-atlas2atlas`
22+
- :ref:`c2c-conn-oprem2onprem`
23+
- :ref:`c2c-conn-onprem2atlas`
24+
925
.. toctree::
1026
:titlesonly:
1127

1228
/connecting/atlas-to-atlas
13-
/connecting/onprem-onprem
29+
/connecting/onprem-to-onprem
1430
/connecting/onprem-to-atlas
1531

source/connecting/atlas-to-atlas.txt

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,45 @@ Connect Two Atlas Clusters
88

99
.. default-domain:: mongodb
1010

11-
Connect two Atlas clusters
11+
.. contents:: On this page
12+
:local:
13+
:backlinks: none
14+
:depth: 1
15+
:class: twocols
16+
17+
.. include:: /includes/fact-connect-intro
18+
19+
This page provides instructions to connect Atlas clusters using
20+
{+c2c-full-product-name+}. For additional details on connecting to an
21+
Atlas cluster, see :ref:`Connect to a Database Deployment
22+
<atlas-connect-to-deployment>`
23+
24+
Connection Strings
25+
------------------
26+
27+
.. include:: /includes/fact-connection-strings
28+
29+
.. include:: /includes/fact-connect-sharded
30+
31+
Authentication
32+
--------------
33+
34+
.. include:: /includes/fact-atlas-auth
35+
36+
Roles
37+
-----
38+
39+
.. include:: /includes/fact-atlas-roles
40+
41+
Behavior
42+
--------
43+
44+
.. include:: /includes/fact-behavior-hosting
45+
46+
.. include:: /includes/fact-behavior-initial-state
47+
48+
Example
49+
-------
50+
51+
.. include:: /includes/example-connect
1252

source/connecting/onprem-onprem.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

source/connecting/onprem-to-atlas.txt

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,46 @@ Connect a Self-Managed Cluster to Atlas
88

99
.. default-domain:: mongodb
1010

11-
self-managed to atlas
11+
.. contents:: On this page
12+
:local:
13+
:backlinks: none
14+
:depth: 1
15+
:class: twocols
16+
17+
.. include:: /includes/fact-connect-intro
18+
19+
This page provides instructions to connect a self-managed cluster to an
20+
Atlas cluster using {+c2c-full-product-name+}.
21+
22+
For additional details on connecting to an Atlas cluster, see
23+
:ref:`Connect to a Database Deployment <atlas-connect-to-deployment>`
24+
25+
Connection Strings
26+
------------------
27+
28+
.. include:: /includes/fact-connection-strings
29+
30+
Authentication
31+
--------------
32+
33+
.. include:: /includes/fact-atlas-auth
34+
35+
.. include:: /includes/fact-onprem-auth
36+
37+
Roles
38+
-----
39+
40+
.. include:: /includes/fact-atlas-roles
41+
42+
Behavior
43+
--------
44+
45+
.. include:: /includes/fact-behavior-hosting
46+
47+
.. include:: /includes/fact-behavior-initial-state
48+
49+
Example
50+
-------
51+
52+
.. include:: /includes/example-connect
1253

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.. _c2c-conn-oprem2onprem:
2+
3+
=================================
4+
Connect Two Self-Managed Clusters
5+
=================================
6+
7+
.. include:: /includes/preview-warning
8+
9+
.. default-domain:: mongodb
10+
11+
.. contents:: On this page
12+
:local:
13+
:backlinks: none
14+
:depth: 1
15+
:class: twocols
16+
17+
.. include:: /includes/fact-connect-intro
18+
19+
This page provides instructions to connect self-managed clusters using
20+
{+c2c-full-product-name+}.
21+
22+
Connection Strings
23+
------------------
24+
25+
.. include:: /includes/fact-connection-strings
26+
27+
Authentication
28+
--------------
29+
30+
.. include:: /includes/fact-onprem-auth
31+
32+
Behavior
33+
--------
34+
35+
.. include:: /includes/fact-behavior-hosting
36+
37+
.. include:: /includes/fact-behavior-initial-state
38+
39+
Example
40+
-------
41+
42+
.. include:: /includes/example-connect
43+

source/includes/example-connect.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Gather Connection Information
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The source cluster, ``cluster0``, is hosted on the following servers
5+
and ports:
6+
7+
- clusterOne01.fancyCorp.com:20020
8+
- clusterOne02.fancyCorp.com:20020
9+
- clusterOne03.fancyCorp.com:20020
10+
11+
The destination cluster, ``cluster1``, is hosted on the following
12+
servers and ports:
13+
14+
- clusterTwo01.fancyCorp.com:20020
15+
- clusterTwo02.fancyCorp.com:20020
16+
- clusterTwo03.fancyCorp.com:20020
17+
18+
There is an administrative user, ``clusterAdmin`` configured on each
19+
cluster with password, ``superSecret``.
20+
21+
Connect the Source and Destination Clusters with ``mongosync``
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
24+
The generic connection string format is:
25+
26+
.. code-block:: shell
27+
28+
mongodb://<user>:<password>@<ip-address>:<port>,<ip-address>:<port>,<ip-address>:<port>
29+
30+
Use the connection information you gathered to create the connection
31+
strings for ``cluster0`` and ``cluster1``:
32+
33+
.. code-block:: shell
34+
35+
cluster0:
36+
mongodb://clusterAdmin:[email protected]:20020,clusterOne02.fancyCorp.com:20020,clusterOne03.fancyCorp.com:20020
37+
cluster1:
38+
mongodb://clusterAdmin:[email protected]:20020,clusterTwo02.fancyCorp.com:20020,clusterTwo03.fancyCorp.com:20020
39+
40+
The ``mongosync`` command layout below is modified for display. To
41+
connect ``cluster0`` to ``cluster`` with ``mongosync``, enter the
42+
following command on one line:
43+
44+
.. code-block:: shell
45+
46+
mongosync --cluster0 mongodb://clusterAdmin:[email protected]:20020,
47+
clusterOne02.fancyCorp.com:20020,
48+
clusterOne03.fancyCorp.com:20020
49+
--cluster1 mongodb://clusterAdmin:[email protected]:20020,
50+
clusterTwo02.fancyCorp.com:20020,
51+
clusterTwo03.fancyCorp.com:20020
52+

source/includes/fact-atlas-auth.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Provide valid authentication to connect to a :atlas:`MongoDB Atlas
2+
</>` cluster. If you do not already have an Atlas database user,
3+
you must :ref:`create a user <mongodb-users>`.
4+

source/includes/fact-atlas-roles.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
The user specified in the connection string must have the
2+
:atlasrole:`atlasAdmin` role.
3+
4+
To use ``mongosync`` in the reverse direction, you must `create a
5+
custom role </atlas/reference/api/custom-roles-create-a-role/>`__ that
6+
grants the following ActionTypes:
7+
8+
- setUserWriteBlockMode
9+
- bypassWriteBlockingMode
10+
11+
The ``setUserWriteBlockMode`` and ``bypassWriteBlockingMode`` user
12+
actions are available starting in MongoDB 6.0. To create the custom
13+
roles, all clusters in a project must be on MongoDB 6.0 or higher.
14+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Hosting
2+
~~~~~~~
3+
4+
The ``mongosync`` utility can be hosted on its own hardware close to
5+
either the source or destination cluster. It does not have to be hosted
6+
on the same server as one of the :binary:`mongod` or :binary:`mongos`
7+
instances in the cluster. This flexibility allows you to push, or pull,
8+
data to the destination cluster with minimal impact on the
9+
:binary:`mongod` or :binary:`mongos` instances running there.

0 commit comments

Comments
 (0)