Jump to: navigation, search
(Update with the copy of version: 9.0.0DRAFT)
(Update with the copy of version: 9.0.0DRAFT)
Line 1: Line 1:
= Deploying Web Services and Applications =
+
= Deployment procedure =
  
After you install [[Prerequisites#docker|Docker]] and [[Prerequisites#kubernetes|Kubernetes]], follow the steps on this page to deploy Web Services and Applications.
+
== Prerequisites ==
  
{{NoteFormat|{{Editgrn_open}}XR: Where and how to get the Docker image for deployment?{{Editgrn_close}} }}
+
# Kubernetes cluster deployed and available. The following Kubernetes distributions are currently supported:
 +
#* Google Kubernetes Engine (GKE).
 +
# Client-side utilities installed at deployment host:
 +
#* [https://kubernetes.io/docs/tasks/tools/install-kubectl/ Kubectl] tool
 +
#* [https://docs.helm.sh/using_helm/ Helm] client, Tiller is not required.
 +
#* [https://cloud.google.com/sdk/docs/ gcloud] utility (for GKE deployments)
 +
# Valid credentials for your Kubernetes cluster.
 +
# The '''gws-microservices.tgz''' package downloaded from Genesys FTP to the deployment host.
 +
# Images of GWS components uploaded into target Kubernetes registry.
  
The following Kubernetes distributions are supported:
+
== Configuring GWS in Configuration Server ==
* OpenShift
 
* Google Kubernetes Engine
 
  
== Requirements ==
+
<blockquote>Use Genesys Administrator to configure Applications and Users for Genesys Web Services and Applications.
# {{#Widget:ExtLink|link=https://kubernetes.io/docs/tasks/tools/install-kubectl/|displaytext=Kubectl}} and {{#Widget:ExtLink|link=https://docs.helm.sh/using_helm/#installing-helm|displaytext=Helm}} client utilities
+
</blockquote>
#* Tiller is not required.
+
# Configure (or use existing) super administrator account. It will be used by GWS to connect and perform read and write operations.
## For Google Kubernetes Engine deployments, install and configure the ''{{#Widget:ExtLink|link=https://cloud.google.com/sdk/docs/#linux
+
# Create an application of type ''Genesys Generic Server''. Suggested name is '''''GWS'''''.
|displaytext=gcloud}}'' utility.
+
# For this application, add connections to Config Server, TServer (SIPServer), StatServer. In the '''Advanced''' tab of '''Connection''' in Application parameters, add the following locations, e.g. ''locations=/USW2'' - as configured in environment variable, ''GWS_REGION''.
# The scripts reside in the '''gws-microservices''' hg repository.  
+
# Create an application of type, ''Genesys Generic Client''. Suggested name is '''''GWS_app'''''.
 +
# Add a connection to the Genesys Generic Server application created in ''Step 2''.
  
<div class="cloud-tabberlive-wrapper">
+
== Deployment Steps ==
<tabber>
 
 
OpenShift=
 
<div class="cloud-wrapper">
 
<h2>Deploying GWS with OpenShift Platform</h2>
 
<div class="cloud-left">
 
  
* Copy your configuration to '''~/.kube/config'''.
+
# Validate your Kubernetes credentials:
* Open a shell session.
+
#* Follow the registration web-UI steps. and type <tt>gcloud container clusters list</tt> command to see all GKE clusters available to you, if any.
* Type  <tt>kubectl get nodes</tt> to list the nodes in your cluster.
+
<ol start="2" style="list-style-type: decimal;">
* Type <tt>cd gws-microservices/production/premise/kubernetes</tt> to go to the '''kubernetes''' directory.
+
<li> <p>Unpack the ''gws-microservices''.tgz file with the following command:<br />
* Create your own environment configuration file and put it to '''env-examples''' directory. Or use the ones available.
+
<tt>tar -zxf ''gws-microservices''.tgz</tt></p></li></ol>
** Type <tt>. env-examples/<YOUR ENVIRONMENT SOURCE FILE></tt> to source the cluster environment variables.
 
* Import GWS-applications docker images to your container registry or add the GWS registry keys to '''/etc/docker.d'''.
 
** Get the registry keys and add them to '''/etc/docker.d''' on all hosts.
 
* Restart docker.
 
</div>
 
</div>
 
 
|-|
 
Google Kubernetes Engine=
 
<div class="cloud-wrapper">
 
<h2>Deploying GWS with Google Kubernetes Engine</h2>
 
<div class="cloud-left">
 
* Follow the registration web-UI steps.
 
* Open a shell session.
 
* Type <tt>gcloud container clusters list</tt> to list existing clusters for running containers.
 
* Type <tt>cd gws-microservices/production/premise/kubernetes</tt>  to go to the '''kubernetes''' directory.
 
* Create your own environment configuration file and put it to "env-examples" directory. Or use the ones available.
 
* Type <tt>. env-examples/<YOUR ENVIRONMENT SOURCE FILE></tt> to source the cluster environment variables.
 
**  Import GWS-applications docker images to your container registry or add the GWS registry keys to '''/etc/docker.d'''.
 
* Get the GWS-microservices docker images tarball via any Genesys supply channel and import it to Google Container Registry: <tt>TARBALL=/full/path/to/GWS/apps/tarball push-containers-to-gke.sh</tt>
 
  
</div>
+
<ol start="3" style="list-style-type: decimal;">
</div>
+
<li><p>Go to the '''kubernetes''' directory:<br />
 +
<tt>cd gws-microservices/kubernetes</tt>
 +
</p></li></ol>
  
+
<ol start="4" style="list-style-type: decimal;">
</tabber>
+
<li><p>Modify the '''''&lt;ToBeChanged: …''&gt;''' values defined in the '''conf/gke.env''' file with the actual values required by deployment.</p></li>
<div style="clear: both;"> </div>
+
<li><p>Apply the modified configuration file to the current bash session:<br />
 +
<tt>source conf/gke.env</tt>
 +
</p></li></ol>
 +
<ol start="6" style="list-style-type: decimal;">
 +
<li><p>Deploy the monitoring stack using '''gws-monitoring-deploy.sh''' script'''.''' The script will deploy Prometheus and Grafana solutions at your Kubernetes cluster.</p></li>
 +
<li><p>Deploy GWS infrastructure using '''gws-infra-deploy.sh''' script'''.''' The script will deploy GWS dependency servers - ElasticSearch, Redis, Consul, etc., at your Kubernetes cluster.</p></li>
 +
<li><p>Deploy GWS microservices using '''gws-app-deploy.sh''' script.</p></li>
 +
<li><p>Initialize GWS using '''gws-postinstall.sh''' script. The script uses GWS REST API to provision environment, contact center, and authentication client.</p></li></ol>
  
{{NoteFormat|{{Editgrn_open}}XR: Is there a sequence to be followed? What needs to be deployed first?{{Editgrn_close}}|}}
+
== Upgrade Procedure ==
  
=== Deploying GWS Infrastructure===
+
<ol style="list-style-type: decimal;">
{{Editgrn_open}}XR: Should we delete first before deploying?{{Editgrn_close}}
+
<li><p>Download new version of '''gws-microservices.tgz''' package from Genesys FTP to the deployment host.</p></li>
<pre>
+
<li><p>Unpack the ''gws-microservices''.tgz file with the following command:<br />
./gws-infra-deploy.sh delete
+
<tt> tar -zxf gws-microservices.tgz</tt>
./gws-infra-deploy.sh
+
</p></li>
</pre>
+
<li><p>Go to the '''kubernetes''' directory:<br />
 
+
<tt>cd gws-microservices/kubernetes</tt></p></li>
=== Deploying  GWS Application Stack===
+
<li><p>Modify the '''&lt;ToBeChanged: …&gt;''' values defined in the '''conf/gke.env''' file with the actual values required by deployment. Refer to the file used in deployment.</p></li>
<pre>
+
<li><p>Apply the modified configuration file to the current bash session:<br />
./gws-app-deploy.sh delete
+
<tt>source conf/gke.env</tt></p></li>
./gws-app-deploy.sh
+
<li><p>Upgrade GWS microservices using '''gws-app-deploy.sh''' script.</p></li></ol>
</pre>
 
 
 
=== Deploying  Prometheus and Grafana ===
 
{{NoteFormat|These services are deployed cluster-wide and do not depend on GWS-applications' loads. }}
 
<pre>
 
$ ./monitoring-deploy.sh delete
 
$ ./monitoring-deploy.sh
 
</pre>
 
 
 
=== Pulling Current GWS Applications Container ===
 
 
 
<pre>
 
$ STACK_DOCKER_IMAGE_PATH=gws-registry-usw1.genhtcc.com ./pull-containers.sh
 
</pre>
 
 
 
[[Category:V:HTCC:9.0.0]]
 
  
  
 
[[Category:V:HTCC:9.0.0]]
 
[[Category:V:HTCC:9.0.0]]

Revision as of 06:26, November 29, 2018

Deployment procedure

Prerequisites

  1. Kubernetes cluster deployed and available. The following Kubernetes distributions are currently supported:
    • Google Kubernetes Engine (GKE).
  2. Client-side utilities installed at deployment host:
    • Kubectl tool
    • Helm client, Tiller is not required.
    • gcloud utility (for GKE deployments)
  3. Valid credentials for your Kubernetes cluster.
  4. The gws-microservices.tgz package downloaded from Genesys FTP to the deployment host.
  5. Images of GWS components uploaded into target Kubernetes registry.

Configuring GWS in Configuration Server

Use Genesys Administrator to configure Applications and Users for Genesys Web Services and Applications.

  1. Configure (or use existing) super administrator account. It will be used by GWS to connect and perform read and write operations.
  2. Create an application of type Genesys Generic Server. Suggested name is GWS.
  3. For this application, add connections to Config Server, TServer (SIPServer), StatServer. In the Advanced tab of Connection in Application parameters, add the following locations, e.g. locations=/USW2 - as configured in environment variable, GWS_REGION.
  4. Create an application of type, Genesys Generic Client. Suggested name is GWS_app.
  5. Add a connection to the Genesys Generic Server application created in Step 2.

Deployment Steps

  1. Validate your Kubernetes credentials:
    • Follow the registration web-UI steps. and type gcloud container clusters list command to see all GKE clusters available to you, if any.
  1. Unpack the gws-microservices.tgz file with the following command:
    tar -zxf gws-microservices.tgz

  1. Go to the kubernetes directory:
    cd gws-microservices/kubernetes

  1. Modify the <ToBeChanged: …> values defined in the conf/gke.env file with the actual values required by deployment.

  2. Apply the modified configuration file to the current bash session:
    source conf/gke.env

  1. Deploy the monitoring stack using gws-monitoring-deploy.sh script. The script will deploy Prometheus and Grafana solutions at your Kubernetes cluster.

  2. Deploy GWS infrastructure using gws-infra-deploy.sh script. The script will deploy GWS dependency servers - ElasticSearch, Redis, Consul, etc., at your Kubernetes cluster.

  3. Deploy GWS microservices using gws-app-deploy.sh script.

  4. Initialize GWS using gws-postinstall.sh script. The script uses GWS REST API to provision environment, contact center, and authentication client.

Upgrade Procedure

  1. Download new version of gws-microservices.tgz package from Genesys FTP to the deployment host.

  2. Unpack the gws-microservices.tgz file with the following command:
    tar -zxf gws-microservices.tgz

  3. Go to the kubernetes directory:
    cd gws-microservices/kubernetes

  4. Modify the <ToBeChanged: …> values defined in the conf/gke.env file with the actual values required by deployment. Refer to the file used in deployment.

  5. Apply the modified configuration file to the current bash session:
    source conf/gke.env

  6. Upgrade GWS microservices using gws-app-deploy.sh script.

Comments or questions about this documentation? Contact us for support!