Setup Shared Server
Access the shared server (whose private IP address is 10.0.10.230) and install the following applications and/or packages.
qTest requires PostgreSQL database engine 9.5 or 9.6 (preferred) to be installed. Skip this step if you have already installed PostgreSQL.
Go to this page to download PostgreSQL. After downloading, run the installer to install PostgreSQL on the Shared Server.
Make sure you enable remote access to PostgreSQL database server.
- Open file C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf. Note: replace <version> place holder with the actual version that you have installed.
- Look for the following line and if it does not exist, append the line to the file.
host all all 0.0.0.0/0 md5
host all all ::1/0 md5
- Your C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf now looks like below:
- Open the file C:\Program Files\PostgreSQL\<version>\data\postgresql.conf.
- Look for the following line, and if it does not exist, append it to the file:
listen_addresses = '*'
- Save and close the file when you have finished.
Restart PostgreSQL Service
Restart PostgreSQL service for the changes to take effect.
Important: By default, PostgreSQL runs on port 5432. You will configure the firewall for this later.
- Open the Start menu, and locate your Windows System.
- Select Run and type services.msc to open the Services window.
- Assume you have installed PostgreSQL 9.5, therefore, on the Services window look for the service named postgresql-x64-9.5.
- Right-click on the postgresql-x64-9.5 service and select Restart in the popup menu.
Install and Configure NFS
Network File System (NFS) is a Windows component that is used to share files across machines. Follow the instructions below to install and setup NFS.
- Open Server Manager, and navigate to the Dashboard.
- Select Add Roles and Features.
- Select Next on the 'Before you begin' window.
- On the Select installation type screen, make sure the option 'Role-based or feature-based installation' is selected, then select Next.
- On the Select destination server screen, make sure the option 'Select server from the server pool' is selected, and select Next.
- From the Select server roles screen, locate and expand 'File and Storage Services (2 of 12 installed)' item then expand 'File and iSCSI Services (1 of 11 installed).'
- Select the checkbox for 'Server for NFS.'
- Select 'Add Features' in the popup.
- The 'Server for NFS' is now selected. Click Next.
- On the 'Select features' screen, select Next.
- On the 'Confirm installation selections' screen, select Install.
- On the 'Installation progress' screen, wait for the installation to complete then Close.
Create and Configure the Shared Folder
Next, you are going to create a folder to store data created by multiple qTest Sessions instances and use NFS to share the folder between instances.
- Open Fire Explorer and create a folder named "sessions-storage" in C:\ drive.
- Right-click on the sessions-storage folder and select Properties.
- On the 'sessions-storage Properties' windows, select the 'NFS Sharing' tab.
- Select the 'Manage NFS Sharing...' button.
- In the NFS Advanced Sharing widget, check the 'Share this folder' checkbox, then select Permissions.
- From the NFS Share Permissions screen, do the following:
- Select 'Read-Write' option in the 'Type of access:' field
- Select the checkbox 'Allow root access.'
- Select OK, then Close, to complete sharing the folder sessions-storage.
Configure Shared Server's Firewall
You need to configure the Firewall on the Shared Server to enable qTest Sessions to access the components you just installed. You need to open the ports of the following components:
- PostgreSQL: the running port is 5432
- NFS: the running port is 2049
- From the Control Panel, open Windows Firewall.
- Select Advanced settings.
- On the Windows Firewall with Advanced Security window, select Inbound Rules from the left panel.
- Select New Rule... in the Inbound Rules from the right panel.
- On the New Inbound Rule Wizard screen, select the option 'Port' and click Next.
- On the Protocol and Ports screen, do the following:
- Select TCP option
- Select Specific local ports option, and enter the port values of PostgreSQL and NFS, separate each value by a comma.
Example: 5432, 2049.
- Click Next when you are done.
- On the Action screen, make sure the option Allow the connection is selected, then click Next.
- In the Profile screen, make sure all the options for Domain, Private and Public are checked, then click Next.
- In Name screen, enter a name for your new rule, e.g. 'Shared Ports for qTest Sessions', then click Finish.
- You have finished setting up the Shared Server.
Important: You need to restart the server for the changes and configurations to take effect, then move on to Installing qTest Sessions on a separate server.
Configure the shared directory
- Right click on the directory which you want to share to other machines, select Properties
- Choose tab NFS Sharing then click Manage NFS Sharing... button
- On the NFS Advanced Sharing dialog, select the options as the image below:
- Click Permissions button
- On the NFS Share Permissions, grant Read-Write access and Allow root access to ALL MACHINES like this:
- Click OK and then Apply these settings on the shared directory
Map the shared directory on the NFS client machines
- On each NFS client machines, create a batch file (.bat) with the following content:
mount -o fileaccess=777 [nfs-server-host]:\[shared-dir-name] [drive-letter]: > [log-file-path] 2>&1
- [nfs-server-host]: host name or IP address of the NFS server
- [shared-dir-name]: name of the shared directory on the NFS server
- [drive-letter]: the drive letter to map with the NFS shared resources. It must be usable on the local machine
- [log-file-path]: full path to the file to which the system will write log of the scheduled mapping at every startup
- (This step is required!!!) Open Task Scheduler to schedule the above batch file to be executed as NT AUTHORITY\System at system start up
- Restart the server and check if the drive has been mapped successfully. If not, check the log file for troubleshooting
IMPORTANT: when mapped using this method, the drive will be displayed as “Disconnected Network Drive”, it’s just a side effect and can be ignored as long as you can browse and create content on the drive using File Explorer