MongoDB Installation
MongoDB is used to store the Track State Data.
NOTE: The steps below are using MongoDB community version, however the decision on which MongoDB version or MongoDB compatible database to use is up to your organization. MongoDB compatible databases must support MongoDB APIs. TSS has been confirmed for MongoDB and Amazon DocumentDB.
- Download MongoDB (MongoDb Versions)
- Ensure the download is unblocked.
- Install MongoDB
- During installation leave all defaults
- Make sure that MongoDB Compass is also selected
- The setup wizard can take 10 minutes or more to complete
- ‘Finish” the setup wizard and the MongoDB Compass will automatically open. Leave the MongoDB Compass open as it will be used in later steps below
MongoDB Shell Installation
The MongoDB Shell will be used to create the root user.
- Download Mongo DBShell
- Ensure the download is unblocked.
- Extract the files in a new folder (Eg C:\Program Files\Mongo DB Shell)
MongoDB Root User
- Run MongoDB Shell as an Administrator:
- Within the MongoDB folder, navigate to the bin folder.
- From 'bin' folder, right-click on 'mongosh.exe' and select 'run as Administrator'
- Enter 'mongodb://localhost' as the database name (if prompted)
- Type 'use admin' to switch to the admin database
- The prompt should show as
admin>
- The prompt should show as
- Create a root user using the following command:
REPLACE user (root) with the user name of your choice, and pwd (mongoAdmin) with a secure password.db.createUser({ user: "root", pwd: "mongoAdmin", roles: [{ role: "root", // Assign the root role db: "admin" // Assign to the admin database }] })
- Exit the shell by typing 'exit'.
MongoDB Connection
- Open MongoDB Compass
- Click on '+ Add new connection'
- For the connection name, enter
mongodb://root:mongo@localhost:27017/?tls=false- Replace user (root) and password (mongo) with the user name and password you created above
- Select 'Save & Connect'
- The database can now be connected to as
localhost:27017