Skip to content

Commit 0b34793

Browse files
author
Sam Kleinman
committed
merge: replsetinitiate
2 parents 7208842 + 9f22a95 commit 0b34793

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

source/tutorial/deploy-replica-set.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,28 @@ The examples in this procedure create a new replica set named ``rs0``.
9797

9898
mongo --port 27017
9999

100+
#. Create a replica set configuration object in the :program:`mongo`
101+
shell environment to use to initiate the replica set with the
102+
following sequence of operations:
103+
104+
.. code-block:: javascript
105+
106+
rsconf = {
107+
_id: "rs0",
108+
members: [
109+
{
110+
_id: 0,
111+
host: "<hostname>:27017"
112+
}
113+
]
114+
}
115+
100116
#. Use :method:`rs.initiate()` to initiate a replica set consisting of
101117
the current member and using the default configuration:
102118

103119
.. code-block:: javascript
104120

105-
rs.initiate()
121+
rs.initiate( rsconf )
106122

107123
#. Display the current :doc:`replica configuration </reference/replica-configuration>`:
108124

0 commit comments

Comments
 (0)