Line 1: | Line 1: | ||
+ | = GWS Deployment with Docker Compose = | ||
+ | |||
+ | * [[#GWSDeploymentwithDockerCompose-Introduc|Introduction]] | ||
+ | * [[#GWSDeploymentwithDockerCompose-SystemRe|System Requirements]] | ||
+ | * [[#GWSDeploymentwithDockerCompose-Prerequi|Prerequisites]] | ||
+ | * [[#GWSDeploymentwithDockerCompose-RAMRequi|RAM Requirements]] | ||
+ | |||
+ | == Introduction == | ||
+ | |||
+ | The document is intended to provide step by step instruction of how to prepare and deploy GWS with Docker Compose. | ||
+ | |||
+ | == System Requirements == | ||
+ | |||
+ | OS: Any Enterprise Linux distro, version 7(RHEL-7, CentOS-7 etc.) | ||
+ | |||
+ | Internet access to [http://docker.io/library docker.io/library] or following images should be manually loaded to docker: | ||
+ | |||
+ | * centos:latest | ||
+ | * elasticsearch:6.6.2 | ||
+ | * postgres:9.5.12-alpine | ||
+ | * redis:4 | ||
+ | |||
+ | == Prerequisites == | ||
+ | |||
+ | Docker: https://docs.docker.com/install<br /> | ||
+ | Docker-compose: https://docs.docker.com/compose/install | ||
+ | |||
+ | == RAM Requirements == | ||
+ | |||
+ | * Minimum 16 Gb of RAM | ||
+ | |||
+ | Implementation Steps | ||
+ | |||
+ | 1) Unpack IP_HTCCDev_xxx_ENU_dockerlinux.zip file and navigate to "ip" folder which should contain following files: | ||
+ | |||
+ | * gws-microservices.tgz | ||
+ | * exported microservices in tar.gz format (e.g. gws-platform-configuration_9.0.000.42.tar.gz) | ||
+ | |||
+ | 2) Unpack 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 in case GWS images are loaded manually. | ||
+ | |- | ||
+ | | REDIRECT_URIS | ||
+ | | \"http://uri1\",\"http://uri2\" | ||
+ | | | ||
+ | Specifies an array by using double quotes and comma to separate values with no whitespace between. | ||
+ | |||
+ | It is mandatory to set resolvable hostname or ip address of docker host machine. Please note that quotes should be escaped with backslash. | ||
+ | |- | ||
+ | | DOCKERHUB_MIRROR | ||
+ | | | ||
+ | | Should be empty in case Infrastructure components images are loaded manually. | ||
+ | |- | ||
+ | | LOCATION | ||
+ | | /USW2 | ||
+ | | Location of Configuration Server | ||
+ | |- | ||
+ | | ENVIRONMENT_USERNAME | ||
+ | | default | ||
+ | | Username to connect to Configuration Server | ||
+ | |- | ||
+ | | ENVIRONMENT_APPNAME | ||
+ | | Cloud | ||
+ | | Application name to connect to Configuration Server | ||
+ | |- | ||
+ | | ENVIRONMENT_PASSWORD | ||
+ | | password | ||
+ | | Password to connect to Configuration Server | ||
+ | |- | ||
+ | | ENVIRONMENT_CONFIG_SERVER_PORT | ||
+ | | 8888 | ||
+ | | Port of primary Configuration Server | ||
+ | |- | ||
+ | | ENVIRONMENT_CONFIG_SERVER_PRIMARY_ADDRESS | ||
+ | | 127.0.0.1 | ||
+ | | Address of primary Configuration Server | ||
+ | |- | ||
+ | | ENVIRONMENT_CONFIG_SERVER_TENANT | ||
+ | | Environment | ||
+ | | Configuration Server's tenant name | ||
+ | |- | ||
+ | | CONTACT_CENTER_DOMAIN_NAME | ||
+ | | on_premise_lab | ||
+ | | Domain associated with this contact center | ||
+ | |} | ||
+ | |||
+ | 5) For proper docker-compose invocation creation of following symbolic links may needed: | ||
+ | |||
+ | ln -s /usr/local/bin/docker-compose docker-compose | ||
+ | |||
+ | sudo ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc | ||
+ | |||
+ | 6) For Elasticsearch default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions. To mitigate: | ||
+ | |||
+ | sysctl -w vm.max_map_count=262144 | ||
+ | |||
+ | 7) Navigate to the '''/opt/genesys/gws/docker/wwe''' directory. | ||
+ | |||
+ | 8) Source common-env file with environment variables: | ||
+ | |||
+ | . ../common-env | ||
+ | |||
+ | 9) Invoke docker-compose: | ||
+ | |||
+ | docker-compose up -d | ||
+ | |||
+ | 10) Wait until docker-compose is up and running. It may take up to 10 minutes. | ||
+ | |||
+ | Verification | ||
+ | |||
+ | Use the following links to get and verify that expected versions of the GWS services are correct: | ||
+ | |||
+ | {| | ||
+ | ! '''Service''' | ||
+ | ! | ||
+ | ! '''Verification URLs''' | ||
+ | |- | ||
+ | | Auth API | ||
+ | | | ||
+ | | [http://gws_applications_ip/auth/v3/version http://GWS_APPLICATIONS_IP/auth/v3/version] | ||
+ | |- | ||
+ | | Config API | ||
+ | | | ||
+ | | [http://gws_applications_ip/auth/v3/version http://GWS_APPLICATIONS_IP/config/v3/version] | ||
+ | |- | ||
+ | | Environment API | ||
+ | | | ||
+ | | [http://gws_applications_ip/auth/v3/version http://GWS_APPLICATIONS_IP/environment/v3/versio]n | ||
+ | |- | ||
+ | | Workspace API | ||
+ | | | ||
+ | | [http://gws_applications_ip/workspace/v3/version http://GWS_APPLICATIONS_IP/workspace/v3/version] | ||
+ | |- | ||
+ | | Workspace UI | ||
+ | | | ||
+ | | [http://gws_applications_ip/ui/wwe/index.html http://GWS_APPLICATIONS_IP/ui/wwe/index.html] | ||
+ | |} | ||
+ | |||
+ | |||
+ | --- | ||
+ | |||
= Deploying GWS in Test Labs = | = Deploying GWS in Test Labs = | ||
Revision as of 04:24, August 9, 2019
GWS Deployment with Docker Compose
Introduction
The document is intended to provide step by step instruction of how to prepare and deploy GWS with Docker Compose.
System Requirements
OS: Any Enterprise Linux distro, version 7(RHEL-7, CentOS-7 etc.)
Internet access to docker.io/library or following images should be manually loaded to docker:
- centos:latest
- elasticsearch:6.6.2
- postgres:9.5.12-alpine
- redis:4
Prerequisites
Docker: https://docs.docker.com/install
Docker-compose: https://docs.docker.com/compose/install
RAM Requirements
- Minimum 16 Gb of RAM
Implementation Steps
1) Unpack IP_HTCCDev_xxx_ENU_dockerlinux.zip file and navigate to "ip" folder which should contain following files:
- gws-microservices.tgz
- exported microservices in tar.gz format (e.g. gws-platform-configuration_9.0.000.42.tar.gz)
2) Unpack 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 in case GWS images are loaded manually. | |
REDIRECT_URIS | \"http://uri1\%22,\%22http://uri2\%22 |
Specifies an array by using double quotes and comma to separate values with no whitespace between. It is mandatory to set resolvable hostname or ip address of docker host machine. Please note that quotes should be escaped with backslash. |
DOCKERHUB_MIRROR | Should be empty in case Infrastructure components images are loaded manually. | |
LOCATION | /USW2 | Location of Configuration Server |
ENVIRONMENT_USERNAME | default | Username to connect to Configuration Server |
ENVIRONMENT_APPNAME | Cloud | Application name to connect to Configuration Server |
ENVIRONMENT_PASSWORD | password | Password to connect to Configuration Server |
ENVIRONMENT_CONFIG_SERVER_PORT | 8888 | Port of primary Configuration Server |
ENVIRONMENT_CONFIG_SERVER_PRIMARY_ADDRESS | 127.0.0.1 | Address of primary Configuration Server |
ENVIRONMENT_CONFIG_SERVER_TENANT | Environment | Configuration Server's tenant name |
CONTACT_CENTER_DOMAIN_NAME | on_premise_lab | Domain associated with this contact center |
5) For proper docker-compose invocation creation of following symbolic links may needed:
ln -s /usr/local/bin/docker-compose docker-compose
sudo ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc
6) For Elasticsearch default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions. To mitigate:
sysctl -w vm.max_map_count=262144
7) Navigate to the /opt/genesys/gws/docker/wwe directory.
8) Source common-env file with environment variables:
. ../common-env
9) Invoke docker-compose:
docker-compose up -d
10) Wait until docker-compose is up and running. It may take up to 10 minutes.
Verification
Use the following links to get and verify that expected versions of the GWS services are correct:
Service | Verification URLs | |
---|---|---|
Auth API | http://GWS_APPLICATIONS_IP/auth/v3/version | |
Config API | http://GWS_APPLICATIONS_IP/config/v3/version | |
Environment API | http://GWS_APPLICATIONS_IP/environment/v3/version | |
Workspace API | http://GWS_APPLICATIONS_IP/workspace/v3/version | |
Workspace UI | http://GWS_APPLICATIONS_IP/ui/wwe/index.html |
---
Deploying GWS in Test Labs
Hardware Requirements
- Single node of 64 GB of RAM for a full WWE service set.
- At least 4 CPU cores are required.
- HDD 200 GB
Software Requirements
- Any Enterprise Linux version 7 (CentOS, RHEL, etc.)
Install Docker and docker-compose
Install GWS micro-services
- Create a gws directory under the /opt/genesys directory and copy the contents of the package's docker directory .
- Navigate to the /opt/genesys/gws/docker/images directory.
- Populate the images directory with the Docker image tarballs in *.tar format:
for i in *.tar; do sudo docker load —input $i; done
- Edit the following values in the opt/genesys/gws/docker/common-env file:
- LOCATION=USW2 - Genesys-specific value which affect server visibility. (should corresponds with value specified in CloudCluster’s connections > Advanced tab).
- REDIRECT_URIS=http://uri1,http://uri2 - specified as an array of double-quoted, comma-separated values with no whitespace between. Should be resolved from outside the docker host.
- DOCKER_REPOSITORY - just leave intact, for manual GWS-images distribution.
- DOCKERHUB_MIRROR= - just leave empty for manual infrastructure images distribution, or fetching them from Dockerhub (assuming you have internet connection in your environment).
- Set the respective GWS components versions.
- Create symbolic links for proper docker-compose invocation.
ln -s /usr/local/bin/docker-compose docker-compose
sudo ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc
- Navigate to the /opt/genesys/gws/wwe directory.
- Invoke startup script:
sudo start-gws-sevices.sh
- Wait until docker-compose stabilizes. It can take up to 10 minutes.
Configure GWS
Configure Config Server
Refer to InstallationProcedures for information on configuring GWS.
Create a Genesys Environment
Mapping
POST http://<GWS_APPLICATIONS_IP>:80/environment/v3/environments
Object Description
Name | Type | Description | Required | Default |
---|---|---|---|---|
tenant | String | Tenant name | Y | -- |
appName | String | Application name to connect to | Y | -- |
username | String | Username to connect to ConfigurationServer | Y | -- |
password | String | Password to connect to ConfigurationServer | Y | -- |
connectionProtocol | String | Connection protocol | N | addp |
localTimeout | Integer | Local timeout | 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 | String | Address of backup Configuration Server | N | -- |
backupPort | Integer | Port of backup Configuration Server | N | -- |
readOnly | Boolean | Indicates if Configuration Server works in read only mode | Y | -- |
locations | String | Location of Configuration Server | Y | -- |
Example
POST .../environment/v3/environments { "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" } }
Response:
{ "statusCode": 0, "path": "/environments/2" }
Create contact-center
Mapping
POST http://<GWS_APPLICATIONS_IP>:80/environment/v3/contact-centers
Object description
Name | Type | Description | Required | Default |
---|---|---|---|---|
environmentId | String | Environment id | Y | -- |
name | String | Contact center name | Y | -- |
domains | Array | List of domains associated with this contact center | N | Empty list |
auth | String | Authentication type for this contact center | Y | -- |
Example
POST .../environment/v3/contactCenters { "data": { "environmentId": "5", “name”: “customer.com” "domains": ["customer.com"], "auth": "configServer" } }
Response:
{ "statusCode": 0, "path": "/conatctCenters/6" }
Links
- Auth API: http://<GWS_APPLICATIONS_IP>:80/auth/v3/*
- Config API: http://<GWS_APPLICATIONS_IP>:80/configuration/v3/*
- Environment API: http://<GWS_APPLICATIONS_IP>:80/environment/v3/*
- Provisioning API: http://<GWS_APPLICATIONS_IP>:80/provisioning/v3/*
- Workspace API: http://<GWS_APPLICATIONS_IP>:80/workspace/v3/*
- Workspace UI: http://<GWS_APPLICATIONS_IP>:80/ui/wwe/index.html