Skip to content

Commit 658a378

Browse files
author
Dave Cuthbert
authored
DOCSP-22729 create connection pages (#16)
1 parent 37dce2f commit 658a378

16 files changed

+275
-20
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: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
.. _c2c-connecting:
2-
2+
.. _c2c-conn-top-level:
33

44
========================
55
Connecting ``mongosync``
66
========================
77

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

1126
/connecting/atlas-to-atlas
12-
/connecting/onprem-onprem
27+
/connecting/onprem-to-onprem
1328
/connecting/onprem-to-atlas
1429

source/connecting/atlas-to-atlas.txt

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,43 @@ Connect Two Atlas Clusters
66

77
.. default-domain:: mongodb
88

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

source/connecting/onprem-onprem.txt

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

source/connecting/onprem-to-atlas.txt

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,51 @@ Connect a Self-Managed Cluster to Atlas
66

77
.. default-domain:: mongodb
88

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

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

source/includes/example-connect.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
:copyable: false
35+
36+
cluster0:
37+
mongodb://clusterAdmin:[email protected]:20020,clusterOne02.fancyCorp.com:20020,clusterOne03.fancyCorp.com:20020
38+
cluster1:
39+
mongodb://clusterAdmin:[email protected]:20020,clusterTwo02.fancyCorp.com:20020,clusterTwo03.fancyCorp.com:20020
40+
41+
The ``mongosync`` command layout below is modified for display. To
42+
connect ''cluster0`` to ``cluster`` with ``mongosync``, enter the
43+
following command on one line:
44+
45+
.. code-block:: shell
46+
:copyable: false
47+
48+
mongosync --cluster0 mongodb://clusterAdmin:[email protected]:20020,
49+
clusterOne02.fancyCorp.com:20020,
50+
clusterOne03.fancyCorp.com:20020
51+
--cluster1 mongodb://clusterAdmin:[email protected]:20020,
52+
clusterTwo02.fancyCorp.com:20020,
53+
clusterTwo03.fancyCorp.com:20020
54+

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+
You must provide valid authentication to connect to a :atlas:`MongoDB
2+
Atlas </>` 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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The user specified in the connection string must have the
2+
:atlasrole:`atlasAdmin` role.
3+
4+
To use ``mongosync`` in reverse direction, you must `create a custom
5+
role </atlas/reference/api/custom-roles-create-a-role/>`__ that grants the
6+
following ActionTypes:
7+
8+
- setUserWriteBlockMode
9+
- bypassWriteBlockingMode
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Hosting
2+
~~~~~~~
3+
4+
``mongosync`` is a separate utility. ``mongosync`` can be hosted on its
5+
own hardware close to either the source or destination cluster. This
6+
flexibility allows you to push, or pull, data to the destination
7+
cluster with minimal impact on the :binary:`mongod` or :binary:`mongos`
8+
instances running there.

0 commit comments

Comments
 (0)