Menu

Set Up a Shared Directory Using NFS - Windows

Overview

The Shared Directory is used anytime you are deploying qTest applications on more than one server where you have files that may need to be shared among services. These files can be supported by a distributed file system like NFS or SMB. The instructions below include setting up your NFS server.

Read these instructions on how to set up the NFS Client, which you will need to install on your application node server(s) prior to installing the qtest application(s.)

Setup Shared Server

Access the shared server (whose private IP address is 10.0.10.230) and install the following applications and/or packages.

Install PostgreSQL

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.

Configure PostgreSQL

Make sure you enable remote access to PostgreSQL database server. 

  1. Open file C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf. Note: replace <version> place holder with the actual version that you have installed.
  2. 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
  3. Your C:\Program Files\PostgreSQL\<version>\data\pg_hba.conf now looks like below:
    pg-hba-conf.png
  4. Open the file C:\Program Files\PostgreSQL\<version>\data\postgresql.conf.
  5. Look for the following line, and if it does not exist, append it to the file:
    listen_addresses = '*'
  6. 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.

  1. Open the Start menu, and locate your Windows System.
  2. Select Run and type services.msc to open the Services window.
  3. Assume you have installed PostgreSQL 9.5, therefore, on the Services window look for the service named postgresql-x64-9.5.
  4. Right-click on the postgresql-x64-9.5 service and select Restart in the popup menu.

pg-restart.png

 

Install and Configure NFS Server

Network File System (NFS) is a Windows component that is used to share files across machines. This is used for every deployment model where you have more than one server. Follow the instructions below to install and setup your NFS Server.

Install NFS

  1. Open Server Manager, and navigate to the Dashboard.
  2.  Select Add Roles and Features.
    NFS-01.png
  3. Select Next on the 'Before you begin' window.
    NFS-02.png
  4. On the Select installation type screen, make sure the option 'Role-based or feature-based installation' is selected, then select Next.
    NFS-03.png
  5. On the Select destination server screen, make sure the option 'Select server from the server pool' is selected, and select Next.
    NFS-04.png
  6. 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).'
  7. Select the checkbox for 'Server for NFS.'
    NFS-05.01.png
  8. Select 'Add Features' in the popup.
    NFS-05.02.png
  9. The 'Server for NFS' is now selected. Click Next.
    NFS-05.03.png
  10. On the 'Select features' screen, select Next.
    NFS-06.png
  11. On the 'Confirm installation selections' screen, select Install.
    NFS-07.png
  12. On the 'Installation progress' screen, wait for the installation to complete then Close.
    NFS-09.png

Create and Configure the Shared Folder

Next, you are going to create a folder(s) to store data created by multiple qTest application instances and use NFS to share the folder between them. You will need to create folders for both Manager and Sessions and complete the steps below for each applications storage folder.

  1. Open Fire Explorer and create/name a folder in C:\ drive.
    Examples: "sessions-storage" and "manager-storage"
  2. Right-click on the new folder and select Properties.
  3. On the 'Properties' window, select the 'NFS Sharing' tab.
  4. Select the 'Manage NFS Sharing...' button.
    NFS-Sharing-Server-01.png
  5. In the NFS Advanced Sharing widget, check the 'Share this folder' checkbox, then select Permissions.
    NFS-Sharing-Server-02.png
  6. 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.'
      NFS-Sharing-Server-03.png
  7. Select OK, then Close, to complete sharing the newly created folder .

Configure Shared Server's Firewall

You need to configure the Firewall on the Shared Server to enable qTest application nodes 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
  1. From the Control Panel, open Windows Firewall.
  2. Select Advanced settings.
    configure-firewall-01.png
  3. On the Windows Firewall with Advanced Security window, select Inbound Rules from the left panel.
  4. Select New Rule... in the Inbound Rules from the right panel.
    configure-firewall-02.png
  5. On the New Inbound Rule Wizard screen, select the option 'Port' and click Next.
    configure-firewall-03.png
  6. 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.
      configure-firewall-04.png
  7. On the Action screen, make sure the option Allow the connection is selected, then click Next.
    configure-firewall-05.png
  8. In the Profile screen, make sure all the options for Domain, Private and Public are checked, then click Next.
    configure-firewall-06.png
  9. In Name screen, enter a name for your new rule, e.g. 'Shared Ports for qTest Sessions', then click Finish.
    configure-firewall-07.png
  10. 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 application nodes on a separate server.

 

 

Subscribe To Our Blog
Powered by Zendesk