Provision UCS

From Genesys Documentation
Jump to: navigation, search

Learn how to provision Universal Contact Service (UCS).

UCS provisioning is executed automatically during deployment procedure.

Tenant provisioning

1. Create and configure a values-override.yaml file:

# * Images
# Replace for your values: registry and secret
  pullPolicy: IfNotPresent
  pullSecrets: [name: <docker-registry-secret-name>]
  registry: <docker-registry>
  repository: deploy_ucsx
# * Command
# "register_ucsx_tenant" or "unregister_ucsx_tenant"
command: "register_ucsx_tenant"
# * Tenant info
  id: "<tenant-sid>"
  ccid: "<tenant-uuid>"
# * UCSX configuration
  addr: "<ucsx-host-internal>:8500"
  restaddr: "http://<ucsx-host-internal>:8080"
# * K8s secret and configmap
configNameBase: ucsx-config
secretNameBase: ucsx-secret
# * Authentication
# Set your values.
    url: "http://<gauth-auth-url-internal>"
    # regions:
    clientId: "<gauth-client-id>"
    clientSecret: "<gauth-client-secret>"
    url: "http://<gauth-env-url-internal>"
# * DB Parameters
# Set your values.
  ssl:  "<db-ssl-mode>"
  name: "<db-name>"
  host: "<db-host>"
  port: "<db-port>"
  user: "<db-user>"
  password: "<db-password>"
# * WWE
# wwe: {}
  skipRegistration: 'true'
# * Pod configuration
podSecurityContext: {}
securityContext: {}
nodeSelector: {}
 priorityClassName: ''
 keepPod: true

2. Install the tenant using the ucsx-addtenant Helm chart:

helm install ucsx-addtenant-<tenant-sid> ucsxhelmrepo/ucsx-addtenant --version=<chart-version> --namespace=ucsx --wait --timeout 300s -f values-override.yaml

Configure WWE (Workspace API) to consume UCSX service

If the wwe: skipRegistration values is set as true in the Helm chart,

1. Get a bearer token from the GAUTH service:

curl -X POST "https://<gauth-auth-url-external>/auth/v3/oauth/token?grant_type=client_credentials&client_id=<gauth-client-id>&client_secret=<gauth-client-secret>"

2. Get the current settings of Workspace API.

curl -X GET "https://<gauth-auth-url-external>/environment/v3/contact-centers/<tenant-uuid>/settings" -H "Authorization: Bearer <access-token>" -H "Content-Type: application/json"

3. Configure the Workspace API to consume UCSX service.

curl -X POST "https://<gauth-auth-url-external>/environment/v3/contact-centers/<tenant-uuid>/settings"
     -H "Authorization: Bearer <access-token>"
     -H "Content-Type: application/json"
     --data-raw '{
             "shared":false }

4. Configure CORS.

curl -X POST "https://<gauth-auth-url-external>/environment/v3/cors"
     -H "Authorization: Bearer <access-token>"
     -H "Content-Type: application/json"
     --data-raw '{
              "origin": "https://<ucsx-host>",
              "contactCenterId": "<tenant-uuid>"

Validate the provisioning

To check the logs:

kubectl get pods ucsx
kubectl logs <ucsx-addtenant-<tenant-sid>-pod-id>

curl requests

To get a bearer token:

curl -X POST "https://<gauth-auth-url-external>/auth/v3/oauth/token?grant_type=client_credentials&client_id=<gauth-client-id>&client_secret=<gauth-client-secret>"

To get a cluster version:

curl --request POST http://<ucsx-host>/ucs/v3/rest/request/get-version -H "Authorization: Bearer <access-token>" -H "Content-Type: application/json"

To get the tenant information:

curl -X GET http://<ucsx-host>/ucs/v3/config/tenants -H "Authorization: Bearer <access-token>" -H 'Content-Type: application/json'

To show the tenant information using the cmxctrl command from the ucsx pod:

cmxctrl -g <access-token> info <tenant-uuid>

Managing Tenants

To unregister a tenant:

helm install ucsx-addtenant-<tenant-sid> ucsxhelmrepo/ucsx-addtenant --version=<chart-version> --namespace=ucsx --wait --timeout 300s --set command=unregister_ucsx_tenant -f values-override.yaml

To uninstall a Helm chart:

helm uninstall ucsx-addtenant-<tenant-sid> --namespace=ucsx

To delete a tenant usingthe cmxctrl command from the ucsx pod:

cmxctrl rm -g <access-token> <tenant-uuid>

Retrieved from " (2024-04-14 23:54:24)"
Comments or questions about this documentation? Contact us for support!