Deployment Guide
Installation Steps
- Install Docker and Docker Compose on the host operating system.
- Download the deployment script deployment.sh and place it in the user home or any desired directory. This script will:
- delete the pcs-deployment directory if it exists.
To execute the script, give it the execute permissions and execute it.
BASH$ chmod 755 pcs-deployment.sh $ ./pcs-deployment.sh
pcs-deployment directory has all the files required deployment
- Create a database in MSSQL Server for PCS application.
- Update following environment variables in environment_variables.env file inside pcs-deployment folder.
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_USERNAME Mail account username (example@ef.com) EMAIL_PASSWORD Mail account password EMAIL_HOST Mail server host/IP EMAIL_PORT Mail Server SMTP port EMAIL_SOCKER_CLASS javax.net.ssl.SSLSocketFactory, do not change it.
EMAIL_AUTH set it to "true", do not change it. TZ
Timezone (Asia/Karachi If there are SMS surveys as well, uncomment the following block in docker-compose
- For email notifications, uncomment following block in docker-compose and update email environment variables in environment_variables file.
Execute following commands to allow specific ports exposed in docker-compose.
CODE$ firewall-cmd --zone=public --permanent --add-port=8443/tcp $ firewall-cmd --reload
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.
Name Description server.port 8383, do not change it http.port 7272, do not change it database.sql.driver com.microsoft.sqlserver.jdbc.SQLServerDriver, do not change it database.sql.tcd.url UCCE awdb url, jdbc:sqlserver://192.168.1.87:1433;databaseName=ucce_awdb database.sql.tcd.username UCCE awdb username database.sql.tcd.password UCCE awdb password database.sql.proxy.url this service database url,
jdbc:sqlserver://192.168.1.87:1433;databaseName=proxy_db
database.sql.proxy.username proxy database username database.sql.proxy.password proxy database password pcs.getSurveyDetails /getSurveyDetails, do not change it. pcs.getActiveSurveys /getActiveSurveys, do not change it. pcs.serverUrl PCS application URL
https://machine-ip:8443/PCS/survey
pcs.username A PCS user's username pcs.password PCS user password ecm.serverUrl ECM URL,
http://machine-ip:7676/ecm
ecm.campaign.caller /callback/insertCallback, do not change it. ecm.campaign.uploadBulkCaller /callback/uploadBulkCaller, do not change it. ecm.campaign.callback 1, ECM campaign Id supposed to be used for callback surveys ecm.campaign.sms 2, ECM campaign Id supposed to be used for sms surveys MY_IP local machine IP IS_HA true 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.prefixes Prefixes of numbers to identify mobile numbes, e.g 77,83,92 time.zone +5, timzone GMT offset 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.
- 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.
Having environment configurations done, navigate to to the
pcs-deployment
directory and execute following commands:BASH$ chmod 755 install.sh $ ./install.sh
Run the following command to ensure that all the components are up and running:
BASH$ docker ps -a
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
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_TIMEOUT PCS startup time in seconds. On a 2 core machine, PCS takes around 1 minute or 60 seconds to boot up. Example:
60
KEEPALIVED_ROUTER_ID Router ID of the cluster. This should be the same on both the machines in the cluster. Example:
51
SCRIPT_VAR This 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
Start the HA cluster on all the machines with the following command:
CODEchmod +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_export, summary_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
Run below script in PCS database on SQL Server
CODEEXEC 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
- Install nodejs with default settings on SQL Server Machine, setup can be found here.
- 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)
- Now open Command Prompt and type cd C:/ef_files_download
- Type command node script.js and press enter
- It will start the express server at some port like 3003
- 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>
- 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"
- 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:
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_DIALECT | org.hibernate.dialect.SQLServer2008Dialect |
DB_DRIVER | net.sourceforge.jtds.jdbc.Driver |
DB_PASS | Expertflow464 |
DB_URL | jdbc:jtds:sqlserver://192.168.1.92:1433/PCS |
DB_USER | sa |
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
A fix in Email Notification:
- Change the email-notification-service image tag to 12.3.1
- Add an extra variable to environment variables with name TLS_ENABLED=true
- Run ./install.sh in pcs-deployment directly.