Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2023.2

MongoDB does NOT need to be on the same machine where you are running a Parasoft product.

Configuring MongoDB with Data Repository Scripts

To set up your MongoDB installation for use with Parasoft products using the scripts included with the Data Repository Pack, do the following:

  1. Extract the Parasoft_SOAVirt_Data_Repository_Scripts_Pack.zip file found in the Data Repository Pack downloaded previously to a location of your choice and open it.
  2. Locate the script folder for your operating system (for example, Windows users would locate win-scripts).
  3. Copy that scripts folder into the root folder of your MongoDB installation and open it.
  4. Start the server by running server.bat (Windows) or server.sh (MacOS and Linux).
  5. Create a new user using the user.bat (Windows) or user.sh (MacOS and Linux). See Additional Information.
  6. (Optional) Register the server to CTP using the register.bat (Windows) or register.sh (MacOS and Linux).
  7. Verify that the server is running by opening <host>:<port> in a browser window, for example, localhost:2424. You should see the following message:

You can stop the repository server in Windows by pressing CTRL+C in the console or by running ./server.sh stop on MacOS/Linux.

Configuring MongoDB Manually

To set up your MongoDB installation for use with Parasoft products manually (without using the scripts included with the Data Repository Pack), configure the server.conf file in the MongoDB installation. For example:

Code Block
### See https://www.mongodb.com/docs/v3.6/reference/configuration-options/
### Path references are resolved relative to the environment's current directorynet:
   port: 2424
   bindIpAll: true
   ipv6: true
   #ssl:
      #mode: requireSSL
      #PEMKeyFile: selfsigned.pem
processManagement:
   fork: true
security:
   authorization: enabled
storage:
   dbPath: repositories
systemLog:
   quiet: true
   path: logs/repo.log
   destination: file 

You also need to set up the required authentication. See https://www.mongodb.com/docs/manual/tutorial/configure-scram-client-authentication/ for more information about authentication in MongoDB.

An example user is shown below. Note that the specific roles are required.

Code Block
db.createUser(
    {
        'user' : 'admin',
        'pwd' : passwordPrompt(), // or cleartext password
        'roles' : [
            {'role' : 'root', 'db' : 'admin'}
        ]
    }
)

Configuring Remote Data Repository Server to Use SSL

...

  1. Create a self-signed certificate and save that certificate to the root directory of the Data Repository Server folder.
  2. Update the server.conf file in the /scripts folder of your Data Repository Server folderdirectory. An example of the server.conf file with SSL options enabled is shown below. Consult the MongoDB configuration documentation for full configuration details (link provided in the server.conf file). Note that if you need to modify the example file or choose to manually modify your server.conf file, be conscious of the importance of proper spacing; you must use spaces, not tabs.
  3. Start the server by running server.bat (Windows) or server.sh (MacOS).

...