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 Expertflow123
Run the following command inside the redis shell
BASHflushall
Verify if redis is flushed. Run the following command in the redis shell, it should return
(empty array)
responseCODEkeys *
Enter
ctrl + c
to get out of the redis shell
Uninstall Current Release
Navigate to the
cim-solution/kubernetes
folder in the current releaseBASHcd cim-solution/kubernetes
Delete Stateful Set (AMQ)
CODEkubectl delete -f cim/StatefulSet/ef-amq-statefulset.yaml
Delete Config Maps
Delete Agent Desk translations ConfigMap
BASHkubectl -n expertflow delete configmap ef-app-translations-cm
Delete 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-cm
Delete 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-solution
folder is placedBASHcd ../..
Change the folder’s name to
cim-solution-old
BASHmv cim-solution cim-solution-old
Download New Release
Clone the new
CX-4.5
releaseBASHgit clone -b CX-4.5 https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/cim/cim-solution.git
Navigate to the
cim-solution/kubernetes
folder 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.yaml
BASHsed -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.js
Execute 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/dbupdate
directory to get the latest database schema.Replace the reporting connector config files from
cim-solution-old
tocim-solution
Navigate to the parent directory where the
cim-solution
andcim-solution-old
folders are placedBASHcd ../..
Copy the
reporting-connector.conf
file fromcim-solution-old
folder tocim-solution
folderBASHcp cim-solution-old/kubernetes/pre-deployment/reportingConnector/reporting-connector.conf cim-solution/kubernetes/pre-deployment/reportingConnector
Navigate back to the
cim-solution/kubernetes
folderBASHcd 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-conf
BASHkubectl -n expertflow create configmap ef-reporting-connector-conf --from-file=pre-deployment/reportingConnector/reporting-connector.conf
You can specify the schedule for your cron job by setting the parameter
schedule: "*/5 * * * *"
inpre-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.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-old
tocim-solution
Navigate to the parent directory where the
cim-solution
andcim-solution-old
folders are placedBASHcd ../../
Copy the
supervisor-dashboards/datasource.yml
file fromcim-solution-old
folder tocim-solution
folderBASHcp cim-solution-old/kubernetes/post-deployment/config/grafana/supervisor-dashboards/datasource.yml cim-solution/kubernetes/post-deployment/config/grafana/supervisor-dashboards/datasource.yml
Navigate back to the
cim-solution/kubernetes
folderBASHcd 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-postgresql
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.
In the database shell execute the following command to delete the
scheduler
databaseBASHDROP DATABASE IF EXISTS scheduler;
Verify if database is deleted;
schedular
database should not appear after running the following command in the database shellBASH\l+
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
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-x
After 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/i18n
Apply other ConfigMaps
BASHkubectl apply -f cim/ConfigMaps/
Apply Stateful Set (AMQ)
BASHkubectl apply -f cim/StatefulSet/ef-amq-statefulset.yaml
Wait for the AMQ StatefulSet to be ready
BASHkubectl wait pods ef-amq-0 -n ef-external --for condition=Ready --timeout=600s
Apply 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/nginx
If 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-voice
BASHkubectl create namespace cx-voice
Apply imagePullSecret
BASHkubectl apply -f voice/pre-deployment/registryCredits/ef-imagePullSecret-cx-voice.yaml
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:
BASHvi voice/cisco/cisco-teams-sync/config-map/ef-cisco-team-synchronizer-cm.yaml
Apply 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-old
folderNavigate to the parent directory where the
cim-solution-old
folder is placedBASHcd ../..
Remove the
cim-solution-old
folderBASHrm -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.