Upgrade Guide CX5.0.2 to CX5.1.0

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

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.

  1. Update Helm repo

    helm repo update expertflow
    
  2. Clone the CX repository on the target server

    # Create CX-5.1.0 directory from root
      mkdir CX-5.1.0
    # Navigate to CX-5.1.0
      cd CX-5.1.0
    # Clone the CX-5.1.0 branch of the cim-solution repository
      git clone -b CX-4.10.x_MergedInto-CX-5.0 https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/cim/cim-solution.git $HOME/CX-5.1.0
    # Navigate to root(previous) directory
      cd ../
    
  3. Setup Transflux
    Setup transflux using the guide: https://expertflow-docs.atlassian.net/wiki/x/IQALZQ

  4. Setup Apisix

    # Clone the latest version apisixi custom values
    helm show values expertflow/apisix --version 5.1.0-rc.1  > helm-values/apisix-custom-values.yaml
    
    # update the helm-values/apisix-custom-values.yaml file for given parameters
    global:
      ingressRouter: "*.expertflow.com"   # * for MTT & for prem replace FQDN
      ingressClassName: "nginx"
      ingressTlsCertName: "ef-ingress-tls-secret"
    
    # Deploy the apisix using updated custom-values.yaml file
    helm upgrade --install --namespace ef-external --values helm-values/apisix-custom-values.yaml apisix expertflow/apisix --version 5.1.0-rc.1
    
    #Verify the deployment of the apisix
    kubectl -n ef-external get deploy
    
    
  5. Vault Configuration

    # Create secrets related to vault
      kubectl get secret tls-ca -n vault -o yaml | sed 's/namespace: vault/namespace: ef-external/' | kubectl create -f -
      kubectl get secret tls-server-client -n vault -o yaml | sed 's/namespace: vault/namespace: ef-external/' | kubectl create -f -
      kubectl get secret tls-server-vault -n vault -o yaml | sed 's/namespace: vault/namespace: ef-external/' | kubectl create -f -
      kubectl get secret expertflow-reg-cred -n ef-external  -o yaml | sed 's/namespace: ef-external/namespace: vault/' | kubectl create -f -
      kubectl get secret redis-crt -n ef-external  -o yaml | sed 's/namespace: ef-external/namespace: vault/' | kubectl create -f -
      kubectl get secret ef-postgresql-crt -n ef-external  -o yaml | sed 's/namespace: ef-external/namespace: vault/' | kubectl create -f -
      kubectl get secret activemq-tls -n ef-external  -o yaml | sed 's/namespace: ef-external/namespace: vault/' | kubectl create -f -
    
    # Copy activemq-vault directory 
      Copy From CX-5.1.0/kubernetes/pre-deployment/activemq-vault To ./kubernetes/pre-deployment
    # Copy service-based-accounts directory 
      Copy From CX-5.1.0/kubernetes/pre-deployment/service-based-accounts To ./kubernetes/pre-deployment
    # Copy keycloak-spc.yaml
      Copy From CX-5.1.0/kubernetes/pre-deployment/keycloak/keycloak-spc.yaml To ./kubernetes/pre-deployment/keycloak
    
  6. Deploy Redis Helm Chart

helm show values expertflow/redis --version 5.1.0-rc.1 > helm-values/ef-redis-custom-values.yaml

Update the following values helm-values/ef-redis-custom-values.yaml as mentioned below

  acl:
    users:
         password: "Expertflow464" # Change this to match the requirements  
helm upgrade --install=true  --namespace=ef-external --values=helm-values/ef-redis-custom-values.yaml  redis expertflow/redis --version 5.1.0-rc.1
  1. Deploy Vault Helm Chart

helm uninstall -n vault vault
helm show values expertflow/vault --version 5.1.0-rc.1 > helm-values/ef-vault-custom-values.yaml
helm upgrade --install --namespace vault --create-namespace vault --debug --values helm-values/ef-vault-custom-values.yaml expertflow/vault --version 5.1.0-rc.1

Follow only the unsealing steps from initializing and unsealing the vault guide

kubectl -n vault exec -it vault-0 -- vault login <root-token>

Use the root token for vault in the above login command

Follow the below mentioned guides to configure Service based Accounts and Vault in different external components:

For Mongo
Execute below command to see the existing mongo TTL. If the TTL is less than 87600h then update the TTL using this last part of this guide Configure Vault for MongoDB Dynamic Database Credentials
kubectl -n vault exec -it vault-0 -- vault read database/roles/mongodb-role
Note: Make sure vault is login otherwise do vault login after making exec separately into vault if permission is denied on above command.

Continue
For Redis: Configure Vault for Redis Dynamic Database Credentials (non-mtt)
For ActiveMQ: Configure Vault for ActiveMQ
For PostgreSql: Configure Vault for PostgreSQL Dynamic Database Credentials
For Service Based Accounts: Configure Service Based Accounts using Vault

  1. Move back to <active-directory>/kubernetes

  2. Deploy the ActiveMQ helm chart

helm show values expertflow/activemq --version 5.1.0-rc.1 > helm-values/ef-activemq-custom-values.yaml
helm upgrade --install=true  --namespace=ef-external --values=helm-values/ef-activemq-custom-values.yaml activemq expertflow/activemq --version 5.1.0-rc.1
  1. Deploy the Keycloak helm chart

helm show values expertflow/keycloak --version 5.1.0-rc.1 > helm-values/ef-keycloak-custom-values.yaml

Edit helm-values/ef-keycloak-custom-values.yaml

global:
  ingressRouter: <DEFAULT-FQDN>

Now, deploy Keycloak by running the following command

helm upgrade --install=true  --debug --namespace=ef-external  --values=helm-values/ef-keycloak-custom-values.yaml keycloak expertflow/keycloak --version 5.1.0-rc.1
  1. Deploy the AgentDesk helm chart

# Copy the unified agent translation directory to the current release 
  Copy From CX-5.1.0/kubernetes/pre-deployment/app-translations/unified-agent/i18n/ To pre-deployment/app-translations/unified-agent
# Delete and Create the ConfigMap of Unified Agent based translations
  kubectl delete cm ef-app-translations-cm -n expertflow
  kubectl -n expertflow create configmap ef-app-translations-cm --from-file=pre-deployment/app-translations/unified-agent/i18n/
# Copy the customer-widget translation directory to the current release 
  Copy From CX-5.1.0/kubernetes/pre-deployment/app-translations/customer-widget/i18n/ To pre-deployment/app-translations/customer-widget
# Delete and Create the ConfigMap of Customer Widget based translations
  kubectl delete cm ef-widget-translations-cm -n expertflow
  kubectl -n expertflow  create configmap ef-widget-translations-cm --from-file=pre-deployment/app-translations/customer-widget/i18n/

# Update the following envirnment under grafana --> siteEnvVars
      - name: GF_LIVE_ENABLED
        value: "true"
  
# Deploy the new chart version using the helm-values/cx-agent-desk-custom-values.yaml
  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.1.0-rc.1

AGENT_STATE_CHANGED Flow Added in Conversation Studio
Note: Please take backup/export of your existing flow from conversation studio before any change

A new flow for Agent State Change has been added as part of the Conversation Re-Routing on Agent State Change - Not Ready (Callback) feature.

If you are using custom flows for Conversation Studio:

Please add the flow changes manually. After deploying the Core helm chart, refer to the Conversation Studio default flows documentation (see the 'Agent State Changed' section—17th heading) and update your customized flow accordingly.

If you are using default flows for Conversation Studio (This will remove all existing flows, please only follow the below in case you are using default flows):

Execute the below commands before deploying the Core Helm chart.

a. Delete the Conversation Studio StatefulSet:

kubectl delete -n expertflow statefulset ef-cx-conversation-studio

b. Delete the existing Persistent Volume Claim (PVC) for Conversation Studio:

kubectl delete -n expertflow pvc conversation-studio-flow-vol-ef-cx-conversation-studio-0
  1. Deploy the Core helm chart

# Copy the conversation manager graphql schemas and mongodb rules to the current release directory
  Copy From CX-5.1.0/kubernetes/pre-deployment/conversation-manager/graphql/ To pre-deployment/conversation-manager
# Delete and Create the Config Maps related to Conversation Manager Graphql schemas and mongodb rules
  kubectl delete configmap -n expertflow conversation-manager-graphql-schemas
  kubectl create configmap -n expertflow conversation-manager-graphql-schemas --from-file=./pre-deployment/conversation-manager/graphql/schemas
  kubectl delete configmap -n expertflow conversation-manager-graphql-mongodb-rules
  kubectl create configmap -n expertflow conversation-manager-graphql-mongodb-rules --from-file=./pre-deployment/conversation-manager/graphql/graphql-mongodb-rules.json
# Deploy the new chart version using the helm-values/ef-cx-custom-values.yaml 
  helm upgrade --install --namespace expertflow --create-namespace   ef-cx  --debug --values helm-values/ef-cx-custom-values.yaml expertflow/cx --version 5.1.0-rc.1
  1. Deploy the Channels helm chart

# Deploy the new chart version using the helm-values/cx-channels-custom-values.yaml
  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.1.0-rc.1
  1. Deploy the QM helm chart

# Deploy the new chart version using the helm-values/cx-qm-custom-values.yaml
  helm upgrade --install --namespace=expertflow --set global.efCxReleaseName="ef-cx" qm  --debug --values=helm-values/cx-qm-custom-values.yaml expertflow/qm --version 5.1.0-rc.1
  1. Deploy the Campaign helm chart

# Deploy the new chart version using the helm-values/cx-campaigns-custom-values.yaml
  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.1.0-rc.1
  1. Deploy the Fluent-Bit helm chart

This is optional and required only to enable audit log monitoring.

# Deploy the new chart version using the helm-values/cx-fluent-bit-custom-values.yaml
  helm show values expertflow/fluent-bit --version 5.1.0-rc.1 > helm-values/cx-fluent-bit-custom-values.yaml
  helm upgrade --install --namespace ef-external --set global.efCxReleaseName="ef-cx"  cx-fluent-bit --debug --values helm-values/cx-fluent-bit-custom-values.yaml expertflow/fluent-bit --version 5.1.0-rc.1

Note: To setup voice connector, please follow this guide with Voice-Connector part only using version 5.1.0

Configuration Guide(s):

  1. https://expertflow-docs.atlassian.net/wiki/x/dAA5Y