Overview
The goal for this process is to split complex reporting queries from the production database.
Prerequisite
- Your qTest Manager and qTest Sessions database are on the same Postgres database server.
- This article assumes you have the knowledge to create a postgres read-replica server.
Note: These instructions are verified on qtestctl 6.3 (9.6.1) and qtestctl 6.4 (9.7.1).
Stop Insights
- Linux (non-Docker)- Access the current directory "qtestctl" where you've installed your latest version of Insights.
systemctl stop qtest
- Windows
C:\[path_to_qtestctl]>net stop qtest
Modify qtestctl/insights/build.gradle
Note: Remember to fill your replicated DB information into the placeholders.
- Line 239, replace: ${qtestJdbcUrlWithoutCredential} with the endpoint of the RR RDS instance.
qtestctl/insights/build.gradle | Ex 237 #--------INFO QTEST DATABASE READ -----------
238 qtestread.poolName=Qtest Read DB Pool
239 qtestread.url=<YOUR READ REPLICA HOST> - Line 253, replace: ${sessionJdbcUrlWithoutCredential} with the endpoint of the RR RDS instance.
qtestctl/insights/build.gradle | Ex 251 #--------INFO SESSION DATABASE READ ---------
252 sessionread.poolName=Session Read DB Pool
253 sessionread.url=<YOUR READ REPLICA HOST> - Line 458, replace: ${config['insights.postgres.host']} with the endpoint of the RR RDS instance.
qtestctl/insights/build.gradle | Ex 455 CommandTimeOut="600"
456 PostgreSQLConnectionString="${logiConnectionStringqTest}"
457 ID="qTestMySQL"
458 PostgreSQLServer="<YOUR READ REPLICA HOST>" - Line 480, replace: ${config['sessions.postgres.host']} with the endpoint of the RR RDS instance.
qtestctl/insights/build.gradle | Ex 477 CommandTimeOut="600"
478 ID="sessionDB"
479 PostgreSQLConnectionString="${logiConnectionStringSession}"
480 PostgreSQLServer="<YOUR READ REPLICA HOST>"
Restart qTest Service and Verify
- Linux (non-Docker)
$ systemctl start qtest
- Windows
C:\[path_to_qtestctl]>net start qtest
Access Insights from the 9-box in qTest Manager and verify connectivity.