Overview
This guide explains how to:
- Add a MongoDB administrator user,
- enable MongoDB authentication as a Windows service, and
- update Modern Requirements4DevOps, Impact Assessment, and Document Management configuration files accordingly. [MR4DevOps...Enablement | PDF]
1) Adding Administrator (MongoDB User)
Note: This guide assumes MongoDB 3.4 is installed. If you are using a newer version (e.g., 5.0), replace
3.4with your installed version in all paths/commands. [MR4DevOps...Enablement | PDF]
Step 1 — Start MongoDB (if it’s not running)
- Open Run (Win + R)
- Run the following as Administrator (Ctrl + Shift + Enter):
Keep this window open. [MR4DevOps...Enablement | PDF]
Step 2 — Connect to MongoDB Shell
Open Run (Win + R) and run as Administrator:
Step 3 — Switch to admin DB
In the MongoDB shell, run:
Step 4 — Create admin user
Copy/paste the following, replacing <TYPE YOUR PASSWORD HERE> with your password:
[MR4DevOps...Enablement | PDF]
Step 5 — Exit the shell
If applicable, you can close the MongoDB Server window you opened earlier. [MR4DevOps...Enablement | PDF]
2) Creating/Updating MongoDB Windows Service (Enable Auth)
Step 1 — Stop and remove existing MongoDB service (if present)
Open Run (Win + R), run:
Then execute:
[MR4DevOps...Enablement | PDF]
Step 2 — Install MongoDB service with authentication enabled
Open Run (Win + R) and run as Administrator:
[MR4DevOps...Enablement | PDF]
Step 3 — Start MongoDB service
Open Run (Win + R) and run:
[MR4DevOps...Enablement | PDF]
3) Updating Modern Requirements4DevOps Configuration
Step 1 — Open MR4DevOps Service folder
Open Run (Win + R) and go to:
Replace
<MODERN REQUIREMENTS4DEVOPS BUILD>with your actual build folder name. [MR4DevOps...Enablement | PDF]
Step 2 — Edit Web.config as Administrator
- Open Web.config using a text editor as Administrator
- Find the AppSetting key:
MongoDB.ConnectionString - Replace it with:
Use the same password you set in the “Adding Administrator” section. [MR4DevOps...Enablement | PDF]
4) Updating Impact Assessment Configuration
Step 1 — Open Impact Assessment folder
Open Run (Win + R) and go to:
Step 2 — Edit Appsettings.json as Administrator
- Open Appsettings.json as Administrator
- Find the key:
ConnectionString - Update it to:
Example:
[MR4DevOps...Enablement | PDF]
5) Updating Document Management Configuration
Step 1 — Open Document Management folder
Open Run (Win + R) and go to:
Step 2 — Edit Appsettings.json as Administrator
Find the "Database" section and update these fields:
Example:
Comments
0 comments
Please sign in to leave a comment.