21. [Linux] Install Sessions 2.0.8

Important_icon.pngImportant:

  • qTest application must be installed and running before installing qTest Sessions.
  • Your qTest licenses have been imported. If not, click here for instructions..
  • All steps need to be executed under Root account.

» Install qTest Sessions

» Miscellaneous & Troubleshooting

 

Install qTest Sessions

A. Installation Guide:

You can download qTest Sessions' installation package here.

B. Installation Guide:

Access command shell on linux server with Root account.

Create a directory to which qTest Sessions will be installed. Eg: /usr/local/qTest_Sessions

Copy sessions-linux-x.x.x.tar.gz to any directory where qTest Sessions will be installed (eg: /usr/local).

Extract the bundle and change current directory to sessions-linux-x.x.x:

# cd /usr/local
# tar -zxf sessions-linux-x.x.x.tar.gz
# cd sessions-linux-x.x.x/

Run the following command, specify the directory which you have created above.

# ./installer -t install -d /usr/local/qTest_Sessions
Your Sessions server has setup completely. Please go to /usr/local/qTest_Sessions and run configure.sh file to configure your Sessions server.

Open file conf/configurer.properties. Review and edit the following information:

  1. Specify information to connect to PostgreSQL server; including host, port number, credentials and the schema name. The database schema must be created in advance. Please do not change property db.action=0.
    # database configuration
    db.host=[PostgreSQL_IP_Address] //eg: 192.168.74.77
    db.port=[PostgreSQL_Port] //it is 5432 by default
    db.user=[PostgreSQL_super_user]
    db.password=[PostgreSQL_super_user_password]
    db.schema=[database_schema] //make sure that the schema is created 
    //before the installation. Refer to the instructions for CentOS or Ubuntu.
    db.action=0 //Please do not modify this property
    
  2. Specify information to connect to Redis server; including host and port number.
    # redis configuration
    redis.host=[Redis_IP_Address] //eg: 192.168.55.63
    redis.port=[Redis_Port] //it is 6379 by default
    
  3. Specify the URL and the token to connect to your qTest instance.

    button-round-warning-icon.pngNOTE: Click here for instructions to get your qTest Master Token.

    # qtest configuration
    qtest.url=[qTest_URL]
    qtest.master_token=[token]
    
  4. Specify the information of your Elasticsearch server. qTest support one cluster and multiple nodes.
    # elastic search configuration
    es.http.host=[ElasticSearch_IP_Address] //eg: 192.168.74.67
    es.http.port=[ElasticSearch_HTTP_Port] //it is 9200 by default
    es.cluster.name=[Cluster_Name] //refer to HINT for how to collect cluster name
    
    es.nodes=1
    es.tcp.1.host=[Node_IP_Address] //eg: 192.168.74.67
    es.tcp.1.port=[Node_Port] //it is 9300 by default
    
    			

    button-round-warning-icon.pngHINT:

    • Click here for instructions to get Elasticsearch's clustername.
    • If you have more than one nodes, assign an ordinal to each node using property es.nodes. For example:
      # elastic search configuration
      es.http.host=[ElasticSearch_IP_Address] //eg: 192.168.74.67
      es.http.port=[ElasticSearch_HTTP_Port] // it is 9200 by default
      es.cluster.name=[Cluster_Name]
      
      es.nodes=1
      es.tcp.1.host=[Node1_IP_Address] //eg: 192.168.74.67
      es.tcp.1.port=[Node1_Port] //it is 9300 by default
      
      es.nodes=2
      es.tcp.2.host=[Node2_IP_Address] //eg: 192.168.74.68
      es.tcp.2.port=[Node2_Port] //it is 9300 by default
      					
  5. Specify which ports qTest Sessions will use. Set web.ssl.required=true if it will be using SSL connections (HTTPS).
    # application information.
    web.http.port=[HTTP_Port]
    web.https.port=[HTTPS_Port]
    web.shutdown.port=[Shutdown_Port]
    web.ajp.port=[AJP_Port]
    web.ssl.required=false //put "true" if you want to enable SSL connection
    

    Important_icon.pngImportant:

    • Please make sure the ports you've specified above are not blocked by your firewall.
    • When specifying the port numbers, make sure the selected ports are all available. Click here for instructions to check which ports are in use.
  6. Declare qTest Sessions's URL.
    # declare eXplorer API url to use.
    web.url= //The protocol (HTTP or HTTPS) is required in the URL
    
    Eg:
    # declare eXplorer API url to use.
    web.url= http://sample.org:8080
    
    It will be filled in qTest's API URL. If it is left blank, the installer will use the default: http://[IP]:[port]/, in which IP is the host where qTest Sessions is installed, port is the HTTP port number.
  7. Specify the storage configuration:
    • Specify where session data will be stored in:
      # storage configuration
      # storage.type suitable value (disk | s3 | riakcs)
      storage.type=disk
      						
    • If disk is chosen, specify the storage path:
      # disk storage configuration
      storage.rootPath=[Storage_Path_On_Local_Machine] //make sure that the directory is created before the installation
      

      button-round-warning-icon.pngHINT: You can use mkdir command to create a directory:

      # mkdir [Storage_Path_On_Local_Machine]
      
    • Otherwise, specify the following information:
      # s3 | riak storage configuration
      storage.url=
      storage.bucketName=
      storage.accessKey=
      storage.secretKey=
      storage.diable-dns-buckets=[true|false]
      						
  8. Please do not modify the following section:
    # account configuration.
    account.username=admin
    account.password=51ca5dff068c393899233251450d95e2
    				

Save the above file after you have done modifying. Execute configurer.sh. The installation process starts. The progress is logged in explorer-installer-cli.log.

# ./configurer.sh
		

You will see the installation process on your console. If you enabled SSL connections (HTTPS) in step #5, you will be prompted to provide your certificates:

[ * ] Generate installation tasks.                      [ PASSED ]
Private key path: //path to your key file (eg: /usr/local/cert/server.key)
Private key password:
Certificate path: //path to your certificate file (eg: /usr/local/cert/server.crt)
Chain certificate path (optional):
Generates SSL keystore successfully!
    [ * ] Public session URL to qTest ...                   [ PASSED ]
/usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db /usr/local/build-release-15-1/sessions-linux-1.0.0
Unable to locate tools.jar. Expected to find it in /usr/local/build-release-15-1/sessions-linux-1.0.0/tools/java/lib/tools.jar
Buildfile: /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/liquibase.xml

dbPrepare:

dbInit:
[lb:updateDatabase] Starting Liquibase.
[lb:updateDatabase] Successfully acquired change log lock
[lb:updateDatabase] Dropping Database Objects in schema: explorer-api-67.public
[lb:updateDatabase] Creating database history table with name: public.databasechangelog
[lb:updateDatabase] Successfully released change log lock
[lb:updateDatabase] Successfully acquired change log lock
[lb:updateDatabase] Creating database history table with name: public.databasechangelog
[lb:updateDatabase] Reading from public.databasechangelog
[lb:updateDatabase] /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/changelog-master.xml: changelogs/changelog-init-db.xml::release-0.9.0::trongle: SQL in file sql/init-schemas.sql executed
[lb:updateDatabase] /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/changelog-master.xml: changelogs/changelog-init-db.xml::release-0.9.0::trongle: SQL in file sql/init-data.sql executed
[lb:updateDatabase] /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/changelog-master.xml: changelogs/changelog-init-db.xml::release-0.9.0::trongle: ChangeSet changelogs/changelog-init-db.xml::release-0.9.0::trongle ran successfully in 1005ms
[lb:updateDatabase] Successfully released change log lock

BUILD SUCCESSFUL
Total time: 6 seconds
/usr/local/build-release-15-1/sessions-linux-1.0.0
==========================================================================
   >>> BEGIN CHECKING REDIS SERVER.
==========================================================================
    [ * ] Server host: 192.168.74.67
    [ * ] Server port: 6379

    [ * ] Redis health check ...                            [ PASSED ]
    [ * ] Redis read-write check ...                        [ PASSED ]
    [ * ] Configure DB cluster ...                          [ PASSED ]
    [ * ] Configure ES cluster ...                          [ PASSED ]
    [ * ] Configure redis cluster ...                       [ PASSED ]
    [ * ] Configure file storage ...                        [ PASSED ]
    [ * ] Configure qTest account ...                       [ PASSED ]
    [ * ] Configure admin account ...                       [ PASSED ]
==========================================================================
   >>> END CHECKING REDIS SERVER.                           [ PASSED ]
==========================================================================
==========================================================================
   >>> BEGIN INITIATE ELASTICSEARCH SERVER.
==========================================================================
    [ * ] Server host: 192.168.74.67
    [ * ] Server port: 9200
    [ * ] Server protocol: HTTP

    [ * ] ElasticServer heath check ...                     [ PASSED ]
    [ * ] Create ElasticSearch Index ...                    [ PASSED ]
    [ * ] Create session mapping ...                        [ PASSED ]
    [ * ] Create application info mapping ...               [ PASSED ]
    [ * ] Create system info mapping ...                    [ PASSED ]
    [ * ] Create coverages mapping ...                      [ PASSED ]
    [ * ] Create time line mapping ...                      [ PASSED ]
    [ * ] Create screen mapping ...                         [ PASSED ]
    [ * ] Create note mapping ...                           [ PASSED ]
==========================================================================
   >>> END INITIATE ELASTICSEARCH SERVER.                   [ PASSED ]
==========================================================================
Configures eXplorer API successfully.
...
		

To start qTest Sessions when the OS starts:

#cd /etc/init.d
#ln -sn /[path_to_your_qtest_sessions_x.x.x]/bin/explorerd 
#chkconfig --add explorerd 
#service explorerd start
		

C. Configure qTest to connect to Session Manager Server

After the installation is completed, you will need to configure qTest to connect to Session Manager Server

  1. Login to your qTest using a site admin account. Access to site administration section.
  2. Click on tab System Configuration.
  3. In Session Manager Plugin section, input the URL of your Session Manager server, such as http://[IP_Address]:[HTTP_Port].
  4. Click on Save button.
  5. Access to your project space. You will see tab Sessions on the main menu.

Miscellaneous & Troubleshooting

A. Start qTest Sessions as a service

To start qTest Sessions when the OS starts:

#cd /etc/init.d
#ln -sn /[path_to_your_qtest_sessions_x.x.x]/bin/explorerd 
#chkconfig --add explorerd 
#service explorerd start

B. Get qTest Master Token

Access to your qTest application with a site admin account. You can find the Master Token in Resources page.

C. Get ElasticSearch's cluster name

Open a web browser, type in your ElasticSearch's hostname and HTTP port. You can find the cluster name after the page is loaded.

D. Change qTest Sessions server's configurations

  1. Stop qTest Sessions:
    #service explorerd stop
    
  2. Access to the directory where you have installed qTest Sessions. Eg: /usr/local/qTest_Sessions
  3. Open file conf/configurer.properties.
    • Change the configurations as instructed in installation guide..
    • In this file, set db.action=1.
      # database configuration
      db.host=[PostgreSQL_IP_Address] //eg: 192.168.74.77
      db.port=[PostgreSQL_Port] //it is 5432 by default
      db.user=[PostgreSQL_super_user]
      db.password=[PostgreSQL_super_user_password]
      db.schema=[database_schema]
      db.action=1 //set this property to 1
      
  4. Save the file after you complete modifying it.
  5. Execute configurer.sh. The process starts. The progress is logged in explorer-installer-cli.log.
    # ./configurer.sh
  6. You will see the process on your console. If you enabled SSL connections (HTTPS), you will be prompted to provide your certificates:
    [ * ] Generate installation tasks.                      [ PASSED ]
    Private key path: //path to your key file (eg: /usr/local/cert/server.key)
    Private key password:
    Certificate path: //path to your certificate file (eg: /usr/local/cert/server.crt)
    Chain certificate path (optional):
    Generates SSL keystore successfully!
        [ * ] Public session URL to qTest ...                   [ PASSED ]
    /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db /usr/local/build-release-15-1/sessions-linux-1.0.0
    Unable to locate tools.jar. Expected to find it in /usr/local/build-release-15-1/sessions-linux-1.0.0/tools/java/lib/tools.jar
    Buildfile: /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/liquibase.xml
    
    dbPrepare:
    
    dbInit:
    [lb:updateDatabase] Starting Liquibase.
    [lb:updateDatabase] Successfully acquired change log lock
    [lb:updateDatabase] Dropping Database Objects in schema: explorer-api-67.public
    [lb:updateDatabase] Creating database history table with name: public.databasechangelog
    [lb:updateDatabase] Successfully released change log lock
    [lb:updateDatabase] Successfully acquired change log lock
    [lb:updateDatabase] Creating database history table with name: public.databasechangelog
    [lb:updateDatabase] Reading from public.databasechangelog
    [lb:updateDatabase] /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/changelog-master.xml: changelogs/changelog-init-db.xml::release-0.9.0::trongle: SQL in file sql/init-schemas.sql executed
    [lb:updateDatabase] /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/changelog-master.xml: changelogs/changelog-init-db.xml::release-0.9.0::trongle: SQL in file sql/init-data.sql executed
    [lb:updateDatabase] /usr/local/build-release-15-1/sessions-linux-1.0.0/explorer-api/webapps/ROOT/WEB-INF/db/changelog-master.xml: changelogs/changelog-init-db.xml::release-0.9.0::trongle: ChangeSet changelogs/changelog-init-db.xml::release-0.9.0::trongle ran successfully in 1005ms
    [lb:updateDatabase] Successfully released change log lock
    
    BUILD SUCCESSFUL
    Total time: 6 seconds
    /usr/local/build-release-15-1/sessions-linux-1.0.0
    ==========================================================================
       >>> BEGIN CHECKING REDIS SERVER.
    ==========================================================================
        [ * ] Server host: 192.168.74.67
        [ * ] Server port: 6379
    
        [ * ] Redis health check ...                            [ PASSED ]
        [ * ] Redis read-write check ...                        [ PASSED ]
        [ * ] Configure DB cluster ...                          [ PASSED ]
        [ * ] Configure ES cluster ...                          [ PASSED ]
        [ * ] Configure redis cluster ...                       [ PASSED ]
        [ * ] Configure file storage ...                        [ PASSED ]
        [ * ] Configure qTest account ...                       [ PASSED ]
        [ * ] Configure admin account ...                       [ PASSED ]
    ==========================================================================
       >>> END CHECKING REDIS SERVER.                           [ PASSED ]
    ==========================================================================
    ==========================================================================
       >>> BEGIN INITIATE ELASTICSEARCH SERVER.
    ==========================================================================
        [ * ] Server host: 192.168.74.67
        [ * ] Server port: 9200
        [ * ] Server protocol: HTTP
    
        [ * ] ElasticServer heath check ...                     [ PASSED ]
        [ * ] Create ElasticSearch Index ...                    [ PASSED ]
        [ * ] Create session mapping ...                        [ PASSED ]
        [ * ] Create application info mapping ...               [ PASSED ]
        [ * ] Create system info mapping ...                    [ PASSED ]
        [ * ] Create coverages mapping ...                      [ PASSED ]
        [ * ] Create time line mapping ...                      [ PASSED ]
        [ * ] Create screen mapping ...                         [ PASSED ]
        [ * ] Create note mapping ...                           [ PASSED ]
    ==========================================================================
       >>> END INITIATE ELASTICSEARCH SERVER.                   [ PASSED ]
    ==========================================================================
    Configures eXplorer API successfully.
    ...
    
  7. Start qTest Sessions:
    #service explorerd stop