External Database
testgrinder service will be discontinued on January 31, 2025
testgrinder SMPC was discontinued as of February 1, 2024
When deploying tg-prod testgrinder, you will configure tg-app servers to shutdown preinstalled MongoDB database and configure them with a URL to an external MongoDB database. It may either be a database managed by mongodb.com (see steps below for setting it up) or your MongoDB database instance of a compatible version.
MongoDB database preinstalled on tg-app servers can be shutdown by setting DISABLE_LOCAL_MONGODB .env configuration file parameter to true. This will be covered in detail later when tg-app servers are launched.
If you choose to provide your own MongoDB database, make sure it can be accessed from the testgrinder VPC. Then specify the URI to the database in the .env configuration file by setting the value of the MONGODB_URI parameter.
To use a database hosted by mongodb.com, follow these steps:
Sign up for an account with mongodb.com
Sign up for a cluster:
Type: Dedicated
Cloud Provider: AWS
Choose the same region as for testgrinder
Cluster Tier: M10 with 10GB of storage
Version: choose the version appropriate for the testgrinder version you are deploying
Cluster Name: tg-prod
Setup Peering Connection
Once the database is up, choose it in mongodb.com console
Select Network Access, then Peering
Click Add Peering Connection and complete the process for peering with testgrinder VPC as instructed
To get the URI to your mongodb.com database, follow these steps:
Select the database in mongodb.com console
Click on Connect button
Choose Connect your application
In Driver choose Ruby, in version: 2.16 or later
You will be shown an URI like this:
To get the URI to the form usable by testgrinder, make sure the <user> and <password> are those you picked when setting up the database and add the database name tg_app_production after the last '/'.
For example if <user> is testgrinder and <password> is my-secret-password then URI will be:
Use this as the value for MONGODB_URI parameter in the .env configuration file (or set the value in the User Data). See Finalizing Configuration File .env.
Migrating Data from Another testgrinder deployment
If you wish to migrate the data from another testgrinder deployment, follow the steps in Backup and Restore Database
Last updated