Skip to main content
Skip table of contents

Upgrade Guide CX4.10.3 to CX5.0 (Single Tenant/On-Prem)

Before upgrading, ensure that the system is idle, i.e; all agents are logged out from the AgentDesk.

Make sure to FLUSH the Redis before proceeding with the upgrade

Database Migrations

Use the following script to migrate data in MongoDB: MTT_Mongo_Data_Migration_Script.js

Use this guide to run the above script.

Use the following script to migrate data for license manager in Postgresql: lis-manager-mtt-migration.sql

Follow these steps to execute the above SQL script

CODE
# Check PostgreSQL Helm release status
helm -n ef-external status ef-postgresql

# This will output some instructions. Follow the next steps based on that output.

# Get the password for "postgres"
# (Copy and run the command that starts with "export" shown after this line in the Helm output)
export POSTGRES_PASSWORD=<your_password>

# Get the password for "sa"
# (Copy and run the command that starts with "export" shown after this line in the Helm output)
export SA_PASSWORD=<your_password>

# Connect to PostgreSQL
# Copy the 3-line command shown in the Helm output after the text:
# "To connect to your database run the following command:"
# Example:
kubectl run ef-postgresql-client --rm --tty -i --restart='Never' \
  --namespace ef-external --image gitimages.expertflow.com/general/postgresql:14.5.0-debian-11-r21 \
  --env="PGPASSWORD=$POSTGRES_PASSWORD" --command -- psql \
  --host ef-postgresql -U postgres -d licenseManager

# Verify youโ€™re inside the PostgreSQL client
# You should now see a prompt like this:
# licenseManager=>
# If not, press Enter once.

# Copy your .sql script into the PostgreSQL pod (if itโ€™s on your local machine)
# Replace ef-postgresql-0 with the actual pod name if it differs.
kubectl cp ./lis-manager-mtt-migration.sql ef-postgresql-0:/tmp/lis-manager-mtt-migration.sql -n ef-external

# Inside the PostgreSQL client, execute your .sql script:
\i /tmp/lis-manager-mtt-migration.sql

# Verify that the table was created
\dt;

# Exit the PostgreSQL client
\q

Custom Configuration Strategy

For detailed guidelines on applying environment-specific configurations using custom values.yaml layering,

Refer to the CX Helm Chart Custom Configuration Strategy guide.

Refer to this guide to see the complete change log

1. Update Helm Repo

BASH
helm repo update expertflow

2. Clone the CX Repository on the Target Server

BASH
# Create 4.10.1_CLCC-173 directory from root
mkdir 4.10.1_CLCC-173

# Navigate to 4.10.1_CLCC-173
cd 4.10.1_CLCC-173

# Clone the 4.10.1_CLCC-173 branch of cim-solution repository
git clone -b 4.10.1_CLCC-173 https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/cim/cim-solution.git $HOME/4.10.1_CLCC-173

# Navigate to root (previous directory)
cd ..

3. Change Directory to the Current Deployment

BASH
cd CX-4.10.3/kubernetes

4. Apply Redis ACL Secret

BASH
kubectl -n ef-external create secret generic ef-redis-acl-secret --from-literal=superuser=Expertflow464

5. Deploy Redis

BASH
helm show values expertflow/redis --version 5.0-alpha > helm-values/ef-redis-custom-values.yaml
helm upgrade --install=true --namespace=ef-external --values=helm-values/ef-redis-custom-values.yaml redis expertflow/redis --version 5.0-alpha

6. Deploy ActiveMQ

BASH
helm show values expertflow/activemq --version 5.0-alpha > helm-values/ef-activemq-custom-values.yaml

7. Deploy Vault

BASH
helm show values expertflow/vault --version 5.0-alpha > helm-values/ef-vault-custom-values.yaml
helm uninstall -n vault vault

kubectl get secret mongo-mongodb-ca -n ef-external -o yaml | sed 's/namespace: ef-external/namespace: vault/' | kubectl create -f -

helm upgrade --install --namespace vault --create-namespace vault --debug --values helm-values/ef-vault-custom-values.yaml expertflow/vault --version 5.0-alpha

๐Ÿ”— Use the following guide: Vault Dynamic Database Configuration

8. Copy Schemas and Rule Files for Routing Engine

BASH
# Copy GraphQL schemas
cp -r ../../4.10.1_CLCC-173/kubernetes/pre-deployment/routing-engine/graphql/schemas pre-deployment/routing-engine/graphql/schemas

# Copy memory rules
cp ../../4.10.1_CLCC-173/kubernetes/pre-deployment/routing-engine/graphql/graphql-memory-rules.json pre-deployment/routing-engine/graphql/graphql-memory-rules.json

# Copy Redis rules
cp ../../4.10.1_CLCC-173/kubernetes/pre-deployment/routing-engine/graphql/graphql-redis-rules.json pre-deployment/routing-engine/graphql/graphql-redis-rules.json

9. Apply ConfigMaps for Routing Engine

BASH
kubectl create configmap -n expertflow routing-engine-graphql-schemas --from-file=./pre-deployment/routing-engine/graphql/schemas
kubectl create configmap -n expertflow routing-engine-graphql-memory-rules --from-file=./pre-deployment/routing-engine/graphql/graphql-memory-rules.json
kubectl create configmap -n expertflow routing-engine-graphql-redis-rules --from-file=./pre-deployment/routing-engine/graphql/graphql-redis-rules.json

10. Upgrade CX Core

BASH
helm upgrade --install --namespace expertflow --create-namespace ef-cx --debug --values helm-values/ef-cx-custom-values.yaml expertflow/cx --version 5.0-alpha

11. Upgrade Agent Desk

BASH
# Copy translation files
cp -r ../../4.10.1_CLCC-173/kubernetes/pre-deployment/app-translations/unified-agent/i18n pre-deployment/app-translations/unified-agent/i18n
CODE
kubectl -n expertflow delete configmap ef-app-translations-cm
CODE
kubectl -n expertflow create configmap ef-app-translations-cm --from-file=pre-deployment/app-translations/unified-agent/i18n
BASH
# Copy supervisor dashboard file
cp -r ../../4.10.1_CLCC-173/kubernetes/post-deployment/config/grafana/supervisor-dashboards/Supervisor_Dashboard_CIM.json

# Copy agent dashboard file
cp -r ../../4.10.1_CLCC-173/kubernetes/post-deployment/config/grafana/supervisor-dashboards/Agent_Dashboard_CIM.json
CODE
kubectl -n expertflow delete configmap ef-grafana-supervisor-dashboard
kubectl -n expertflow create configmap ef-grafana-supervisor-dashboard --from-file=post-deployment/config/grafana/supervisor-dashboards/Supervisor_Dashboard_CIM.json
CODE
kubectl -n expertflow delete configmap ef-grafana-agent-dashboard
kubectl -n expertflow create configmap ef-grafana-agent-dashboard --from-file=post-deployment/config/grafana/supervisor-dashboards/Agent_Dashboard_CIM.json
BASH
helm upgrade --install --namespace expertflow --set global.efCxReleaseName="ef-cx" cx-agent-desk --debug --values helm-values/cx-agent-desk-custom-values.yaml expertflow/agent-desk --version 5.0-alpha

12. Upgrade Channels

BASH
helm upgrade --install --namespace expertflow --set global.efCxReleaseName="ef-cx" --debug cx-channels --values helm-values/cx-channels-custom-values.yaml expertflow/channels --version 5.0-alpha

13. Upgrade Campaigns

BASH
helm upgrade --install --namespace expertflow --set global.efCxReleaseName="ef-cx" cx-campaigns --debug --values helm-values/cx-campaigns-custom-values.yaml expertflow/campaigns --version 5.0-alpha

14. Upgrade QM

BASH
helm upgrade --install --namespace=expertflow --set global.efCxReleaseName="ef-cx" qm  --debug --values=helm-values/cx-qm-custom-values.yaml expertflow/qm --version 5.0-alpha

15. Reporting Configuration

Add the following line to pre-deployment/reportingConnector/reporting-connector.conf:

BASH
tenant_id = expertflow

Recreate the ConfigMap:

BASH
kubectl -n expertflow delete configmap ef-reporting-connector-conf-cm
kubectl -n expertflow create configmap ef-reporting-connector-conf-cm --from-file=pre-deployment/reportingConnector/reporting-connector.conf

Upgrade Reporting:

BASH
helm upgrade --install --namespace expertflow --set global.efCxReleaseName="ef-cx" cx-reporting --debug --values helm-values/cx-reporting-scheduler-custom-values.yaml expertflow/reporting --version 5.0-alpha

16. Upgrade Transflux

BASH
helm upgrade --install --namespace expertflow --set global.efCxReleaseName="ef-cx" cx-transflux --debug --values helm-values/cx-transflux-custom-values.yaml expertflow/transflux --version 5.0-alpha

17. Metabase Deployment

Deployment Options

Dependencies

  • PostgreSQL (application database)

  • APISIX (reverse proxy / API gateway)

Deploy Metabase

Navigate to the 4.10.1_CLCC-173/kubernetes/ directory:

BASH
cd 4.10.1_CLCC-173/kubernetes/
Step 1: Create Custom Values File
BASH
vi helm-values/metabase-custom-values.yaml
Step 2: Add Minimum Required Configuration
YAML
global:
  ingressRouter: <CUSTOM-FQDN>

๐Ÿ” Replace <CUSTOM-FQDN> with your actual domain, e.g. devops.example.com.

Step 3: Deploy
BASH
helm upgrade --install=true --debug --namespace=metabase --create-namespace --values=helm-values/metabase-custom-values.yaml metabase expertflow/metabase --version 5.0-alpha

Check Pod

BASH
kubectl get pod -n metabase

Access Metabase

Open in browser:

CODE
https://<FQDN>/metabase

You should see the Metabase setup page.

Follow this guide to complete setup:
๐Ÿ”— Metabase Setup Guide

Login credentials:

CODE
Email: superadmin@admin.com

18. EFCX-Bootstrapping

Webhooks Registeration

First of all we need to add webhooks information in the mongo database for the components which required bootstraping upon teant registration.

  • Export mongo certs using:

CODE
mkdir /tmp/mongodb_certs
CERTFILES=($(kubectl get secret mongo-mongodb-ca -n ef-external -o go-template='{{range $k,$v := .data}}{{$k}}{{"\n"}}{{end}}'))
for f in ${CERTFILES[*]}; do   kubectl get secret mongo-mongodb-ca  -n ef-external -o go-template='{{range $k,$v := .data}}{{ if eq $k "'$f'"}}{{$v  | base64decode}}{{end}}{{end}}' > /tmp/mongodb_certs/${f} 2>/dev/null; done
  • Go inside kubernets directory and execute command to import data inside webhook collections. Following are commands

CODE
cd 4.10.1_CLCC-173/kubernetes
CODE
kubectl -n ef-external run mongo-tools --image=mongo:6.0 --restart=Never -- sleep 3600
CODE
kubectl -n ef-external cp ./post-deployment/cim-tenant.webhooks.json mongo-tools:/tmp/cim-tenant.webhooks.json
kubectl -n ef-external cp /tmp/mongodb_certs/mongodb-ca-cert mongo-tools:/tmp/mongodb-ca-cert
kubectl -n ef-external cp /tmp/mongodb_certs/client-pem mongo-tools:/tmp/combined.pem
CODE
kubectl -n ef-external exec mongo-tools -- \
  mongoimport \
  --host mongo-mongodb.ef-external.svc.cluster.local \
  --port 27017 \
  --db cim-tenant \
  --collection webhooks \
  --file /tmp/cim-tenant.webhooks.json \
  --jsonArray \
  --ssl \
  --sslCAFile /tmp/mongodb-ca-cert \
  --sslPEMKeyFile /tmp/combined.pem \
  --username root \
  --password Expertflow123 \
  --authenticationDatabase admin
CODE
kubectl -n ef-external delete pod mongo-tools

19. Tenant Onboarding

Step 1: Register a New Tenant

CODE
Copy create_tenant.sh from 4.10.1_CLCC-173/kubernetes/post-deployment to post-deployment
  • Edit create tenant script in post deployment folder, and update the values of tenantId and the fqdn

CODE
cd 4.10.1_CLCC-173/kubernetes/post-deployment
CODE
vi create_tenant.sh

Set tenantId as expertflow

CODE
chmod +x create_tenant.sh
CODE
./create_tenant.sh

Step 2: Register Tenant FQDN on Grafana allowedHosts

Follow the steps on this guide.

JavaScript errors detected

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

If this problem persists, please contact our support.