Deploy Voice Microservices
Contents
Learn how to deploy Voice Microservices.
General deployment prerequisites
Before you deploy the Voice Services, you must deploy the infrastructure services. See Third-party prerequisites for the list of required infrastructure services.
To override values for both the infrastructure services and voice services, see Override Helm chart values.
Genesys recommends the following order of deployment for the Voice Microservices:
Deploy Consul
Consul is required for multiple Services in the Genesys package. In addition to any other Consul configuration, the following Consul features are required for Voice Services:
- connectinject – to deploy sidecar containers in voice pods.
- controller – to provide service intention functionality.
- openshift – to set OpenShift specific permissions.
- syncCatalog – to sync K8 services into Consul: set toK8S: false and addK8SNamespaceSuffix: false for syncing services only from K8 to Consul.
- AccessControlList – to enable ACL, set manageSystemACLs: true.
- storageclass – to set the storage class to a predefined storage class.
- TLS – to enable TLS, set enabled: true and follow the steps/commands described below to set up TLS.
Here is the file content for the Consul configuration:
# config.yaml
global:
name: consul
tls:
enabled: true
caCert:
secretName: consul-ca-cert
# The key of the Kubernetes secret.
secretKey: tls.crt
caKey:
# The name of the Kubernetes secret.
secretName: consul-ca-key
# The key of the Kubernetes secret.
secretKey: tls.key
acls:
manageSystemACLs: true
openshift:
enabled: true
connectInject:
enabled: true
controller:
enabled: true
syncCatalog:
enabled: true
toConsul: true
toK8S: false
addK8SNamespaceSuffix: false
Add a rule for Consul DNS forwarding
OpenShift sends DNS requests to the DNS server in the openshift-dns namespace. To forward Consul FQDN resolution to a Consul DNS server, add a forwarding rule to configmap of the default DNS operator. Save the Consul's DNS IP address using the following command:
kubectl get svc consul-dns -n <consul namespace> -o jsonpath={.spec.clusterIP} (Internal IP of consul-dns service)
> oc edit dns.operator/default
Add the below specs:
spec:
servers:
- name: consul-dns
zones:
- consul
forwardPlugin:
upstreams:
- <Internal IP of consul-dns service>
Create the Voice namespace
Before deploying Voice Services and their dependencies, create a namespace using the following command:
kubectl create ns voice
In all Voice Services and their dependencies configuration files, the namespace is voice. If you want a specific/custom namespace, create the namespace (using the above command) and change the namespace in files, as required.
Deploy Voice services
Register the Redis service in Consul
After the creation of the Redis cluster, the Redis IP address should be registered with Consul. Cluster information needs to be created for the Kubernetes services and endpoints with Redis. Once they are created, Consul will automatically sync those Kubernetes services and register them in Consul.
Kubernetes Service and endpoint creation
The Redis registration should be done for all of the following Redis service names. The Voice services will use these service names for connecting to the Redis cluster.
redis-agent-state
redis-call-state
redis-config-state
redis-ors-state
redis-ors-stream
redis-registrar-state
redis-rq-state
redis-sip-state
redis-tenant-stream
Manifest file
For all the Redis service names mentioned above, create a separate service and endpoint using the following example:
apiVersion: v1
kind: Service
metadata:
name: <redis-service-name> (ex, redis-agent-state)
namespace: <namespace> (ex, voice)
annotations:
"consul.hashicorp.com/service-sync": "true"
spec:
clusterIP: None
---
apiVersion: v1
kind: Endpoints
metadata:
name: <redis-service-name> (ex, redis-agent-state)
namespace: <namespace> (ex, voice)
subsets:
- addresses:
- ip: <redis MASTER IP> (ex, 51.143.122.147)
ports:
- port: <redis port> (ex, 6379)
name: redisport
protocol: <redis transport> (ex, TCP)
Get the Redis primary IP using the following command:
kubectl get pods infra-redis-redis-cluster-0 -n infra -o jsonpath='{.status.podIP}' (get IPaddress of the master redis pod)
Deploy Voice Services
Before deploying Voice Services, we must create Persistent Volume Claims (PVC) that are required for Voice Services.
Persistent volumes
The Voice SIP Cluster Service uses the persistent volume, a "piece" of storage, to store traditional SIP Server logs in OpenShift.
Persistent Volume in OCS Storage Type
A Storage Class might have been already created in the OCP (OpenShift Container Platform). This Storage Class is used for creating PVC and must be set in the override values of sip_node_override_values.yaml.
For the OpenShift cluster with OpenShift Container Storage (OCS) storage, configure the Storage Class to be used for creating the persistent volume. In the case of OCS storage, PV will be created automatically when PVC is claimed. For such clusters, the volumeName parameter in sip_node_override_values.yaml must be empty.
# pvc will be created for logs
volumes:
pvcLog:
create: true
claim: sip-log-pvc
storageClass: voice
volumeName:
pvcJsonLog:
create: true
claim: sip-json-log-pvc
storageClass: voice
volumeName:
The created persistent volume must be configured in sip_node_override_values.yaml as shown below:
# pvc will be created for logs
volumes:
pvcLog:
create: true
claim: sip-log-pvc
storageClass: voice
volumeName: <pv name> (ex sip-log-pv)
pvcJsonLog:
create: true
claim: sip-json-log-pvc
storageClass: voice
volumeName: <pv name> (ex sip-log-pv)
Configure the DNS Server for voice-sip
The Voice SIP Cluster Service requires that the DNS server is configured in sip_node_override_values.yaml.
In the OCP environment, the Kubernetes DNS server name can be obtained using the following command:
oc get dns.operator/default -o jsonpath={.status.clusterIP}
In a non-OCP environment, follow the steps provided in Kubernetes documentation and install the dnsutils pod. Using the dnsutils pods, get the dnsserver that is used in the environment.
Default value in the SIP Helm chart is "10.0.0.10"; if the DNS server address is different, update it in sip_node_override_values.yaml as shown below:
# update dns server ipaddress
context:
envs:
dnsServer: "10.202.0.10"
Voice Service Helm chart deployment
Deploy the Voice Services using the provided Helm charts.
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=<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=<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=<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=<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=<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=<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=<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=<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=<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=<container-version> --username "$JFROG_USER" --password "$JFROG_PASSWORD"
The following table contains a list of the minimum recommended Helm chart versions that should be used:
Service name | Helm chart version |
---|---|
voice-config | voice-config-9.0.11.tgz |
voice-dialplan | voice-dialplan-9.0.08.tgz |
voice-registrar | voice-registrar-9.0.14.tgz |
voice-agent | voice-agent-9.0.10.tgz |
voice-callthread | voice-callthread-9.0.12.tgz |
voice-sip | voice-sip-9.0.22.tgz |
voice-sipfe | voice-sipfe-9.0.06.tgz |
voice-sipproxy | voice-sipproxy-9.0.09.tgz |
voice-rq | voice-rq-9.0.08.tgz |
voice-ors | voice-ors-9.0.08.tgz |
Deploy the Tenant service
The Tenant Service is included with the Voice Microservices, but has its own deployment procedure. To deploy the Tenant Service, see Deploy the Tenant Service.
Deploy in OpenShift
To deploy in the OpenShift platform, you use the oc command instead of the kubectl command.