Skip to main content
Skip table of contents

CX Upgrade Guide CX-4.4.x to CX-4.5

The upgrade must be done while the system is inactive. Active state of the system is removed as the application's Object model is changed.

There are significant changes to the Object Model. It is highly recommended to take a backup of existing databases (Mongo, PostgreSQL) before proceeding with the upgrade.

Remove Active State

  1. Open the redis shell

    BASH
    kubectl exec -n ef-external -it redis-master-0 -- redis-cli -a Expertflow123
  2. Run the following command inside the redis shell

    BASH
    flushall
  3. Verify if redis is flushed. Run the following command in the redis shell, it should return (empty array) response

    CODE
    keys *
  4. Enter ctrl + c to get out of the redis shell

Uninstall Current Release

  1. Navigate to the cim-solution/kubernetes folder in the current release

    BASH
    cd cim-solution/kubernetes
  2. Delete Stateful Set (AMQ)

    CODE
    kubectl delete -f cim/StatefulSet/ef-amq-statefulset.yaml
  3. Delete Config Maps

    1. Delete Agent Desk translations ConfigMap

      BASH
      kubectl -n expertflow delete configmap ef-app-translations-cm
    2. Delete Conversation Controller’s Config Maps

      BASH
      kubectl -n expertflow delete configmap ef-conversation-controller-actions-cm
      kubectl -n expertflow delete configmap ef-conversation-controller-actions-pycache-cm
      kubectl -n expertflow delete configmap ef-conversation-controller-actions-utils-cm 
    3. Delete other ConfigMaps

      BASH
      kubectl delete -f cim/ConfigMaps/
  4. Delete Deployments

    BASH
    kubectl delete -f cim/Deployments/
  5. Delete Services

    CODE
    kubectl delete -f cim/Services/
  6. Delete Ingresses (Run only one of the following commands)

    1. If you are using nginx

      BASH
      kubectl delete -f cim/Ingresses/nginx/
    2. If you are using traefik

      BASH
      kubectl delete -f cim/Ingresses/traefik/
  7. Uninstall Rasa-X (If installed)

    BASH
    helm uninstall rasa-x -n rasa-x

Backup Current Release’s Files

  1. Navigate to the parent directory where the cim-solution folder is placed

    BASH
    cd ../..
  2. Change the folder’s name to cim-solution-old

    BASH
    mv cim-solution cim-solution-old

Download New Release

  1. Clone the new CX-4.5 release

    BASH
    git clone -b CX-4.5 https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/cim/cim-solution.git
  2. Navigate to the cim-solution/kubernetes folder in the newly cloned release

    BASH
    cd cim-solution/kubernetes

Update FQDN

In the following commands replace <FQDN> with your actual FQDN e.g. cim.expertflow.com

  1. Update FQDN in the new release’s core installation files

    BASH
    sed -i 's/devops[0-9]*.ef.com/<FQDN>/g' cim/ConfigMaps/* pre-deployment/grafana/* pre-deployment/keycloak/* cim/Ingresses/nginx/* cim/Ingresses/traefik/*
  2. Update FQDN in the new release’s rasa-x installation files

    BASH
    sed -i -e 's@value: http://devops.ef.com/bot-framework@value: https://<FQDN>/bot-framework@' external/rasa-x/values-small.yaml
    BASH
    sed -i -e 's@value: https://devops.ef.com@value: https://<FQDN>@' external/rasa-x/values-small.yaml

Update MongoDB Application Data

  1. Copy the upgrade script to the mongo container

    BASH
    kubectl -n ef-external cp scripts/mongo/4.4-4.5_upgrade.js mongo-mongodb-0:/tmp/4.4-4.5_upgrade.js
  2. Execute the script

    BASH
    kubectl -n ef-external exec -ti mongo-mongodb-0 -- mongosh --file /tmp/4.4-4.5_upgrade.js

Update Reporting Connector

  1. Delete the reporting connector’s current CronJob

    BASH
    kubectl delete -f pre-deployment/reportingConnector/ef-reporting-connector-cron.yaml -n expertflow
  2. (Important) Run the MySQL database update script present in pre-deployment/reportingConnector/dbScripts/dbupdate directory to get the latest database schema.

  3. Replace the reporting connector config files from cim-solution-old to cim-solution

    1. Navigate to the parent directory where the cim-solution and cim-solution-old folders are placed

      BASH
      cd ../..
    2. Copy the reporting-connector.conf file from cim-solution-old folder to cim-solution folder

      BASH
      cp cim-solution-old/kubernetes/pre-deployment/reportingConnector/reporting-connector.conf cim-solution/kubernetes/pre-deployment/reportingConnector
    3. Navigate back to the cim-solution/kubernetes folder

      BASH
      cd cim-solution/kubernetes
  4. (Optional) Configure reporting components connection with MySQL over SSL

    1. To configure the reporting connector with MySQL over SSL, consult this guide

    2. To configure Superset with MySQL over SSL, refer to the Superset SSL Configuration section of this guide.

  5. Run the following commands to make the changes

    BASH
    kubectl -n expertflow delete configmap ef-reporting-connector-conf
    BASH
    kubectl -n expertflow create configmap ef-reporting-connector-conf --from-file=pre-deployment/reportingConnector/reporting-connector.conf
  6. You can specify the schedule for your cron job by setting the parameter schedule: "*/5 * * * *" in pre-deployment/reportingConnector/ef-reporting-connector-cron.yaml file where the value '5' is a default time which corresponds to the interval in minutes. Replace the value by replacing '5' with your specified minutes.

  7. Apply the reporting connector cron job.

    BASH
    kubectl apply -f pre-deployment/reportingConnector/ef-reporting-connector-cron.yaml -n expertflow

Update Grafana

  1. Replace the Grafana config files from cim-solution-old to cim-solution

    1. Navigate to the parent directory where the cim-solution and cim-solution-old folders are placed

      BASH
      cd ../../
    2. Copy the supervisor-dashboards/datasource.yml file from cim-solution-old folder to cim-solution folder

      BASH
      cp cim-solution-old/kubernetes/post-deployment/config/grafana/supervisor-dashboards/datasource.yml cim-solution/kubernetes/post-deployment/config/grafana/supervisor-dashboards/datasource.yml
    3. Navigate back to the cim-solution/kubernetes folder

      BASH
      cd cim-solution/kubernetes
  1. Completely uninstall grafana using the commands in the grafana section. Link to uninstallation guide.

  2. Install grafana using the installation guide.

Delete Scheduler Database

  1. Open the database shell

    1. Run the following command

      BASH
      helm -n ef-external status ef-postgresql
    2. Follow these steps to connect to the database shell

      BASH
      # The above command will return some steps to connect to postgresql client.
      
      # Step 1
      # Execute the command returned after the text "To get the password for "postgres" run:"
      # It should be starting with keyword "export"
      
      # Step 2
      # Execute the next command returned after the text "To get the password for "sa" run:"
      # It should be starting with keyword "export"
      
      # Step 3
      # Execute the next command returned after the text "To connect to your database run the following command:"
      # It would be in 3 lines, copy and paste all of it and press enter to execute it. 
  2. In the database shell execute the following command to delete the scheduler database

    BASH
    DROP DATABASE IF EXISTS scheduler;
  3. Verify if database is deleted; schedular database should not appear after running the following command in the database shell

    BASH
    \l+
  4. Enter \q to get out of the database shell

Update Static Resources

Run the following commands to load the latest application icons and other media files

BASH
kubectl apply -f scripts/minio-helper.yaml
BASH
kubectl -n ef-external --timeout=90s wait --for=condition=ready pod minio-helper
BASH
kubectl -n ef-external cp post-deployment/data/minio/bucket/default minio-helper:/tmp/
BASH
kubectl -n ef-external cp scripts/icon-helper.sh minio-helper:/tmp/
BASH
kubectl -n ef-external exec -it minio-helper -- /bin/sh /tmp/icon-helper.sh
BASH
kubectl delete -f scripts/minio-helper.yaml

Install Rasa-X

  1. Install Rasa-x

    BASH
    helm upgrade --install=true --wait=true --timeout=10m0s --debug rasa-x --namespace rasa-x --values external/rasa-x/values-small.yaml external/rasa-x
  2. After Installation, configure Rasa-X again using this configuration guide.

Install CX-Core Components

  1. Apply ConfigMaps

    1. Apply ConfigMaps for Conversation Controller

      BASH
      kubectl -n expertflow create configmap ef-conversation-controller-actions-cm --from-file=pre-deployment/conversation-Controller/actions
      kubectl -n expertflow create configmap ef-conversation-controller-actions-utils-cm --from-file=pre-deployment/conversation-Controller/utils
      kubectl -n expertflow create configmap ef-conversation-controller-actions-pycache-cm --from-file=pre-deployment/conversation-Controller/__pycache__
    2. Apply CRM ConfigMap for Agent Desk

      BASH
      kubectl -n expertflow create configmap ef-crm-service-cm --from-file=pre-deployment/crm-service/
    3. Apply Agent Desk translations ConfigMap

      CODE
      kubectl -n expertflow  create configmap ef-app-translations-cm --from-file=pre-deployment/app-translations/unified-agent/i18n
    4. Apply other ConfigMaps

      BASH
      kubectl apply -f cim/ConfigMaps/
  2. Apply Stateful Set (AMQ)

    BASH
    kubectl apply -f cim/StatefulSet/ef-amq-statefulset.yaml
  3. Wait for the AMQ StatefulSet to be ready

    BASH
    kubectl wait pods ef-amq-0 -n ef-external --for condition=Ready --timeout=600s
  4. Apply Services

    CODE
    kubectl apply -f cim/Services/
  5. Apply Deployments

    BASH
    kubectl apply -f cim/Deployments/
  6. Apply Ingresses (Run only one of the following commands)

    1. If you are using nginx

      BASH
      kubectl apply -f cim/Ingresses/nginx
    2. If you are using traefik

      BASH
      kubectl apply -f cim/Ingresses/traefik

Install Cisco Teams Sync CronJob

To Login a Cisco Agent in CX-4.5, this CronJob is compulsory to run. (New in CX-4.5)

  1. It requires the targeted Keycloak Realm already setup along with Keycloak Client.

  1. Create a new namespace named cx-voice

    BASH
    kubectl create namespace cx-voice
  2. Apply imagePullSecret

    BASH
    kubectl apply -f voice/pre-deployment/registryCredits/ef-imagePullSecret-cx-voice.yaml
  3. Edit the config-map file to configure the values of KeyCloak instance and Finesse Instance.

    File containing all the env variable and their configuration needed to setup sync job: configuration of env variables.

    Make changes in the following file:

    BASH
    vi voice/cisco/cisco-teams-sync/config-map/ef-cisco-team-synchronizer-cm.yaml
  4. Apply config-map and job

    BASH
    kubectl apply -f voice/cisco/cisco-teams-sync/config-map/
    BASH
    kubectl apply -f voice/cisco/cisco-teams-sync/job/

This Cron Job will take 15 minutes to start for the first time. Wait for the cron job to start to login a Cisco Agent

See if the cron job has started

BASH
kubectl -n cx-voice get pods

Update Cisco-Voice

(Important) If you are using CX with Cisco, then before proceeding, you need to update the configs in the unified-agent config map. You need to add the finesse FQDN/IP in the configMaps under the finesseURLForAgent environment variable. For variable details, this guide can be referred to.

Update CX-Voice

(Important) If you are using our native CX-Voice, then before proceeding, you need to update the voice platform installation files which are deployed separately from CX installation at the moment. Please contact the support team to update the voice platform installation that is compatible with CX-4.5.

Post Upgrade Notes

  • (Important) Logout and then Login all agents again before using the application after upgrade.

Delete Old Release Files 

Destructive command. Make sure the upgrade is successful before removing the old release files. They may be required to revert back to the old release in case of failure

  1. If everything worked fine until this point, you may remove the cim-solution-old folder

    1. Navigate to the parent directory where the cim-solution-old folder is placed

      BASH
      cd ../..
    2. Remove the cim-solution-old folder

      BASH
      rm -rf cim-solution-old

New Channel Connectors:

We introduced the following new channel connectors in CX-4.5. Please refer to the following configuration guides.

  1. Twitter Social Media Configuration guide

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.