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-5.1.0 https://efcx:RecRpsuH34yqp56YRFUb@gitlab.expertflow.com/cim/cim-solution.git $HOME/CX-5.1.0
    # Navigate to root(previous) directory
      cd ../
    # Move back to <active-directory>/kubernetes
    
  3. Setup Transflux
    Set up 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  > helm-values/apisix-custom-values.yaml
    
    # Update the helm-values/apisix-custom-values.yaml file for given parameters
    global:
      ingressRouter: "*.expertflow.com"   # * for MTT & replace FQDN for on-prem
      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
    
    # 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 ./pre-deployment
    # Copy service-based-accounts directory 
      Copy From CX-5.1.0/kubernetes/pre-deployment/service-based-accounts To ./pre-deployment
    # Copy keycloak-spc.yaml
      Copy From CX-5.1.0/kubernetes/pre-deployment/keycloak/keycloak-spc.yaml To ./pre-deployment/keycloak
    
  6. Deploy Redis Helm Chart

    helm show values expertflow/redis --version 5.1.0 > 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
    
  7. Deploy Vault Helm Chart

    helm uninstall -n vault vault
    
    helm show values expertflow/vault --version 5.1.0 > 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
    

    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 the vault in the above login command

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

For Mongo
Execute the command below to see the existing MongoDB 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 logged in otherwise, do vault login after making exec separately into vault if permission is denied on the above command.

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

Note: For Mongo, service-based accounts cannot work with the current structure because in MTT, the databases are dynamic, so we cannot create service-based accounts for them. However, it can work for PostgreSQL like before.

  1. Deploy the ActiveMQ helm chart

    helm show values expertflow/activemq --version 5.1.0 > 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
    
  2. Deploy the Keycloak helm chart

    helm show values expertflow/keycloak --version 5.1.0 > 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
    
  3. 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
    

AGENT_STATE_CHANGED Flow Added in Conversation Studio
Note: Please take a 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 customised 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 commands below 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
    

    Note: For MTT, change the CAMPAIGN_STUDIO_URL in the conversation manager

    - name: CAMPAIGN_STUDIO_URL
      value: "http://tenantId-campaign-studio-svc.tenantId.svc:1880"
    
  2. 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
    
  3. Deploy the MTT helm chart

    # Deploy the new chart version using the helm-values/mtt-single-custom-values.yaml
    helm upgrade --install --namespace <tenant-ns> --debug  <tenant-id> --values helm-values/mtt-single-custom-values.yaml  expertflow/MTT-single --version 5.1.0
    
  4. Deploy the QM helm chart (Optional)

    # 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
    
  5. Deploy the Campaign helm chart (Optional)

    # 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
    
  6. Deploy the Fluent-Bit helm chart (Optional)
    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 > 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
    
  7. Cisco Sync Service Deployment (Optional)

    # Deploy the new chart version using the helm-values/cx-ciscosyncservice-custom-values.yaml
    helm upgrade --install --namespace expertflow  --set global.efCxReleaseName="ef-cx"  cisco-sync-service  --values helm-values/cx-ciscosyncservice-custom-values.yaml expertflow/cisco-sync-service --version 5.1.0 
    
  8. Cisco Connector (Optional)
    Cisco Connector is a pre-req for the Multi-Step Post-Call Survey for Cisco. Deploy the Cisco Connector helm chart by following the instructions below:

    Before deploying the Cisco-Connector, please follow the guide below to create the required database and tables in PostgreSQL.

Guide to create Database and Tables in PostgreSQL

Create the database in Postgres

Cisco Connector requires a db named cisco_connector in Postgres, already deployed in the ef-external namespace. Follow the steps below to create one.

  1. exec into the ef-postgresql-0 pod in the ef-external namespace

kubectl -n ef-external exec -it ef-postgresql-0 -- bash
  1. Execute the environment setup for ef-postgresql-0 ( Only needed when the postgresql is running in non-HA mode , like no pgpool and multiple replicas of postgresql are running )

/opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash
  1. Log into Postgres using the following command

psql --host ef-postgresql -U sa postgres -p 5432
  1. The system will ask for the password for the user sa. Enter the password, configured during deployment of Postgres. You should now be logged into the Postgres shell.

  2. Create the required database and tables using the following commands.

CREATE DATABASE cisco_connector;
\c cisco_connector;


CREATE TABLE call_legs (
    id UUID PRIMARY KEY,
    call_id VARCHAR(255) NOT NULL,
    global_call_id VARCHAR(255) NOT NULL,
    jtapi_id VARCHAR(255) NOT NULL,
    connection_id VARCHAR(255),
    agent_extension VARCHAR(255),
    agent_id VARCHAR(255),
    agent_name VARCHAR(255),
    duration BIGINT DEFAULT 0,
    start_reason VARCHAR(50) NOT NULL,
    end_reason VARCHAR(50),
    conversation_type VARCHAR(50),
    call_type VARCHAR(50),
    start_time TIMESTAMP NOT NULL,
    end_time TIMESTAMP,
    wrap_ups VARCHAR(255),
    created_at TIMESTAMP NOT NULL,
    sync_with_cx BOOLEAN DEFAULT FALSE,
    sync_with_cisco BOOLEAN DEFAULT FALSE,
    service_identifier VARCHAR(255),
    customer_identifier VARCHAR(255)
);

CREATE TABLE jtapi_events (
    id BIGSERIAL PRIMARY KEY,
    event_type VARCHAR(50) NOT NULL,
    event_status VARCHAR(50) NOT NULL DEFAULT 'PENDING',
    call_direction VARCHAR(50) NOT NULL,
    global_call_id VARCHAR(255) NOT NULL,
    jtapi_id VARCHAR(255) NOT NULL,
    connection_id VARCHAR(255),
    previous_global_call_id VARCHAR(255),
    calling_terminal VARCHAR(255),
    called_terminal VARCHAR(255),
    calling_extension VARCHAR(255),
    called_extension VARCHAR(255),
    created_at TIMESTAMP NOT NULL
);

CREATE TABLE call_leg_history (
    history_id BIGSERIAL PRIMARY KEY,
    event_type VARCHAR(50) NOT NULL,
    timestamp TIMESTAMP NOT NULL,
    call_leg_id UUID NOT NULL,
    CONSTRAINT fk_call_leg_history_call_leg_id FOREIGN KEY (call_leg_id) REFERENCES call_legs(id)
);

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO app_users;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO app_users;
  1. Then to exit from the shell

\q
exit
exit
helm show values expertflow/cisco-connector --version 5.1.0 > helm-values/cx-ciscoConnector-custom-values.yaml

Please follow this guide for the configuration of Cisco Connector, and then proceed with deployment by:

helm upgrade --install --set global.efCxReleaseName="ef-cx" cisco-connector --namespace expertflow --values helm-values/cx-ciscoConnector-custom-values.yaml  expertflow/cisco-connector --version 5.1.0
  1. To set up the voice components, please follow this guide

Configuration Guide(s):

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

  2. https://expertflow-docs.atlassian.net/wiki/x/RYBvYw

  3. https://expertflow-docs.atlassian.net/wiki/x/G4Ddc

  4. Automated Multi-reply Post Call SMS Survey | 4. Designing the Flow

    1. To configure reports for the survey: https://expertflow-docs.atlassian.net/wiki/x/BACicQ

  5. As a Campaign Manager | 3. Configuring & Designing the Flow

    1. To configure reports for the survey: https://expertflow-docs.atlassian.net/wiki/x/BACicQ