-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DOCS-1395 config server tutorials #865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
======================= | ||
Backup Cluster Metadata | ||
======================= | ||
|
||
.. default-domain:: mongodb | ||
|
||
This procedure shuts down the :program:`mongod` instance of a | ||
:ref:`config server <sharding-config-server>` in order to create a | ||
backup of a :doc:`sharded cluster's </core/sharded-clusters>` | ||
metadata. The cluster's config servers store all of the cluster's | ||
metadata, most importantly the mapping from :term:`chunks <chunk>` to | ||
:term:`shards <shard>`. | ||
|
||
When you perform this procedure, the cluster remains operational | ||
[#read-only]_. | ||
|
||
#. Disable the cluster balancer process temporarily. See | ||
:ref:`sharding-balancing-disable-temporally` for more information. | ||
|
||
#. Shut down one of the config databases. | ||
|
||
#. Create a full copy of the data files (i.e. the path specified by | ||
the :setting:`dbpath` option for the config instance.) | ||
|
||
#. Restart the original configuration server. | ||
|
||
#. Re-enable the balancer to allow the cluster to resume normal | ||
balancing operations. See the | ||
:ref:`sharding-balancing-disable-temporally` section for more | ||
information on managing the balancer process. | ||
|
||
.. seealso:: :doc:`/core/backups`. | ||
|
||
.. [#read-only] While one of the three config servers is unavailable, | ||
the cluster cannot split any chunks nor can it migrate chunks | ||
between shards. Your application will be able to write data to the | ||
cluster. The :ref:`sharding-config-server` section of the | ||
documentation provides more information on this topic. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
====================================================== | ||
Deploy Three Config Servers for Production Deployments | ||
====================================================== | ||
|
||
.. default-domain:: mongodb | ||
|
||
This procedure converts a test deployment with only one | ||
:ref:`config server <sharding-config-server>` to a production deployment | ||
with three config servers. | ||
|
||
For redundancy, all production :doc:`sharded clusters | ||
</core/sharded-clusters>` should deploy three config servers on three | ||
different machines. Use a single config server only for testing | ||
deployments, never for production deployments. When you shift to | ||
production, upgrade immediately to three config servers. | ||
|
||
To convert a test deployment with one config server to a production | ||
deployment with three config servers: | ||
|
||
#. Shut down all existing MongoDB processes in the cluster. This | ||
includes: | ||
|
||
- all :program:`mongod` instances or :term:`replica sets <replica set>` | ||
that provide your shards. | ||
|
||
- all :program:`mongos` instances in your cluster. | ||
|
||
#. Copy the entire :setting:`dbpath` file system tree from the | ||
existing config server to the two machines that will provide the | ||
additional config servers. These commands, issued on the system | ||
with the existing :ref:`config-database`, ``mongo-config0.example.net`` may | ||
resemble the following: | ||
|
||
.. code-block:: sh | ||
|
||
rsync -az /data/configdb mongo-config1.example.net:/data/configdb | ||
rsync -az /data/configdb mongo-config2.example.net:/data/configdb | ||
|
||
#. Start all three config servers, using the same invocation that you | ||
used for the single config server. | ||
|
||
.. code-block:: sh | ||
|
||
mongod --configsvr | ||
|
||
#. Restart all shard :program:`mongod` and :program:`mongos` processes. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for remembering this, we definitely need to manage the redirect, however:
the
redirect-path
field is "take this path and redirect requests for it somewhere else." whileurl-base
is the "somewhere else". So this is basically backwards. No big deal, I have to look at the header each time and repeat the "redirect-path
is fromurl-base
is to" mantra in my head while writing these rules.outputs
is the editions/versions of the manual where the redirect must exist. In the following regexp-ish statement, it's everything between the parenshttp://docs.mongodb.org/(manual|master|v2.2|...)/.*
Think about the history of this page: the goal is to make sure that if we've publishedredirect-path
for a given output, that we list it here. In this case I think we wantmanual
andmaster
.Redirects that don't include manual and master are typically for pages that we've added to the current release, and these redirects support the version flipper experience.
Incidentally there are also fake outputs for
before-<version>
andafter-<version>
. which make it possible to specify groups of outputs more easily, and while we don't use many of them right now because we have a limited number of versions, we will have more in the future.