You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/readme.md
+23-6
Original file line number
Diff line number
Diff line change
@@ -263,7 +263,29 @@ The following steps will walk you through how to create and test a MongoDB Serve
263
263
264
264
The following steps will walk you through how to start and test a load balancer.
265
265
266
-
1. Start a sharded cluster. You can use the [cluster_setup.sh](tools/cluster_setup.sh) script to do so: `./test/tools/cluster_setup.sh sharded_cluster`. The tool should create a cluster with two mongos, so you have a URI similar to `MONGODB_URI=mongodb://host1,host2/`.
266
+
1. Start a sharded cluster with two mongos, so you have a URI similar to `MONGODB_URI=mongodb://host1,host2/`. The server must be version 5.2.0 or higher.
267
+
Create the config server:
268
+
`mongod --configsvr --replSet test --dbpath config1 --bind_ip localhost --port 27217`
1. Create an environment variable named `MONGODB_URI` that stores the URI of the sharded cluster you just created. For example: `export MONGODB_URI="mongodb://host1,host2/"`
268
290
1. Install the HAProxy load balancer. For those on macOS, you can install HAProxy with `brew install haproxy`.
269
291
1. Start the load balancer by using the [run-load-balancer script](https://github.com./mongodb-labs/drivers-evergreen-tools/blob/master/.evergreen/run-load-balancer.sh) provided in drivers-evergreen-tools.
@@ -280,11 +302,6 @@ The following steps will walk you through how to start and test a load balancer.
280
302
cat lb-expansion.yml | sed 's/: /=/g' > lb.env
281
303
```
282
304
A new file name `lb.env` is automatically created.
283
-
1. Add an additional environment variable named `FAKE_MONGODB_SERVICE_ID` to the end of the `lb.env` file. Setting `FAKE_MONGODB_SERVICE_ID` to `true` enables logic in the driver to stick in a fake service ID on responses since that's what a real load balanced deployment is required to do.
284
-
```sh
285
-
FAKE_MONGODB_SERVICE_ID="true"
286
-
```
287
-
> **Note:** `FAKE_MONGODB_SERVICE_ID` will no longer be needed with the completion of [NODE-3431](https://jira.mongodb.org/browse/NODE-3431).
288
305
1. Source the environment variables using a command like `source lb.env`.
289
306
1. Export **each** of the environment variables that were created in `lb.env`. For example: `export SINGLE_MONGOS_LB_URI`.
0 commit comments