Jump to: navigation, search
(Configure Config Server)
(Update with the copy of version: 9.0.0DRAFT)
Line 1: Line 1:
= Deploying GWS in Test Labs =
+
= Deploying Web Services and Applications in a Lab environment =
  
==Install Docker and docker-compose==
+
The page provides instructions on preparing and deploying Web Services and Applications with Docker
  
# {{#Widget:ExtLink|link=https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1|displaytext=Install Docker}}
+
== Prerequisites ==
# {{#Widget:ExtLink|link=https://docs.docker.com/compose/install/|displaytext=Install Docker-Compose}}
+
=== Software Requirements ===
  
==Install GWS micro-services==
+
* OS: Any Enterprise Linux distribution version 7 (RHEL-7, CentOS-7)
 +
* {{#Widget:ExtLink|link=https://docs.docker.com/install|displaytext=Docker}}. Please use the latest stable version.
 +
* {{#Widget:ExtLink|link=https://docs.docker.com/compose/install|displaytext=Docker Compose}}. Please use the latest stable version.
 +
* Access to [http://docker.io/library docker.io/library]
 +
** If Internet access is not available, the following images should be manually loaded to docker:
 +
*** {{#Widget:ExtLink|link=https://hub.docker.com/_/centos|displaytext=centos:latest}}
 +
*** {{#Widget:ExtLink|link=https://hub.docker.com/_/elasticsearch|displaytext=elasticsearch:6.6.2}}
 +
*** {{#Widget:ExtLink|link=https://hub.docker.com/_/postgres|displaytext=postgres:9.5.12-alpine}}
 +
*** {{#Widget:ExtLink|link=https://hub.docker.com/_/redis|displaytext=redis:4}}
  
# Create a '''premise''' directory under the '''/opt/genesys/gws''' directory and copy the contents of the package's '''docker''' directory in all target machines.
+
=== Hardware Requirements ===
# Run the following command at all target machines: <pre># ./bin/preflight.sh</pre>{{NoteFormat|This script disables firewalls and sets SElinux to ''permissive'' mode.}}
 
# Run the following command at all target machines:<pre># ./bin/dump-restore.sh restore</pre>
 
  
==Create GWS-data service Containers==
+
* CPU: Minimum 2-core CPU
 +
* RAM : Minimum 16 GB of RAM
  
# Create a ''systemd'' unit. <pre>SERVICE_NAME="data" ./bin/register-systemd-unit.sh</pre>
+
=== Requirements for WWE ===
# Start the data services.<pre>systemctl start gws-data.service</pre>
 
# Configure Redis.<pre>./bin/redis-starter.sh</pre>
 
  
==Create GWS-applications Containers==
+
* OS: Windows 10
 +
* Browsers : Google Chrome 63+, Mozilla Firefox 57+ or Firefox ESR 52+, or Microsoft Edge
  
# Create a ''systemd'' unit. <pre>SERVICE_NAME="applications" ./bin/register-systemd-unit.sh</pre>
+
==Deploying Web Services and Applications==
# Start the applications services. <pre>systemctl start gws-applications.service</pre>
 
# Create the client. <pre>./bin/client-curl-script.sh</pre>
 
# Check the status of applications. <pre>./bin/healthcheck.sh</pre>
 
  
==Configure GWS ==
+
# Unpack the installation package file (e.g., '''IP_HTCCDev_9000207b1_ENU_dockerlinux.zip''' ) , and navigate to the '''ip''' folder which should contain the following files:
===Configure Config Server===
+
#* '''gws-microservices.tgz'''
Refer to [[InstallingAndDeploying|Installation Procedures]] for information on configuring GWS.
+
#* exported microservices in tar.gz format (e.g., '''gws-platform-configuration_9.0.000.50.tar.gz''')
 +
# Unpack the '''gws-microservices.tgz''' archive to '''/opt/genesys/gws''' directory. <br />
 +
#*<pre>mkdir -p /opt/genesys/gws </pre>
 +
#*<pre>tar xvf gws-microservices.tgz -C /opt/genesys/gws</pre>
 +
# Populate the Docker images (presented in *.tar.gz format) from installation package: <br />
 +
#*<pre>for i in *.tar.gz; do sudo docker load --input $i; done</pre>
 +
# Edit the following values in the '''/opt/genesys/gws/docker/common-env''' file:
  
==Create a Genesys Environment==
 
===Mapping ===
 
<pre>POST http://<GWS_APPLICATIONS_IP>:80/environment/v3/environments </pre>
 
 
=== Object Description ===
 
 
{|
 
{|
 +
! '''Environment Variable'''
 +
! '''Value'''
 +
! '''Description'''
 
|-
 
|-
! Name
+
| DOCKER_REPOSITORY
! Type
+
|
! Description
+
| Should be empty if the Web Services and Applications images are loaded manually.
! Required
 
! Default
 
 
|-
 
|-
| tenant
+
| REDIRECT_URIS
| String
+
| <nowiki>\&quot;http://uri1\&quot;,\&quot;http://uri2\&quot;</nowiki>
| Tenant name
+
|
| Y
+
A comma-separated array of resolvable host names or IP addresses of the Docker host machine. Used as a part of the OAuth authentication flow.
| --
+
{{NoteFormat| To access the lab deployment, it is mandatory to set resolvable hostnames or IP addresses for the Docker host machine.
 +
 
 +
The array should use double quotes and the quotes should be escaped using backslashes. The array should not have any whitespace between items.
 +
}}
 
|-
 
|-
| appName
+
| DOCKERHUB_MIRROR
| String
+
|
| Application name to connect to
+
| Should be empty if the images of the Infrastructure components are loaded manually.
| Y
 
| --
 
 
|-
 
|-
| username
+
| LOCATION
| String
+
| <tt>/USW2</tt>
| Username to connect to ConfigurationServer
+
| The location of Configuration Server.
| Y
+
{{NoteFormat|The Web Services and Applications Cluster Application object (typically names ''CloudCluster'') in the Configuration Database must be configured with a specified location for each connection to Genesys servers like Configuration Server, Stat Server, T-Server, and so on. This Settings defines which server instance is visible by the Web Services and Applications node based on its position in the Web Services and Applications Cluster. }}
| --
 
 
|-
 
|-
| password
+
| ENVIRONMENT_USERNAME
| String
+
| default
| Password to connect to ConfigurationServer
+
| The username to connect to the Configuration Server.
| Y
 
| --
 
 
|-
 
|-
| connectionProtocol
+
| ENVIRONMENT_APPNAME
| String
+
| Cloud
| Connection protocol
+
| The application name to connect to the Configuration Server.
| N
 
| addp
 
 
|-
 
|-
| localTimeout
+
| ENVIRONMENT_PASSWORD
| Integer
+
| password
| Local timeout
+
| The password to connect to the Configuration Server.
| N
 
| 5
 
|-
 
| remoteTimeout
 
| Integer
 
| Remote timeout
 
| N
 
| 7
 
|-
 
| traceMode
 
| String
 
| Trace mode
 
| N
 
| CFGTMBoth
 
|-
 
| tlsEnabled
 
| Boolean
 
| Use tls to connect to Configuration Server
 
| N
 
| false
 
|-
 
| configServers
 
| Array
 
| List of Configuration Servers in this environment (see bellow)
 
| N
 
| empty array
 
|}
 
 
 
=== Configuration Server Object ===
 
 
 
{|
 
|-
 
! Name
 
! Type
 
! Description
 
! Required
 
! Default
 
|-
 
| primaryAddress
 
| String
 
| Address of primary Configuration Server
 
| Y
 
| --
 
|-
 
| primaryPort
 
| Integer
 
| Port of primary Configuration Server
 
| Y
 
| --
 
 
|-
 
|-
| backupAddress
+
| ENVIRONMENT_CONFIG_SERVER_PORT
| String
+
| 8888
| Address of backup Configuration Server
+
| The port number of the primary Configuration Server.
| N
 
| --
 
 
|-
 
|-
| backupPort
+
| ENVIRONMENT_CONFIG_SERVER_PRIMARY_ADDRESS
| Integer
+
| 127.0.0.1
| Port of backup Configuration Server
+
| The IP address of the primary Configuration Server.
| N
 
| --
 
 
|-
 
|-
| readOnly
+
| ENVIRONMENT_CONFIG_SERVER_TENANT
| Boolean
+
| Environment
| Indicates if Configuration Server works in read only mode
+
| The Configuration Server's tenant name.
| Y
 
| --
 
 
|-
 
|-
| locations
+
| CONTACT_CENTER_DOMAIN_NAME
| String
+
| on_premise_lab
| Location of Configuration Server
+
| The domain associated with this contact center.
| Y
 
| --
 
 
|}
 
|}
  
==== Example ====
+
<ol start="5">
<pre>
+
<li>For Elasticsearch, the default operating system limits on '''mmap''' counts is likely to be too low, which may result in out-of-memory exceptions. To mitigate it temporarily:
POST .../environment/v3/environments
+
<pre>sudo sysctl -w vm.max_map_count=262144</pre>
{
 
"data": {
 
  "username": "default",
 
  "remoteTimeout": 7,
 
  "appName": "WS_Node",
 
  "traceMode": "CFGTMBoth",
 
  "tlsEnabled": false,
 
  "localTimeout": 5,
 
  "connectionProtocol": "addp",
 
  "password": "passowrd",
 
  "configServers": [
 
    {
 
      "primaryPort": 8888,
 
      "readOnly": false,
 
      "primaryAddress": "voice-p.dev",
 
      "locations": "usw1"
 
    },
 
    {
 
      "primaryPort": 8888,
 
      "primaryAddress": "10.20.10.1",
 
      "readOnly": false,
 
      "locations": "use2",
 
      "backupPort": 8888,
 
      "backupAddress": "10.20.20.1"
 
    }
 
  ],
 
  "tenant": "Environment"
 
}
 
}
 
</pre>
 
 
 
Response:
 
  
<pre>
+
To set this value permanently, update the '''vm.max_map_count''' setting in '''/etc/sysctl.conf'''. To verify after rebooting, run:
{
+
<pre>sudo sysctl vm.max_map_count</pre>
"statusCode": 0,
+
</li>
"path": "/environments/2"
+
<li> Navigate to the '''/opt/genesys/gws/docker/wwe''' directory.</li>
}
+
<li>Source the '''common-env''' file with environment variables:
</pre>
+
<pre>. ../common-env</pre>
 +
<li>Invoke<tt> docker-compose</tt>: 
 +
<pre>docker-compose up -d</pre>
 +
<li>Wait until <tt>docker-compose</tt> is up and running. It may take up to 10 minutes.</li>
  
==Create contact-center==
+
==Verifying Web Services and Applications Services==
=== Mapping===
 
<pre>POST http://<GWS_APPLICATIONS_IP>:80/environment/v3/contact-centers</pre>
 
  
=== Object description===
+
Use the following links to get and verify that expected versions of the  Web Services and Applications services are correct:
 
{|
 
{|
! Name
+
! '''Service'''
! Type
+
! '''Verification URLs'''
! Description
 
! Required
 
! Default
 
 
|-
 
|-
| environmentId
+
| Authentication Service
| String
+
| <nowiki>http://GWS_APPLICATIONS_IP/auth/v3/version</nowiki>
| Environment id
 
| Y
 
| --
 
 
|-
 
|-
| domains
+
| Configuration Service
| Array
+
| <nowiki>http://GWS_APPLICATIONS_IP/configuration/v3/version</nowiki>
| List of domains associated with this contact center
 
| N
 
| Empty list
 
 
|-
 
|-
| auth
+
| Environment Service
| String
+
| <nowiki>http://GWS_APPLICATIONS_IP/environment/v3/version</nowiki>
| Authentication type for this contact center
 
| Y
 
| --
 
 
|-
 
|-
 +
| Data Collector Service
 +
| <nowiki>http://GWS_APPLICATIONS_IP/datacollector/v3/version</nowiki>
 +
|-
 +
| Workspace Web Edition
 +
| <nowiki>http://GWS_APPLICATIONS_IP/ui/wwe/index.html</nowiki>
 
|}
 
|}
  
==== Example ====
 
<pre>
 
POST .../environment/v3/contactCenters
 
  {
 
    "data": {
 
      "environmentId": "5",
 
      "domains": ["customerC.com"],
 
      "auth": "configServer"
 
    }
 
}
 
</pre>
 
 
Response:
 
 
<pre>
 
{
 
  "statusCode": 0,
 
  "path": "/conatctCenters/6"
 
}
 
</pre>
 
 
==Links==
 
# Auth API: <nowiki>http://<GWS_APPLICATIONS_IP>:80/auth/v3/*</nowiki>
 
# Config API:  <nowiki>http://<GWS_APPLICATIONS_IP>:80/configuration/v3/*</nowiki>
 
# Environment API:  <nowiki>http://<GWS_APPLICATIONS_IP>:80/environment/v3/*</nowiki>
 
# Provisioning API:  <nowiki>http://<GWS_APPLICATIONS_IP>:80/provisioning/v3/*</nowiki>
 
# Workspace API:  <nowiki>http://<GWS_APPLICATIONS_IP>:80/workspace/v3/*</nowiki>
 
  
 
[[Category:V:HTCC:9.0.0]]
 
[[Category:V:HTCC:9.0.0]]

Revision as of 02:37, September 4, 2019

Deploying Web Services and Applications in a Lab environment

The page provides instructions on preparing and deploying Web Services and Applications with Docker. 

Prerequisites

Software Requirements

Hardware Requirements

  • CPU: Minimum 2-core CPU
  • RAM : Minimum 16 GB of RAM

Requirements for WWE

  • OS: Windows 10
  • Browsers : Google Chrome 63+, Mozilla Firefox 57+ or Firefox ESR 52+, or Microsoft Edge

Deploying Web Services and Applications

  1. Unpack the installation package file (e.g., IP_HTCCDev_9000207b1_ENU_dockerlinux.zip ) , and navigate to the ip folder which should contain the following files:
    • gws-microservices.tgz
    • exported microservices in tar.gz format (e.g., gws-platform-configuration_9.0.000.50.tar.gz)
  2. Unpack the gws-microservices.tgz archive to /opt/genesys/gws directory.
    • mkdir -p /opt/genesys/gws 
    • tar xvf gws-microservices.tgz -C /opt/genesys/gws
  3. Populate the Docker images (presented in *.tar.gz format) from installation package: 
    • for i in *.tar.gz; do sudo docker load --input $i; done
  4. Edit the following values in the /opt/genesys/gws/docker/common-env file:
Environment Variable Value Description
DOCKER_REPOSITORY Should be empty if the Web Services and Applications images are loaded manually.
REDIRECT_URIS \"http://uri1\",\"http://uri2\"

A comma-separated array of resolvable host names or IP addresses of the Docker host machine. Used as a part of the OAuth authentication flow.

Important
To access the lab deployment, it is mandatory to set resolvable hostnames or IP addresses for the Docker host machine.

The array should use double quotes and the quotes should be escaped using backslashes. The array should not have any whitespace between items.

DOCKERHUB_MIRROR Should be empty if the images of the Infrastructure components are loaded manually.
LOCATION /USW2 The location of Configuration Server.
Important
The Web Services and Applications Cluster Application object (typically names CloudCluster) in the Configuration Database must be configured with a specified location for each connection to Genesys servers like Configuration Server, Stat Server, T-Server, and so on. This Settings defines which server instance is visible by the Web Services and Applications node based on its position in the Web Services and Applications Cluster.
ENVIRONMENT_USERNAME default The username to connect to the Configuration Server.
ENVIRONMENT_APPNAME Cloud The application name to connect to the Configuration Server.
ENVIRONMENT_PASSWORD password The password to connect to the Configuration Server.
ENVIRONMENT_CONFIG_SERVER_PORT 8888 The port number of the primary Configuration Server.
ENVIRONMENT_CONFIG_SERVER_PRIMARY_ADDRESS 127.0.0.1 The IP address of the primary Configuration Server.
ENVIRONMENT_CONFIG_SERVER_TENANT Environment The Configuration Server's tenant name.
CONTACT_CENTER_DOMAIN_NAME on_premise_lab The domain associated with this contact center.
  1. For Elasticsearch, the default operating system limits on mmap counts is likely to be too low, which may result in out-of-memory exceptions. To mitigate it temporarily:
    sudo sysctl -w vm.max_map_count=262144

    To set this value permanently, update the vm.max_map_count setting in /etc/sysctl.conf. To verify after rebooting, run:

    sudo sysctl vm.max_map_count
  2. Navigate to the /opt/genesys/gws/docker/wwe directory.
  3. Source the common-env file with environment variables:
    . ../common-env
  4. Invoke docker-compose
    docker-compose up -d
  5. Wait until docker-compose is up and running. It may take up to 10 minutes.
  6. Verifying Web Services and Applications Services

    Use the following links to get and verify that expected versions of the Web Services and Applications services are correct:

    Service Verification URLs
    Authentication Service http://GWS_APPLICATIONS_IP/auth/v3/version
    Configuration Service http://GWS_APPLICATIONS_IP/configuration/v3/version
    Environment Service http://GWS_APPLICATIONS_IP/environment/v3/version
    Data Collector Service http://GWS_APPLICATIONS_IP/datacollector/v3/version
    Workspace Web Edition http://GWS_APPLICATIONS_IP/ui/wwe/index.html
Comments or questions about this documentation? Contact us for support!