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
Open the redis shell
BASHkubectl exec -n ef-external -it redis-master-0 -- redis-cli -a Expertflow123Run the following command inside the redis shell
BASHflushallVerify if redis is flushed. Run the following command in the redis shell, it should return
(empty array)responseCODEkeys *Enter
ctrl + cto get out of the redis shell
Uninstall Current Release
Navigate to the
cim-solution/kubernetesfolder in the current releaseBASHcd cim-solution/kubernetesDelete Stateful Set (AMQ)
CODEkubectl delete -f cim/StatefulSet/ef-amq-statefulset.yamlDelete Config Maps
Delete Agent Desk translations ConfigMap
BASHkubectl -n expertflow delete configmap ef-app-translations-cmDelete Conversation Controller’s Config Maps
BASHkubectl -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-cmDelete other ConfigMaps
BASHkubectl delete -f cim/ConfigMaps/
Delete Deployments
BASHkubectl delete -f cim/Deployments/Delete Services
CODEkubectl delete -f cim/Services/Delete Ingresses (Run only one of the following commands)
If you are using nginx
BASHkubectl delete -f cim/Ingresses/nginx/If you are using traefik
BASHkubectl delete -f cim/Ingresses/traefik/
Uninstall Rasa-X (If installed)
BASHhelm uninstall rasa-x -n rasa-x
Backup Current Release’s Files
Navigate to the parent directory where the
cim-solutionfolder is placedBASHcd ../..Change the folder’s name to
cim-solution-oldBASHmv cim-solution cim-solution-old
Download New Release
Clone the new
CX-4.5releaseBASHgit clone -b CX-4.5 https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/cim/cim-solution.gitNavigate to the
cim-solution/kubernetesfolder in the newly cloned releaseBASHcd cim-solution/kubernetes
Update FQDN
In the following commands replace <FQDN> with your actual FQDN e.g. cim.expertflow.com
Update FQDN in the new release’s core installation files
BASHsed -i 's/devops[0-9]*.ef.com/<FQDN>/g' cim/ConfigMaps/* pre-deployment/grafana/* pre-deployment/keycloak/* cim/Ingresses/nginx/* cim/Ingresses/traefik/*Update FQDN in the new release’s rasa-x installation files
BASHsed -i -e 's@value: http://devops.ef.com/bot-framework@value: https://<FQDN>/bot-framework@' external/rasa-x/values-small.yamlBASHsed -i -e 's@value: https://devops.ef.com@value: https://<FQDN>@' external/rasa-x/values-small.yaml
Update MongoDB Application Data
Copy the upgrade script to the mongo container
BASHkubectl -n ef-external cp scripts/mongo/4.4-4.5_upgrade.js mongo-mongodb-0:/tmp/4.4-4.5_upgrade.jsExecute the script
BASHkubectl -n ef-external exec -ti mongo-mongodb-0 -- mongosh --file /tmp/4.4-4.5_upgrade.js
Update Reporting Connector
Delete the reporting connector’s current CronJob
BASHkubectl delete -f pre-deployment/reportingConnector/ef-reporting-connector-cron.yaml -n expertflow(Important) Run the MySQL database update script present in
pre-deployment/reportingConnector/dbScripts/dbupdatedirectory to get the latest database schema.Replace the reporting connector config files from
cim-solution-oldtocim-solutionNavigate to the parent directory where the
cim-solutionandcim-solution-oldfolders are placedBASHcd ../..Copy the
reporting-connector.conffile fromcim-solution-oldfolder tocim-solutionfolderBASHcp cim-solution-old/kubernetes/pre-deployment/reportingConnector/reporting-connector.conf cim-solution/kubernetes/pre-deployment/reportingConnectorNavigate back to the
cim-solution/kubernetesfolderBASHcd cim-solution/kubernetes
(Optional) Configure reporting components connection with MySQL over SSL
Run the following commands to make the changes
BASHkubectl -n expertflow delete configmap ef-reporting-connector-confBASHkubectl -n expertflow create configmap ef-reporting-connector-conf --from-file=pre-deployment/reportingConnector/reporting-connector.confYou can specify the schedule for your cron job by setting the parameter
schedule: "*/5 * * * *"inpre-deployment/reportingConnector/ef-reporting-connector-cron.yamlfile 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.Apply the reporting connector cron job.
BASHkubectl apply -f pre-deployment/reportingConnector/ef-reporting-connector-cron.yaml -n expertflow
Update Grafana
Replace the Grafana config files from
cim-solution-oldtocim-solutionNavigate to the parent directory where the
cim-solutionandcim-solution-oldfolders are placedBASHcd ../../Copy the
supervisor-dashboards/datasource.ymlfile fromcim-solution-oldfolder tocim-solutionfolderBASHcp cim-solution-old/kubernetes/post-deployment/config/grafana/supervisor-dashboards/datasource.yml cim-solution/kubernetes/post-deployment/config/grafana/supervisor-dashboards/datasource.ymlNavigate back to the
cim-solution/kubernetesfolderBASHcd cim-solution/kubernetes
Completely uninstall grafana using the commands in the grafana section. Link to uninstallation guide.
Install grafana using the installation guide.
Delete Scheduler Database
Open the database shell
Run the following command
BASHhelm -n ef-external status ef-postgresqlFollow 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.
In the database shell execute the following command to delete the
schedulerdatabaseBASHDROP DATABASE IF EXISTS scheduler;Verify if database is deleted;
schedulardatabase should not appear after running the following command in the database shellBASH\l+Enter
\qto get out of the database shell
Update Static Resources
Run the following commands to load the latest application icons and other media files
kubectl apply -f scripts/minio-helper.yaml
kubectl -n ef-external --timeout=90s wait --for=condition=ready pod minio-helper
kubectl -n ef-external cp post-deployment/data/minio/bucket/default minio-helper:/tmp/
kubectl -n ef-external cp scripts/icon-helper.sh minio-helper:/tmp/
kubectl -n ef-external exec -it minio-helper -- /bin/sh /tmp/icon-helper.sh
kubectl delete -f scripts/minio-helper.yaml
Install Rasa-X
Install Rasa-x
BASHhelm upgrade --install=true --wait=true --timeout=10m0s --debug rasa-x --namespace rasa-x --values external/rasa-x/values-small.yaml external/rasa-xAfter Installation, configure Rasa-X again using this configuration guide.
Install CX-Core Components
Apply ConfigMaps
Apply ConfigMaps for Conversation Controller
BASHkubectl -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__Apply CRM ConfigMap for Agent Desk
BASHkubectl -n expertflow create configmap ef-crm-service-cm --from-file=pre-deployment/crm-service/Apply Agent Desk translations ConfigMap
CODEkubectl -n expertflow create configmap ef-app-translations-cm --from-file=pre-deployment/app-translations/unified-agent/i18nApply other ConfigMaps
BASHkubectl apply -f cim/ConfigMaps/
Apply Stateful Set (AMQ)
BASHkubectl apply -f cim/StatefulSet/ef-amq-statefulset.yamlWait for the AMQ StatefulSet to be ready
BASHkubectl wait pods ef-amq-0 -n ef-external --for condition=Ready --timeout=600sApply Services
CODEkubectl apply -f cim/Services/Apply Deployments
BASHkubectl apply -f cim/Deployments/Apply Ingresses (Run only one of the following commands)
If you are using nginx
BASHkubectl apply -f cim/Ingresses/nginxIf you are using traefik
BASHkubectl 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)
It requires the targeted Keycloak Realm already setup along with Keycloak Client.
Create a new namespace named
cx-voiceBASHkubectl create namespace cx-voiceApply imagePullSecret
BASHkubectl apply -f voice/pre-deployment/registryCredits/ef-imagePullSecret-cx-voice.yamlEdit 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:
BASHvi voice/cisco/cisco-teams-sync/config-map/ef-cisco-team-synchronizer-cm.yamlApply config-map and job
BASHkubectl apply -f voice/cisco/cisco-teams-sync/config-map/BASHkubectl 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
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
If everything worked fine until this point, you may remove the
cim-solution-oldfolderNavigate to the parent directory where the
cim-solution-oldfolder is placedBASHcd ../..Remove the
cim-solution-oldfolderBASHrm -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.