Deploying GCXI using OpenShift
Beginning with release 9.0.016, Genesys CX Insights supports deployment using Red Hat OpenShift.
Prerequisites for deploying using OpenShift
This page provides an outline, illustrating one scenario to help you visualize the overall process. Genesys does not provide support for OpenShift or other third party products, so you must have knowledge of OpenShift and other products to complete this installation. GCXI supports OpenShift Cluster 4.5.16, which is described on this page.
The following prerequisites apply:
- Your OpenShift cluster must be configured and running in a suitable environemnt, with nodes in Ready state.
- OpenShift client and Helm-3 are installed on the host where the deployment will run.
- The images gcxi and gcxi_control are loaded and tagged on each OpenShift worker node.
- On each worker node, ensure that values are set for kernel.sem, vm.max_map_count, as required by MicroStrategy. For example:
echo "kernel.sem = 250 1024000 250 4096" >> /etc/sysctl.conf echo "vm.max_map_count = 5242880" >> /etc/sysctl.conf sysctl -p
Procedure: 1. Preconfiguration steps
Purpose: Prepare the environment for deployment.
Steps
- Ensure that the GCXI project has been created. (Writer's Note: Steps? What's this?)
- Ensure that four NFS PersistentVolume (PV) have been created, as described in Deploying GCXI using Helm.
- Ensure that four NFS PersistentVolumeClaim (PBC) with the following names have been created in the gcxi workspace, as described in Deploying GCXI using Helm:
- gcxi-backup-pvc
- gcxi-log-pvc
- gcxi-postgres-pvc
- gcxi-share-pvc
- To configure OpenShift Security Context Constraints to allow pods to run under non-root user with UID=500, configure the following users inside the GCXI container:
root:root (0:0) genesys:genesys (500:500)
- You can use either of these users to run the container. Running it with any other user causes an error such as:
"500 is not an allowed group spec.containers[0].securityContext.securityContext.runAsUser: Invalid value: 500: must be in the ranges: [1000570000, 1000579999]]"
- Genesys recommends the preceding method all production environments. For test environments, execute the following command if you wish to run pods as any user:
oc adm policy add-scc-to-user anyuid -z default
Procedure: 2. Prepare
Purpose: Prepare the environment, and gather files needed for deployment.
Steps
- On the Control plane node, create a folder: helm.
- Download the tar.gz archive of Helm charts into helm folder, and extract the archive in a subfolder called helm/gcxi.
- Delete the following helm templates from the template subfolder &mdash they are not needed, since as PVCs are already created in our environment:
- gcxi-backup-pvc.yaml
- gcxi-log-pvc.yaml
- gcxi-postgres-pvc.yaml
- gcxi-share-pvc.yaml
- View the file helm/gcxi/Chart.yaml, and ensure that the values for version and appVersion match helm version installed in your environment.
- Open the file helm/gcxi/values.yaml, and follow the instructions it provides to guide you in creating a new file, values-test.yaml with appropriate settings. Save the new file in the helm folder.
- For example, the following content in the values-test.yaml file is appropriate for a simple deployment using PostgreSQL inside the container, and local PersistentVolume type. Create appropriate content in the values-test.yaml file for your environment:
gcxi: env: GCXI_GIM_DB: DSNDEF: DSN_NAME=GCXI_GIM_DB;DB_TYPE=POSTGRESQL;DB_TYPE_EX=PostgreSQL;HOST=gi2-qadb.us.int.genesyslab.com;PORT=5432;DB_NAME=gim85test2voice;LOGIN=;PASSWORD=;DRV_TYPE=JDBC;GCXI_QENGINE=ON LOGIN: gim85test2voice PASSWORD: gim85test2voice IWD_DB: DSNDEF: DSN_NAME=IWD_DB;DB_TYPE=POSTGRESQL;DB_TYPE_EX=PostgreSQL;HOST=spb-esrv-atest4;PORT=5432;DB_NAME=dm_gcxi;LOGIN=;PASSWORD=;DRV_TYPE=JDBC;GCXI_QENGINE=ON LOGIN: genesys PASSWORD: genesys deployment: deployPostgres: true deployLocalPV: true deployNamespace: true useDynamicLogPV: false imagePullPolicy: worker: IfNotPresent control: IfNotPresent replicas: worker: 1 images: postgres: version: 11 # repository: sdocker-registry.genhtcc.com # repository: genesys-local.jfa.genesyslab.com/gcxi
Procedure: 3. Deploy
Steps
- Execute the following command to log in to OpenShift cluster from the host where you will run deployment.
oc login --token <token> --server <url of api server>- Execute the following command to make the GCXI project the default:
oc project gcxi- For debug purposes, execute the following command to render templates without installing:
helm template --debug -f values-test.yaml gcxi-helm gcxi/
Kubernetes descriptors are displayed. The values you see generated from Helm templates, and based on settings from values.yaml.
- Review the descriptors. You should not see any errors; you will later apply this configuration to your Kubernetes cluster.
- Execute the following command to deploy Helm:
helm install --debug -f values-test.yaml gcxi-oc gcxi/
- This process takes several minutes. Wait until all objects are created and allocated, and the Kubernetes descriptors applied to the environment appear.
- To check the installed Helm release, execute the following command:
helm list
- To check the Operating System status, execute the following command:
os status
- To check GCXI OpenShift objects created by Helm, execute the following command:
oc get all
Procedure: Troubleshooting
Purpose: Use the instructions in this section only f you encounter errors or other difficulties.
Steps
Problems with the deployment are most often associated with the following three kinds of objects:
- PVs
- PVCs
- pods
- To list the objects that might cause problems, execute the following commands:
kubectl get pv -o wide
kubectl get pvc -o wide
kubectl get po -o wide
- Examine the output from each get command.
- If any of the objects have a non-ready state (for example, Unbound (PVCs only), Pending, or CrashLoop) execute the following command to inspect the object more closely using oc describe:
kubectl describe <type> <name>
- For example:
describe pod gcxi-0
kubectl describe po gcxi-0
- In the describe output, inspect the section Events.
Procedure: Uninstall GCXI
Purpose: To remove GCXI
Steps
- To remove GCXI, execute the following command:
helm uninstall gcxi-oc
