Upgrade, rollback, or uninstall Voice Microservices
Contents
Learn how to upgrade, rollback or uninstall Voice Microservices.
Upgrade Voice Microservices
Because Voice Services are real-time services, you use canary-based deployment to upgrade. Canary deployment is a technique of deploying the new software version to one or more canary instances. You verify that the new version works as expected and that is also works with the previous version. Deploying only one or two canary instances is sufficient to discover a faulty version and to minimize the risk of adding a new version into production. After you have verified that the new software version works correctly, you can proceed with the upgrade.
The upgrade procedure consists of these major steps:
- Canary deployment
- Upgrade
- Delete canary
Canary deployment
For any new Voice service version, you first deploy a canary instance of it. After you confirm that the new canary version is performing correctly, you roll out the version to all instances of the Voice service using the procedure described in the Service upgrade section. For the Voice RQ service, see Upgrade the RQ node service.
IMPORTANT
When upgrading from early Helm versions to versions equal to or later than the following, delete the configmap (<service name>-configmap) for each service before deploying the canary instance.
Service | Version |
---|---|
Agent State | 100.0.100.0003 |
Call State | 100.0.100.0003 |
Config | 100.0.100.0003 |
Dial Plan | 100.0.100.0006 |
ORS | 100.0.100.0007 |
Registrar | 100.0.100.0003 |
SIP Cluster | 100.0.100.0009 |
Front End | 100.0.100.0003 |
SIP Proxy | 100.0.100.0003 |
For the canary deployment, some parameters in the canary_override_values.yaml file must be overridden. The following sample shows the overrides. The canary_override_values.yaml file is passed to the Helm chart during the deployment of the canary instance. When upgrading SIP Cluster Service to version 100.0.100.0009 or later, there are some changes to the following sample for some sections. To review the changes, see the canary_override_values.yaml file for SIP Cluster Service sample.
# serviceaccount is created during initial deployment
serviceAccount:
create: false
deployment:
postfix: canary
# configmap is already created during initial deployment
context:
create: false
# this is needed for SIP canary only
loggingSidecar:
context:
create: false
# this is also needed for SIP canary only
volumes:
pvcLog:
create: false
pvcJsonLog:
create: false
# podmonitor is not needed for canary, but metric server enabling is needed
prometheus:
podMonitor:
enabled: false
metricServer:
enabled: true
# canary does not need HPA
hpa:
enabled: false
Sample: canary_override_values.yaml file for SIP Cluster Service version 100.0.100.0009 and later
Starting with version 100.0.100.0009, the context, volumes, and logging sidecar sections in the Voice SIP Cluster Service canary_override_values.yaml file differ from the preceding sample. The following sample shows the changes.
context:
create: true
envs:
sbcAddress: "<SBC Load balanacer FQDN for the region>"
enableSharedTrunk: true # Enable/Disable shared trunks configured in SIPNode
enableSharedSoftswitch: true # Enable/Disable shared softswitches configured in SIPNode
volumes:
pvcLog:
create: false
pvcJsonLog:
create: false
log:
mountPath: /opt/genesys/logs/volume
volumePath: /mnt/log
jsonLog:
emptyDir: true
mountPath: "/opt/genesys/logs/sip_node/JSON"
loggingSidecar:
image:
registry: genesysengageprod001.azurecr.io
repository: sre/fluent-bit
pullPolicy: Always
tag: 1.6.1
The following commands deploy a canary instance:
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-agent-canary <helm-repo>/voice-agent-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-callthread-canary <helm-repo>/voice-callthread-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-config-canary <helm-repo>/voice-config-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-dialplan-canary <helm-repo>/voice-dialplan-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-ors-canary <helm-repo>/voice-ors-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-registrar-canary <helm-repo>/voice-registrar-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-rq-canary <helm-repo>/voice-rq-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-sip-canary <helm-repo>/voice-sip-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-sipfe-canary <helm-repo>/voice-sipfe-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/canary_override_values.yaml voice-sipproxy-canary <helm-repo>/voice-sipproxy-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
Service upgrade
After you validate the canary deployment of a Voice service, use the following commands to upgrade the current version of a Voice service to the new version:
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/agent_override_values.yaml voice-agent <helm-repo>/voice-agent-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/callthread_override_values.yaml voice-callthread <helm-repo>/voice-callthread-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/config_override_values.yaml voice-config <helm-repo>/voice-config-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/dialplan_override_values.yaml voice-dialplan <helm-repo>/voice-dialplan-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/ors_node_override_values.yaml voice-ors <helm-repo>/voice-ors-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/registrar_override_values.yaml voice-registrar <helm-repo>/voice-registrar-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/rq_node_override_values.yaml voice-rq <helm-repo>/voice-rq-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/sip_node_override_values.yaml voice-sip <helm-repo>/voice-sip-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/sipfe_override_values.yaml voice-sipfe <helm-repo>/voice-sipfe-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/sipproxy_override_values.yaml voice-sipproxy <helm-repo>/voice-sipproxy-<helmchart-version>.tgz --set version=<new-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
Delete the canary instance
When the upgrade of a Voice service is successful, use the following commands to delete the canary instance of the service:
helm delete voice-agent-canary -n voice
helm delete voice-callthread-canary -n voice
helm delete voice-config-canary -n voice
helm delete voice-dialplan-canary -n voice
helm delete voice-ors-canary -n voice
helm delete voice-registrar-canary -n voice
helm delete voice-sip-canary -n voice
helm delete voice-sipfe-canary -n voice
helm delete voice-sipproxy-canary -n voice
Upgrade the RQ node service
The upgrade procedure for the RQ node service differs from other Voice services. Use the following steps to upgrade the Voice RQ service.
- Set the strategy to OnDelete in the rq_node_override_values.yaml file (the strategy is set, by default, to RollingUpdate when a fresh RQ node service is deployed).
- Example:
deployment: deploymentType: statefulset strategy: OnDelete
- Use the following command to upgrade the voice-rq values.yaml file to the new version:
helm upgrade --install --force --wait --timeout 200s -n voice -f ./voice_helm_values/rq_node_override_values.yaml voice-rq https://<jfrog artifactory/helm location>/voice-rq/voice-rq-9.0.07.tgz --set version=9.0.6 --username "$JFROG_USER" --password "$JFROG_PASSWORD"
- Delete the voice-rq-0 pod. This causes the voice-rq-0 pod to be automatically upgraded to the new version. The upgraded Helm version is applied to new pods only when a pod is deleted. You can then validate the upgrade using this canary pod (voice-rq-0) to ensure it works with other RQ nodes.
- If you delete other RQ node pods, they are also upgraded automatically to the new version. Genesys recommends that you avoid this type of random upgrade of RQ nodes. Before deleting and upgrading any other RQ pods, use the new version on the canary pod (voice-rq-0) to test and validate the upgrade.
- If the canary pod (voice-rq-0) works correctly with other pods and in the environment, then you can upgrade the voice-rq Helm values.yaml file to the new version (see step 2). When that upgrade is complete, delete the remaining RQ pods. The new RQ node pods have the new version.
Rollback Voice Microservices
For Voice Microservices, you can perform a service rollback at the following times:
- After performing the canary deployment.
- After upgrading the service.
After canary deployment
If you deploy the canary instance as a new version and that version is not working as expected, then you can delete the canary deployment using the following command:
helm delete voice-agent-canary -n voice
After service upgrade
After you upgrade a service to a new version and that version is found to have issues, then you can roll back to the previous version using the following command:
helm upgrade --install --force --wait --timeout 300s -n voice -f ./voice_helm_values/agent_override_values.yaml voice-agent https://pureengage-helm-staging-local.jfrog.io/voice-agent-<helmversion>.tgz --set version=<old-container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
Uninstall Voice Microservices
To uninstall a Voice service, use the following command:
helm uninstall <service name> -n voice
For more information, see the Helm documentation.