-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DOCS-2671: Deploy a replica set with authentication #1654
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
bgrabar
wants to merge
1
commit into
mongodb:master
from
bgrabar:tutorial-rs-with-authentication-2671
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
In a production, deploy each member of the replica set to its own machine | ||
and if possible bind to the standard MongoDB port of ``27017``. Use the | ||
:setting:`bind_ip` option to ensure that MongoDB listen for connections | ||
from applications on the configured address. | ||
|
||
Each member of a replica set must be accessible by way of resolvable DNS | ||
or hostnames. You should either configure your DNS names appropriately or | ||
set up your systems' ``/etc/hosts`` file to reflect this configuration. | ||
|
||
For a geographically distributed replica set, ensure that one system | ||
resides in each secondary site, while the remaining systems are in the | ||
primary site. | ||
|
||
Ensure that network traffic can pass between all members in the network | ||
securely and efficiently. Consider the following: | ||
|
||
- Establish a virtual private network. Ensure that your network topology | ||
routes all traffic between members within a single site over the local | ||
area network. | ||
|
||
- Configure authentication so that only servers and processes with | ||
authentication can connect to the replica set. | ||
|
||
- Configure networking and firewall rules so that incoming and outgoing | ||
packets are permitted only on the default MongoDB port and only from | ||
within your deployment. | ||
|
||
Specify the run time configuration on each system in a :doc:`configuration | ||
file </reference/configuration-options>` stored in ``/etc/mongodb.conf`` | ||
or a related location. Create the directory where MongoDB stores data | ||
files before deploying MongoDB. | ||
|
||
For more information about the run time options used above and other | ||
configuration options, see :doc:`/reference/configuration-options`. |
74 changes: 0 additions & 74 deletions
74
source/includes/fact-prod-rs-deployment-considerations.rst
This file was deleted.
Oops, something went wrong.
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
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,36 @@ | ||
# These two steps are borrowed by other tutorials but do *not* have a home tutorial. | ||
# | ||
title: Connect to MongoDB with the appropriate privileges. | ||
stepnum: 1 | ||
ref: connect | ||
pre: | | ||
Connect to the :program:`mongod` or :program:`mongos` either through the | ||
:ref:`localhost exception <localhost-exception>` or as a user with the | ||
privileges required in the :ref:`change-user-privileges-prereq` section. | ||
action: | ||
pre: | | ||
The following example operation connects to MongoDB as an authenticated | ||
user named ``manager``: | ||
language: javascript | ||
code: | | ||
mongo --port 27017 -u manager -p 12345678 --authenticationDatabase admin | ||
--- | ||
title: Verify your privileges. | ||
stepnum: 2 | ||
ref: verify-privileges | ||
pre: | | ||
Use the :dbcommand:`usersInfo` command with the ``showPrivileges`` option. | ||
action: | ||
pre: | | ||
The following example operation checks privileges for a user connected as ``manager``: | ||
language: javascript | ||
code: | | ||
db.runCommand( | ||
{ | ||
usersInfo:"manager", | ||
showPrivileges:true | ||
} | ||
) | ||
post: | | ||
The resulting ``users`` document displays the privileges granted to ``manager``. | ||
... |
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
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.
this ref doesn't exist leading to the build not existing.
I'll add a better error message to catch this kind of problem.
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.
This is fantastic. Thanks for catching this. How did you find it?
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.
I changed the code in steps.py to emit a more useful error message ;)