Finalize Configuration File .env
testgrinder service will be discontinued on January 31, 2025
testgrinder SMPC was discontinued as of February 1, 2024
If you launched tg-app without User Data and thus tg-app generated a fresh .env configuration file, you will need to edit the file and provide some of the values before testgrinder can be fully operational.
Once the .env file is finalized, it is recommended to convert it (along with SSL certificate files) into User Data format, and use that to launch subsequent tg-app instances, e.g. to upgrade tg-app to a new version.
If your testgrinder deployment has more than one tg-app server, make sure that all of them have the identical configuration files. The best way to achieve that is to provide configuration files via User Data mechanism as described in Configuration Fileson tg-app launch.
Accessing the .env configuration file
Use the following commands to access the .env file.
Substitute my-tg-app with public DNS name of the tg-app server
The last command (cat .env
) will list the contents of the .env file.
The following table lists each entry in .env file and what you need to do to finalize them:
Some of the settings will appear commented out in .env configuration file. To make them active, remove the leading # (hash).
Setting | Change required? | Description |
---|---|---|
STAGE_NAME | No initial value: eval | Name of this testgrinder deployment. It will appear in tg-bot names, and bugsnag reports |
AWS_REGION | No initial value: AWS region in which tg-app was launched | AWS region in which tg-app operates |
FORCE_SSL | No | Set to true once you configure the SSL certificate to force all HTTP request to automatically redirect to HTTPS |
HOSTNAME | No defaults to AWS provided | tg-app will change its hostname to this value if provided. You may use %i as part of it. If used, %i will be replaced with the tg-app AWS EC2 instance id. Example: tg-eval-app-%i |
DOMAIN_WEB | Recommended to change defaults to AWS provided | Change to the domain name to which testgrinder will respond to. Make sure SSL certificate is issued for this domain. |
DEVISE_SECRET_KEY | No | Auto-generated key to be used for account management emails |
DEVISE_PEPPER | No | Auto-generated value to be used in user password hashing |
SECRET_KEY_BASE | No | Auto-generated value to be used for cookie encryption |
DBDATA_SECRET_KEY | No | Auto-generated key for encrypting sensitive data in the database |
MONGODB_URI | Yes/No defaults to the local MongoDB | For production use, substitute with the URL to a standalone MongoDB. It is acceptable to use the local database for evaluation |
DISABLE_LOCAL_MONGODB | No | If you use a standalone MongoDB database, it is advisable to set this value to true to disable the locally installed instance |
SMTP_HOST | Yes | Hostname of the SMTP server. Must be provided in order for testgrinder to send emails |
SMTP_PORT | Yes | Port of the SMTP server |
SMTP_USERNAME | Yes | Username to use when connecting to SMTP server |
SMTP_PASSWORD | Yes | Password to use when connecting to SMTP server |
MONIT_NOTIFY_EMAIL | No | If provided, Monit will send alerts to this email. It will use the SMTP server configured above. |
MONIT_NOTIFY_FROM_EMAIL | No | Monit will use this email in the From: field in emails it sends |
TIMEZONE | No defaults to America/New_York | Timezone to se the server to. Use this command to see the available ones: |
PAPERTRAIL | No | If you choose to use log integration service papertrail.com, provide its host:port here as instructed by papertrail |
BUGSNAG_API_KEY | No | If you choose to receive bug alerts in bugsnag.com, enter its API KEY as instructed by bugsnag |
After making changes to .env file, restart tg-app instance for the changes to take effect
Testing Papertrail Integration
If you choose to integrate with Papertrail, you may use the logger command to send a test log message:
Once you run the logger command, you should see the message appear in Papertrail within a few seconds.
Testing Bugsnag Integration
If you choose to integrate with Bugsnag, tg-app comes with a script that lets you send a test bug report to Bugsnag. Use these steps to send a test bug report:
Once you run the script, you should see the test bug report appear in Bugsnag within a few seconds.
Last updated