ibm-voice-gateway-dev
by Helm
Watson Voice Gateway Helm chart (Developer Trial).
About this chart
IBM Voice Gateway Helm Chart (Developer Trial)
Introduction
This chart will deploy IBM Voice Gateway (Developer Trial) to either IBM Cloud Pak for Data environment or to the IBM Cloud Private environment.
IBM Voice Gateway provides a way to integrate a set of orchestrated Watson services with a public or private telephone network by using the Session Initiation Protocol (SIP). Voice Gateway enables direct voice interactions over a telephone with a cognitive self-service agent or transcribes a phone call between a caller and agent so that the conversation can be processed with analytics for real-time agent feedback.
Chart Details
- The Chart provided can be used to deploy Media Relay, Sip Orchestrator, SMS Gateway and G729 Codec Service containers.
- Media Relay, Sip Orchestrator and G729 Codec Service containers are deployed in one pod and SMS Gateway is deployed in one pod.
This chart can be deployed on IBM Cloud Private or to the IBM Cloud Pak for Data environment.
IBM Cloud Private
Prerequisites
- IBM Cloud Private 3.1.0 or greater
- A user with Cluster administrator role is required to install the chart.
- Detailed requirements are explained in knowledge center article of Getting Started with IBM Cloud Private
PodSecurityPolicy Requirements for IBM Cloud Private
This chart requires a PodSecurityPolicy to be bound to the target namespace prior to installation. Choose either a predefined PodSecurityPolicy or have your cluster administrator create a custom PodSecurityPolicy for you:
Predefined PodSecurityPolicy
The predefined PodSecurityPolicy ibm-anyuid-hostaccess-psp has been verified for this chart, if your target namespace is bound to this PodSecurityPolicy you can proceed to install the chart.
Custom PodSecurityPolicy
To set up a custom PodSecurityPolicy, the cluster administrator can either manually create the following resources, or use the configuration scripts to create and delete the resources.
- Custom PodSecurityPolicy definition:
apiVersion: extensions/v1beta1 kind: PodSecurityPolicy metadata: name: ibm-voice-gateway-psp spec: privileged: false hostNetwork: true hostPorts: - min: 0 max: 65535 allowPrivilegeEscalation: false runAsUser: rule: MustRunAsNonRoot seLinux: rule: RunAsAny supplementalGroups: rule: 'MustRunAs' ranges: - min: 1 max: 65535 fsGroup: rule: 'MustRunAs' ranges: - min: 1 max: 65535 volumes: - 'configMap' - 'downwardAPI' - 'emptyDir' - 'persistentVolumeClaim' - 'secret' - 'projected' - Custom ClusterRole for the custom PodSecurityPolicy:
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: ibm-voice-gateway-clusterrole rules: - apiGroups: - extensions resources: - podsecuritypolicies resourceNames: - ibm-voice-gateway-psp verbs: - use
Configuration scripts for custom PodSecurityPolicy:
Download the following scripts from the prereqs directory.
createSecurityClusterPrereqs.sh: Creates the PodSecurityPolicy and ClusterRole for all releases of this chart.createSecurityNamespacePrereqs.sh: Creates the RoleBinding for the namespace. This script takes one argument; the name of a pre-existing namespace where the chart will be installed.- Example usage:
./createSecurityNamespacePrereqs.sh myNamespace
- Example usage:
deleteSecurityClusterPrereqs.sh: Deletes the PodSecurityPolicy and ClusterRole for all releases of this chart.createSecurityNamespacePrereqs.sh: Deletes the RoleBinding for the namespace. This script takes one argument; the name of the namespace where the chart was installed.- Example usage:
./deleteSecurityNamespacePrereqs.sh myNamespace
- Example usage:
Required for IBM Cloud Private
Configure watson services:
-
Create the following Watson services on IBM Cloud for Media Relay and Sip Orchestrator.
- Watson Speech to Text
- Watson Text to Speech (self-service only)
-
Create the Watson Assistant services on IBM Cloud for Media Relay and Sip Orchestrator and SMS Gateway
-
Watson Assistant (self-service only)
Important: For the Watson Assistant service, you'll need to add a workspace with a dialog(Dialog skill). You can quickly get started by importing the sample-conversation-en.json file from your cloned sample.voice.gateway GitHub repository. To learn more about importing JSON files, see Creating Dialog skill in the Assistant documentation. If you build your own dialog instead of using the sample, ensure that your dialog includes a node with the conversation_start condition and node with a default response.
-
Create metering API Key Secret (Only for IBM Cloud Private platform):
- Complete the steps mentioned on IBM® Cloud Private metering service page to create the Metering API Key.
Make sure to create the API Key in the namespace you are going to deploy the helm chart.
- Retrieve the Metering API Key:
- After you have created the API Key, return to the IBM Cloud Private Management Console, open the menu and click Platform > Metering.
- On the Metering dashboard, select Manage API Keys. Use this form to retrieve the metering API key that you created.
- Add the generated API Key in a text file
metering-api-key.txt(Make sure there are no extra spaces or new lines in the text file) - Create secret for the metering API Key:
kubectl create secret generic metering-api-key-secret --from-file=meteringApiKey=metering-api-key.txt -n <namespace>
IBM Cloud Pak for Data
Prerequisites
- Cloud Pak for Data on OpenShift 3.11
- Detailed requirements are explained in knowledge center article of Getting Started with IBM Cloud Pak for Data
SecurityContext
If schConfigName is set, the following SecurityContext should be specified in the sch configuration.
securityContextSpec:
securityContext:
runAsNonRoot: true
{{- if not (.Capabilities.APIVersions.Has "security.openshift.io/v1") }}
runAsUser: {{ .Values.runAsUser }}
{{- end }}
securityContextContainer:
securityContext:
runAsNonRoot: true
{{- if not (.Capabilities.APIVersions.Has "security.openshift.io/v1") }}
runAsUser: {{ .Values.runAsUser }}
{{- end }}
privileged: false
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
{{- end -}}
Red Hat OpenShift SecurityContextConstraints Requirements
This chart requires a SecurityContextConstraints to be bound to the target namespace prior to installation. To meet this requirement there may be cluster scoped as well as namespace scoped pre and post actions that need to occur.
The predefined SecurityContextConstraints name: ibm-anyuid-hostaccess-scc has been verified for this chart, if your target namespace is bound to this SecurityContextConstraints resource you can proceed to install the chart.
- Custom SecurityContextConstraints definition:
apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints metadata: name: ibm-voice-gateway-scc allowHostDirVolumePlugin: true allowHostIPC: false allowHostNetwork: true allowHostPID: false allowHostPorts: true allowPrivilegedContainer: false allowPrivilegeEscalation: false defaultAllowPrivilegeEscalation: false forbiddenSysctls: - "*" fsGroup: type: MustRunAs ranges: - max: 65535 min: 1 readOnlyRootFilesystem: false requiredDropCapabilities: - ALL runAsUser: type: MustRunAsNonRoot seccompProfiles: - docker/default seLinuxContext: type: RunAsAny supplementalGroups: type: MustRunAs ranges: - max: 65535 min: 1 volumes: - configMap - downwardAPI - emptyDir - persistentVolumeClaim - projected - secret
Required for IBM Cloud Pak for Data
Configure Watson services:
-
Create the following Watson services on IBM Cloud Pak for Data cluster for Media Relay and Sip Orchestrator.
- Watson Speech to Text
- Watson Text to Speech (self-service only)
-
Create the following Watson Assistant services on IBM Cloud Pak for Data for Media Relay and Sip Orchestrator and SMS Gateway
-
Watson Assistant (self-service only)
Important: For the Watson Assistant service, you'll need to add a workspace with a dialog(Dialog skill). You can quickly get started by importing the sample-conversation-en.json file from your cloned sample.voice.gateway GitHub repository. To learn more about importing JSON files, see Creating Dialog skill in the Assistant documentation. If you build your own dialog instead of using the sample, ensure that your dialog includes a node with the conversation_start condition and node with a default response.
-
IBM Cloud Private or IBM Cloud Pak for Data
Following will be required for Voice Gateway container deployments on either IBM Cloud Private or IBM Cloud Pak for Data environments
Configure tenant configuration secret :
For Media Relay and Sip Orchestrator:
-
Create a tenantConfig.json with the tenant credentials and any additional parameters. A sample tenantConfig.json can be found in the tenantConfig.json file.
Visit Advanced JSON configuration for more information.
-
Create a secret
vgw-tenantconfig-secretfrom the tenantConfig.json file using the following command:kubectl create secret generic vgw-tenantconfig-secret --from-file=tenantConfig=tenantConfig.json -n <namespace>Make sure to use the namespace you want to deploy this chart in.
For SMS Gateway:
-
Create a tenantConfig.json with the tenant credentials and any additional parameters. A sample multi tenant configuration can be found in the tenantConfig.json file.
Visit Advanced JSON configuration for more information.
-
Create a secret
smsgw-tenantconfig-secretfrom the tenantConfig.json file using the following command:kubectl create secret generic smsgw-tenantconfig-secret --from-file=tenantConfig=tenantConfig.json -n <namespace>Make sure to use the namespace you want to deploy this chart in.
Resources Required for Media Relay and Sip Orchestrator
- The chart makes use of hostNetwork mode.
- To enable recording you will have to configure a PersistentVolume or must have dynamic provisioning set up.
- System requirements:
RAM 8 gigabytes (GB) vCPUs 2 vCPU with x86-64 architecture at 2.4 GHz clock speed Note: Varies based on expected number of concurrent calls and other factors Storage 50 gigabytes (GB) Note: Call recording and log storage settings significantly affect storage requirements OS Ubuntu 16.04 LTS, Red Hat Enterprise Linux (RHEL) 7.3 and 7.4
Resources Required for SMS Gateway
- System requirements:
RAM 8 gigabytes (GB) vCPUs 2 vCPU with x86-64 architecture at 2.4 GHz clock speed Storage 50 gigabytes (GB) Note: log storage settings significantly affect storage requirements OS Ubuntu 16.04 LTS, Red Hat Enterprise Linux (RHEL) 7.3 and 7.4
Installing the Chart
To install the chart with the release name my-release:
For example:
helm install ibm-charts/ibm-voice-gateway-dev --name my-release --namespace <namespace>
To specify any extra parameters you can use the --set option or create a yaml file with the parameters and specify it using the -f option on the command line.
For a complete list of supported parameters, please take a look at the table in Configuration section below.
Verifying the chart
To verify the chart, you need a system with kubectl and helm installed and configured.
- Check for chart deployment information by issuing the following commands:
helm list --namespace <namespace>
helm status my-release --namespace <namespace>
- Get the name of the pod that was deployed with ibm-voice-gateway-dev by issuing the following command:
kubectl get pod -n <namespace>
- Check under Events to see whether the image wa
Deploy ibm-voice-gateway-dev with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-voice-gateway-dev on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartibm-voice-gateway-dev is pinned at v3.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply