Jump to: navigation, search
(Created page with "= Deploying GWS in Test Labs = ==Docker and docker-compose installation== 1) Install Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1 2)...")
 
(Ready to publish for 9.0.000.80 release on Dec 21, 2020)
 
(104 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Deploying GWS in Test Labs =
+
= Deploying Web Services and Applications in Docker Compose =
  
==Docker and docker-compose installation==
+
This page provides instructions on preparing and deploying Web Services and Applications with Docker.
 +
{{NoteFormat|
 +
* To support Gplus Adapter for Salesforce, Docker Compose must be deployed with HTTPS.
 +
* To upgrade Web Services and Applications, you must install the new version of Web Services Docker Compose.}}
  
1) Install Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1
+
== Prerequisites ==
 +
For hardware, software, Workspace Web Edition, and Gplus Adapter for Salesforce requirements, refer to [[Prerequisites|Prerequisites]].
 +
Also, ensure your environment has access to [http://docker.io/library docker.io/library].
 +
If internet access is not available, manually load the following public container images to the Docker registry:
 +
* {{#Widget:ExtLink|link=https://hub.docker.com/_/elasticsearch|displaytext=Elasticsearch 7.8}}
 +
* {{#Widget:ExtLink|link=https://hub.docker.com/_/postgres|displaytext=Postgres 11}}
 +
* {{#Widget:ExtLink|link=https://hub.docker.com/_/redis|displaytext=Redis 5}}
 +
* {{#Widget:ExtLink|link=https://hub.docker.com/_/centos|displaytext=CentOS latest}}
  
2) Install Docker-Compose: https://docs.docker.com/compose/install/
+
==Configuring Web Services and Applications==
 +
To configure Web Services and Applications, refer to [[Documentation:HTCC:Dep:ConfigurationPremise|Configuring Web Services and Applications]].
  
==GWS microservices v9 installation==
+
==Deploying Web Services and Applications==
  
1) Copy the "premise" directory to all target machines' as "/opt/genesys/gws/premise". This would be the application's prefix.
+
# 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''')
 +
# Unpack the '''gws-microservices.tgz''' archive to the '''/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 the installation package: <br />
 +
#*<pre>for i in *.tar.gz; do sudo docker load --input $i; done</pre>
 +
#:{{NoteFormat|This command must be run with Docker-capable privileges.}}
 +
# Edit the following values in the '''/opt/genesys/gws/kubernetes/parameters.yaml''' file:
  
2) # ./bin/preflight.sh #Run at all target machines
+
{|
 +
! '''Environment Variable'''
 +
! '''Value'''
 +
! '''Description'''
 +
|-
 +
| DOCKER_REPOSITORY
 +
|
 +
| Should be empty if the Web Services and Applications images are loaded manually.
 +
|-
 +
| REDIRECT_URIS
 +
| <nowiki>\&quot;http://uri1\&quot;,\&quot;http://uri2\&quot;</nowiki>
 +
|
 +
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 host names or IP addresses for the Docker host machine.  
  
note: This script disables firewalld and sets SElinux to permissive mode
+
The array should use double quotes and the quotes should be escaped using backslashes. The array should not have any white space between items.
 +
}}
 +
|-
 +
| DOCKERHUB_MIRROR
 +
|
 +
| Should be empty if the images of the Infrastructure components are loaded manually.
 +
|-
 +
| LOCATION
 +
| <tt>/USW2</tt>
 +
| The location of Configuration Server.
 +
{{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 setting defines which server instance is visible by the Web Services and Applications node based on its position in the Web Services and Applications Cluster. }}
 +
|-
 +
| GWS_HTTPS_ENABLE
 +
| false
 +
| The option to enable https support for deployment.
 +
|-
 +
| GWS_HTTPS_SERVER_CERTIFICATE
 +
| server.crt
 +
| The path to server certificate, which will be used during the SSL handshake with clients.
 +
|-
 +
| GWS_HTTPS_SERVER_CERT_KEY
 +
| server.key
 +
| The path to server key, which will be used during the SSL handshake with clients.
 +
|-
 +
| ENVIRONMENT_USERNAME
 +
| default
 +
| The username to connect to Configuration Server.
 +
|-
 +
| ENVIRONMENT_APPNAME
 +
| GWS_App
 +
| The application name to connect to Configuration Server. For details, refer to [[ConfigurationPremise#gaxgwsclient| Creating GWS Client Application]].
 +
|-
 +
| ENVIRONMENT_PASSWORD
 +
| password
 +
| The password to connect to 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
 +
| <nowiki>onpremiselab.com</nowiki>
 +
| The domain associated with this contact center. {{NoteFormat|While logging on to WWE, use the domain name as the tenant name.}}
 +
|}
  
3) # ./bin/dump-restore.sh restore #Run at all target machines
+
<ol start="5">
 +
<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, run the following:
 +
<pre>sudo sysctl -w vm.max_map_count=262144</pre>
  
==GWS-data service containers==
+
To set this value permanently, update the '''vm.max_map_count''' setting in '''/etc/sysctl.conf'''. To verify after restarting, follow these steps:
 +
<pre>sudo sysctl vm.max_map_count</pre>
 +
</li>
 +
<li> Navigate to the '''/opt/genesys/gws/docker/wwe''' directory.</li>
 +
<li>Source the '''common-env''' file with environment variables:
 +
<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>
  
1) Create systemd unit
+
==Verifying Web Services and Applications==
  
SERVICE_NAME="data" ./bin/register-systemd-unit.sh
+
Use the following links to get the expected versions of the Web Services and Applications components and verify they are correct:
 +
{|
 +
! '''Service'''
 +
! '''Verification URLs'''
 +
|-
 +
| Authentication Service
 +
| <nowiki>http://GWS_APPLICATIONS_IP:8080/auth/v3/version</nowiki>
 +
|-
 +
| Configuration Service
 +
| <nowiki>http://GWS_APPLICATIONS_IP:8080/configuration/v3/version</nowiki>
 +
|-
 +
| Environment Service
 +
| <nowiki>http://GWS_APPLICATIONS_IP:8080/environment/v3/version</nowiki>
 +
|-
 +
| Data Collector Service
 +
| <nowiki>http://GWS_APPLICATIONS_IP:8080/datacollector/v3/version</nowiki>
 +
|-
 +
| Workspace Web Edition
 +
| <nowiki>http://GWS_APPLICATIONS_IP:8080/ui/wwe/index.html</nowiki>
 +
|}
  
2) Start data services
+
If the '''GWS_HTTPS_ENABLE''' option is set to <tt>true</tt>, HTTPS endpoints can be used for verification too:
 
+
{|
systemctl start gws-data.service
+
! '''Service'''
 
+
! '''Verification URLs'''
3) Configure Redis
+
|-
 
+
| Authentication Service
./bin/redis-starter.sh
+
| <nowiki>https://GWS_APPLICATIONS_IP:8443/auth/v3/version</nowiki>
 
+
|-
==GWS-applications containers==
+
| Configuration Service
 
+
| <nowiki>https://GWS_APPLICATIONS_IP:8443/configuration/v3/version</nowiki>
1) Create systemd unit
+
|-
 
+
| Environment Service
SERVICE_NAME="applications" ./bin/register-systemd-unit.sh
+
| <nowiki>https://GWS_APPLICATIONS_IP:8443/environment/v3/version</nowiki>
 
+
|-
2) Start applications services
+
| Data Collector Service
 
+
| <nowiki>https://GWS_APPLICATIONS_IP:8443/datacollector/v3/version</nowiki>
systemctl start gws-applications.service
+
|-
 
+
| Workspace Web Edition
3) Create the client
+
| <nowiki>https://GWS_APPLICATIONS_IP:8443/ui/wwe/index.html</nowiki>
 
+
|}
./bin/client-curl-script.sh
 
 
 
4) Check status of applications
 
 
 
./bin/healthcheck.sh
 
 
 
=GWS configuration:=
 
==Configure Config Server==
 
https://docs.genesys.com/Documentation/HTCC/latest/Dep/InstallationProcedures
 
==Create genesys-environment==
 
http://internalwiki.us.int.genesyslab.com/dev_teams/index.php/Environment_API_Reference#Create_new__Environment
 
 
 
==Create contact-center==
 
http://internalwiki.us.int.genesyslab.com/dev_teams/index.php/Environment_API_Reference#Create_new_Contact_Center
 
 
 
==Links==
 
 
 
Auth API: http://<GWS_APPLICATIONS_IP>:80/auth/v3/*
 
 
 
Config API: http://<GWS_APPLICATIONS_IP>:80/auth/v3/*
 
 
 
Environment API: http://<GWS_APPLICATIONS_IP>:80/auth/v3/*
 
 
 
Provisioning API: http://<GWS_APPLICATIONS_IP>:80/provisioning/v3/*
 
 
 
Workspace API: http://<GWS_APPLICATIONS_IP>:80/workspace/v3/*
 
 
 
Provisioning UI: http://<GWS_APPLICATIONS_IP>:80/ui/provisioning/*
 
 
 
Workspace UI: http://<GWS_APPLICATIONS_IP>:80/ui/wwe/*
 
 
 
Portainer http://<GWS_APPLICATIONS_IP>:9000, http://<GWS_DATA_IP>:9000, http://<GWS_MONITORING_IP>:9000
 
 
 
 
 
=A bare minimum docker-compose GWS-microservices setup. For presentation purposes only.=
 
 
 
==To run the demo environment on your laptop, please follow these steps:==
 
 
 
1) Connect to Genesys VPN to be able to pull GWS-microservices images.
 
 
 
2) Install Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1
 
 
 
3) Install Docker-Compose: https://docs.docker.com/compose/install/
 
 
 
4) Add Genesys Docker registry keys to your "/etc/docker/certs.d" directory.
 
 
 
5) Get the "gws-microservices" hg repository.
 
 
 
6) $ cd gws-microservices/production/premise/docker/docker/minimal
 
 
 
7) $ docker-compose up
 
 
 
8) Wait a couple of minutes for bootstrap process to finish.
 
 
 
9) Open http://127.0.0.1:9000 to see the Portainer web-interface, select "Local connection".
 
 
 
10) Open http://127.0.0.1/auth/v3/ui/sign-in.html to see the GWS-auth web-interface.
 
  
 
[[Category:V:HTCC:9.0.0DRAFT]]
 
[[Category:V:HTCC:9.0.0DRAFT]]

Latest revision as of 17:33, December 18, 2020

Deploying Web Services and Applications in Docker Compose

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

Important
  • To support Gplus Adapter for Salesforce, Docker Compose must be deployed with HTTPS.
  • To upgrade Web Services and Applications, you must install the new version of Web Services Docker Compose.

Prerequisites

For hardware, software, Workspace Web Edition, and Gplus Adapter for Salesforce requirements, refer to Prerequisites. Also, ensure your environment has access to docker.io/library. If internet access is not available, manually load the following public container images to the Docker registry:

Configuring Web Services and Applications

To configure Web Services and Applications, refer to Configuring Web Services and Applications.

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 the /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 the installation package: 
    • for i in *.tar.gz; do sudo docker load --input $i; done
    Important
    This command must be run with Docker-capable privileges.
  4. Edit the following values in the /opt/genesys/gws/kubernetes/parameters.yaml 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 host names 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 white space 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 setting defines which server instance is visible by the Web Services and Applications node based on its position in the Web Services and Applications Cluster.
GWS_HTTPS_ENABLE false The option to enable https support for deployment.
GWS_HTTPS_SERVER_CERTIFICATE server.crt The path to server certificate, which will be used during the SSL handshake with clients.
GWS_HTTPS_SERVER_CERT_KEY server.key The path to server key, which will be used during the SSL handshake with clients.
ENVIRONMENT_USERNAME default The username to connect to Configuration Server.
ENVIRONMENT_APPNAME GWS_App The application name to connect to Configuration Server. For details, refer to Creating GWS Client Application.
ENVIRONMENT_PASSWORD password The password to connect to 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 onpremiselab.com The domain associated with this contact center.
Important
While logging on to WWE, use the domain name as the tenant name.
  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, run the following:
    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 restarting, follow these steps:

    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

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

    Service Verification URLs
    Authentication Service http://GWS_APPLICATIONS_IP:8080/auth/v3/version
    Configuration Service http://GWS_APPLICATIONS_IP:8080/configuration/v3/version
    Environment Service http://GWS_APPLICATIONS_IP:8080/environment/v3/version
    Data Collector Service http://GWS_APPLICATIONS_IP:8080/datacollector/v3/version
    Workspace Web Edition http://GWS_APPLICATIONS_IP:8080/ui/wwe/index.html

    If the GWS_HTTPS_ENABLE option is set to true, HTTPS endpoints can be used for verification too:

    Service Verification URLs
    Authentication Service https://GWS_APPLICATIONS_IP:8443/auth/v3/version
    Configuration Service https://GWS_APPLICATIONS_IP:8443/configuration/v3/version
    Environment Service https://GWS_APPLICATIONS_IP:8443/environment/v3/version
    Data Collector Service https://GWS_APPLICATIONS_IP:8443/datacollector/v3/version
    Workspace Web Edition https://GWS_APPLICATIONS_IP:8443/ui/wwe/index.html
This page was last edited on December 18, 2020, at 17:33.
Comments or questions about this documentation? Contact us for support!