Skip to content

Commit d0bc90a

Browse files
author
Bob Grabar
committed
DOCS-970 remove localhost from deploy rs doc
1 parent 3696ebd commit d0bc90a

File tree

1 file changed

+21
-32
lines changed

1 file changed

+21
-32
lines changed

source/tutorial/deploy-replica-set.txt

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ Deploy a Replica Set
44

55
.. default-domain:: mongodb
66

7-
This tutorial describes how to create a three member
8-
:term:`replica set` from three existing instances of MongoDB.
9-
The tutorial provides one procedure for development and test systems and
10-
a separate procedure for production systems.
7+
This tutorial describes how to create a three-member
8+
:term:`replica set` from three existing :program:`mongod` instances.
9+
The tutorial provides two procedures: one for development and test systems; and
10+
a one for production systems.
1111

12-
To deploy a replica set from a single standalone MongoDB instance, see
12+
To instead deploy a replica set from a single standalone MongoDB instance, see
1313
:doc:`/tutorial/convert-standalone-to-replica-set`.
1414

15-
For background information on replica set deployments, see
16-
:doc:`/core/replication` and
17-
:doc:`/administration/replication-architectures`.
18-
1915
Overview
2016
--------
2117

@@ -29,31 +25,31 @@ Requirements
2925

3026
Most replica sets consist of two or more :program:`mongod`
3127
instances. [#odd-numbered-set-sizes]_ This tutorial
32-
describes a three member set. Production environments should have at
28+
describes a three member set. Production environments should have at
3329
least three distinct systems so that each system can run its own
3430
instance of :program:`mongod`. For development systems you can run all three instances
35-
of the :program:`mongod` process on a local system. (e.g. a laptop) or within a virtual
36-
instance. For production environments, you should endeavor to maintain as much separation
37-
between the members as possible. For example, when using virtual
31+
of the :program:`mongod` process on a local system or within a virtual
32+
instance. For production environments, you should maintain as much separation
33+
between members as possible. For example, when using virtual
3834
machines for production deployments, each member
39-
should live on separate host servers, served by redundant power circuits, and with
35+
should live on a separate host server, served by redundant power circuits and with
4036
redundant network paths.
4137

4238
.. [#odd-numbered-set-sizes] To ensure smooth :ref:`elections
4339
<replica-set-elections>` always design replica sets with odd numbers
4440
of members. Use :ref:`replica-set-arbiters` to ensure the set has
4541
odd number of voting members and avoid tied elections.
4642

47-
Procedure
48-
---------
43+
Procedures
44+
----------
4945

5046
These procedures assume you already have instances of MongoDB
5147
installed on the systems you will add as members of your
5248
:term:`replica set`. If you have not already installed MongoDB, see the
5349
:ref:`installation tutorials <tutorials-installation>`.
5450

55-
Deploy a Development or Testing Replica Set
56-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51+
Deploy a Development or Test Replica Set
52+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5753

5854
The examples in this procedure create a new replica set named ``rs0``.
5955

@@ -93,19 +89,12 @@ The examples in this procedure create a new replica set named ``rs0``.
9389
:option:`--replSet <mongod --replSet>`.
9490

9591
#. Open a :program:`mongo` shell and connect to the first
96-
:program:`mongod` instance. If you're running this command remotely,
97-
replace "localhost" with the appropriate hostname. In a new shell
92+
:program:`mongod` instance. In a new shell
9893
session, enter the following:
9994

10095
.. code-block:: sh
10196

102-
mongo localhost:27017
103-
104-
.. note::
105-
106-
In a replica set, *all* members of the set must use
107-
``localhost`` addresses or *no* members of the replica set can
108-
use the ``localhost`` addresses.
97+
mongo --port 27017
10998

11099
#. Use :method:`rs.initiate()` to initiate a replica set consisting of
111100
the current member and using the default configuration:
@@ -120,21 +109,21 @@ The examples in this procedure create a new replica set named ``rs0``.
120109

121110
rs.conf()
122111

123-
#. Add two members to the replica set by issuing a sequence of commands
124-
similar to the following.
112+
#. Add the second and third :program:`mongod` instances to the replica
113+
set using the :method:`rs.add()` method. For example, if your machine
114+
name is ``mongodb.example.net``, you would issue the following.
125115

126116
.. code-block:: javascript
127117

128-
rs.add("localhost:27018")
129-
rs.add("localhost:27019")
118+
rs.add("mongodb.example.net:27018")
119+
rs.add("mongodb.example.net:27019")
130120

131121
After these commands return you have a fully functional replica set.
132122
New replica sets elect a :term:`primary` within a seconds.
133123

134124
#. Check the status of your replica set at any time with the
135125
:method:`rs.status()` operation.
136126

137-
138127
.. seealso:: The documentation of the following shell functions for
139128
more information:
140129

0 commit comments

Comments
 (0)