Deployment Guide

Solution Prerequisites

Following are the solution setup prerequisites.

Software requirements


Minimum requirement

OS

CentOS 7, RedHat

MSSQLServer

2016

Docker CE/EE

18+, Docker EE in case of RedHat

Docker compose

1.21

Hardware requirements


Minimum requirement

CPU

4 cores

RAM

8 GB

Disk

300 GB

NICs

1 NIC per VM

On this page

Installation Steps

  1. Install Docker and Docker Compose on the host operating system.
  2. Download the deployment script deployment.sh and place it in the user home or any desired directory. This script will:
    1. delete the pcs-deployment directory if it exists.
  3. To execute the script, give it the execute permissions and execute it. 

    $ chmod 755 pcs-deployment.sh
    $ ./pcs-deployment.sh
  4. pcs-deployment directory has all the files required deployment

  5. Create a database in MSSQL Server for PCS application.
  6. Update following environment variables  in environment_variables.env file inside pcs-deployment folder.
  7. Name

    Description

    DB_URL

    PCS database connection url, (jdbc:jtds:sqlserver://192.168.1.92:1433/pcs_linux)

    DB_USER

    PCS database user , sa

    DB_PASSWORD

    PCS database password, Expertflow464

    DB_DRIVER

    JDBC driver (net.sourceforge.jtds.jdbcx.JtdsDataSource)

    DB_DIALECT

    org.hibernate.dialect.SQLServer2008Dialect
    UCCE_DB_URL

    UCCE AWDB database connection URL.

    jdbc:jtds:sqlserver://192.168.1.87:1433/ucce_awdb
    UCCE_DB_USER

    sa

    UCCE_DB_PASSWORD
    Expertflow464
    IS_DB_ON_SAME_SERVER
    Indicates if SQLServer is on Windows machine or not. If SQL Server is installed on Windows then set it to "no". If it is set to "yes" then SHARED_PATH variable should be set to have common shared folder that is used by Node server and SQLServer for report export. Check second last section for Node server
    SHARED_PATH

    Shared path for reports, SQL Server will write exported reports to this folder and
    application will download from the same folder. It is only effective if SAME_SERVER
    set to "no"

    \\\\192.168.1.79\\xyz\\
    Following variables are used if Cisco contact center type is UCCX
    UCCX_SERVER_BASE_URL
    http://192.168.1.100/adminapi
    UCCX_USERNAME
    administrator
    UCCX_PASSWORD
    Expertflow464
    Following variables are used for LDAP authentication
    LDAP_SERVER
    ldap://192.168.1.132:389/
    LDAP_SEARCH_USER
    cn=administrator,cn=users,dc=eflab,dc=com
    LDAP_SEARCH_PASSWORD
    Expertflow@12345
    LDAP_SEARCH_BASE
    cn=users,dc=eflab,dc=com
    LDAP_ALLOW_EMPTY_PASSWORD
    false
    LDAP_USER_ATTRIBUTE
    sAMAccountName
    TZ
    Asia/Karachi
    EMAIL_USERNAMEMail account username (example@ef.com)
    EMAIL_PASSWORDMail account password
    EMAIL_HOSTMail server host/IP
    EMAIL_PORTMail Server SMTP port
    EMAIL_SOCKER_CLASS
    javax.net.ssl.SSLSocketFactory, do not change it.
    EMAIL_AUTHset it to "true", do not change it.
    TZ
    Timezone (Asia/Karachi
  8. If there are SMS surveys as well, uncomment the following block in docker-compose

  9. For email notifications, uncomment following block in docker-compose and update email environment variables in environment_variables file. 
  10. Execute following commands to allow specific ports exposed in docker-compose. 

    $ firewall-cmd --zone=public --permanent --add-port=8443/tcp
    
     $ firewall-cmd --reload
  11. For callback surveys, uncomment following block in docker-compose file and update environment variables in middleware-environment.env file inside pcs-deployment/docker folder. Create a database in sql server for this service or user PCS application database and execute sql scripts inside pcs-deployment/proxyDbScripts folder to create necessary tables for this service. 

    NameDescription
    server.port8383, do not change it
    http.port7272, do not change it
    database.sql.drivercom.microsoft.sqlserver.jdbc.SQLServerDriver, do not change it
    database.sql.tcd.urlUCCE awdb url, jdbc:sqlserver://192.168.1.87:1433;databaseName=ucce_awdb
    database.sql.tcd.usernameUCCE awdb username
    database.sql.tcd.passwordUCCE awdb password
    database.sql.proxy.url

    this service database url,

    jdbc:sqlserver://192.168.1.87:1433;databaseName=proxy_db

    database.sql.proxy.usernameproxy database username
    database.sql.proxy.passwordproxy database password
    pcs.getSurveyDetails/getSurveyDetails, do not change it.
    pcs.getActiveSurveys/getActiveSurveys, do not change it.
    pcs.serverUrl

    PCS application URL

    https://192.168.1.151:8443/PCS/survey

    pcs.usernameA PCS user's username
    pcs.passwordPCS user password
    ecm.serverUrl

    ECM URL,

    http://192.168.1.141:7676/ecm

    ecm.campaign.caller/callback/insertCallback, do not change it.
    ecm.campaign.uploadBulkCaller/callback/uploadBulkCaller, do not change it.
    ecm.campaign.callback1, ECM campaign Id supposed to be used for callback surveys
    ecm.campaign.sms2, ECM campaign Id supposed to be used for sms surveys
    MY_IPlocal machine IP
    IS_HAtrue or false, decides if HA is supported or not for this service
    TCD.startFetchingTime

    2019-11-12 10:11:52,

    initial date time from where to start fetching inbound calls and check for callback surveys.

    ecm.campaign.sms.phone.prefixesPrefixes of numbers to identify mobile numbes, e.g 77,83,92
    time.zone+5, timzone GMT offset
  12. Default self signed SSL certificates are provided with build. If it needs to be changed with domain signed certificate then replace server.crt(SSL certificate) and server.key (SSL key) in pcs-deployment/docker/ssl folder.

  13. If UCCX APIs are required to be accessed via https (UCCX_SERVER_BASE_URL) then we will need to provide UCCX SSL certificate to application. Replace file ccx.crt inside pcs-deployment/docker/ssl folder with UCCX SSL certificate file.
  14. Having environment configurations done,  navigate to to the pcs-deployment directory and execute following commands: 

    $  chmod 755 install.sh
    $ ./install.sh
  15. Run the following command to ensure that all the components are up and running: 

    $ docker ps -a

  16. The translation files are placed in pcs-deployment/docker/translations. Four languages are supported , English (message.properties), French (message_fr.properties), German (message_de.properties) and Italian (messages_it.properties. Any changes to properties in these files will reflect in respective language UI.

HA Configurations

  1. Change to HA folder inside pcs-deployment and edit the keep.env file to configure the HA attributes. The details are as follows:

    KEEPALIVED_UNICAST_PEERS

    IP of the other machine in the cluster (cluster means an HA cluster of 2 machines where supervisor tools are being deployed). It shouldn't be the IP of the machine on which you currently are.

    Example: 

    192.168.1.233

    KEEPALIVED_VIRTUAL_IPS

    Virtual IP (should be provided by the customer) to be used to access the application. This should be available in the same subnet as the HA machines.

    Example:

    192.168.1.245

    KEEPALIVED_PRIORITY

    Priority of the node from 0-255. A lower number represents a higher priority. The node with higher priority will be master and the other one will be the slave by default.

    Example:

    100

    KEEPALIVED_INTERFACE

    The network interface of the machine on which LAN is connected. On Linux, you can get this by executing $ ip addr sh 

    On a typical SuSE installation, it would generally be:

    eth0

    CLEARANCE_TIMEOUTPCS startup time in seconds. On a 2 core machine, PCS takes around 1 minute or 60 seconds to boot up.

    Example

    60

    KEEPALIVED_ROUTER_IDRouter ID of the cluster. This should be the same on both the machines in the cluster.

    Example:

    51

    SCRIPT_VARThis is the health check script. It should remain as is unless you change the umm port in the compose file. Update PCS port instead of 8080 if you’re using some other port.

    Example

    pidof dockerd && wget -O config http://localhost:8080/PCS/configurationSetting/list

  2. Start the HA cluster on all the machines with the following command: 

     chmod +x keep-command.sh && ./keep-command.sh

If everything goes well, you should be able to access the application on https://machine-IP:8443/PCS after the application boot time (takes around 3 minutes on a 2 core machine).

If deployment for UCCX  access link https://machine-IP:8443/PCS/configurationSetting/list

and select  Cisco Deployment Type =UCCX


Once PCS application is up and running, open SQL scripts (provided with build) in text editor and change variable name “db_name” (search by @dbName) in detail_report_export_web, audit_survey_report_exportsummary_report_export and details_report_export to PCS database name. Create stored procedures by running all SQL scripts in SQL Server.


Once PCS application is started, got to Stored Procedures folder inside pcs-deployment folder and run all the scripts there in PCS MSSQLServer database to create required stored procedures for PCS reports.

Configuration for report export

  1. Run below script in PCS database on SQL Server 

    EXEC sp_configure 'show advanced options', 1
    GO
    -- To update the currently configured value for advanced options.
    RECONFIGURE
    GO
    -- To enable the feature.
    EXEC sp_configure 'xp_cmdshell', 1
    GO
    -- To update the currently configured value for this feature.
    RECONFIGURE
    GO
  2. Install nodejs with default settings on SQL Server Machine, setup can be found here.  
  3. After the installation is complete place ef_files_download  folder in C: drive of server (note: it must be placed in C drive root folder) 
  4. Now open Command Prompt and type cd C:/ef_files_download
  5. Type command node script.js  and press enter   
  6. It will start the express server at some port like 3003
    1. If SQL server and application server are on two different machines
    • Share this folder “ef_files_download” with Everyone(Password protection should be OFF for this folder, both PCS and SQL Server machines should be on same domain)
    • Open PCS application
    • Go to PCS http://machine_ip:tomcat_port/PCS/ConfigurationSetting/
    • Edit settings
    • Enter Exported Report Path = machine_IP:listening_port/pcs
    • Click update

Troubleshooting

Logs for each container are available in files as well as within docker daemon. To see the logs for any container, execute docker ps and get the id of the container. Use that id to see the logs using docker logs <container_id>

  1. PCS is not able to fetch prompts from CVP shared folder
    • Solution: add extra_hosts in the docker-compose file in pcs-deployment/docker folder with CVP IP address and Host name like below                         extra_host:
                       - "host-name: ip"


Survey Dashboard Deployment Guide:

These are the series of Steps that are need to be executed to deploy the survey dashboard:

1 Add the Survey Dashboard Docker image in your docker-compose.yml file. Following example explains the step:

PCS Data Service
pcs-service:
  image: gitlab.expertflow.com:9242/surveys/survey-dashboard:1.1.0
  env_file:
  - ./environment-variables/survey-variables.env
  restart: always

2 Update the survey-variables.env file with following Environment variables:

Environment Variables                                                                               Values
DB_DIALECTorg.hibernate.dialect.SQLServer2008Dialect
DB_DRIVERnet.sourceforge.jtds.jdbc.Driver
DB_PASSExpertflow464
DB_URLjdbc:jtds:sqlserver://192.168.1.92:1433/PCS
DB_USERsa


3 Login to Docker account: login to Docker with your credentials.

docker login gitlab.expertflow.com:9242 --username deployment --password xWb8WafM8ZvdwBHNxLm3


4 Up the Docker Compose file with following command:

docker-compose -f docker/docker-compose.yml up -d