Difference between revisions of "PEC-REP/Current/GIMPEGuide/DeployGSP"
Line 5: | Line 5: | ||
|Section={{Section | |Section={{Section | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext={{NoteFormat|Make sure to review {{Link-SomewhereInThisVersion|topic=PlanningGSP}} for the full list of prerequisites required to deploy GSP, including | + | |structuredtext={{NoteFormat|Make sure to review {{Link-SomewhereInThisVersion|topic=PlanningGSP}} for the full list of prerequisites required to deploy GSP, including creation of the required S3-compatible storage (see {{Link-SomewhereInThisVersion|manual=GIMPEGuide|topic=PlanningGSP|anchor=S3|display text=Create object storage}}).}} |
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 11: | Line 11: | ||
|anchor=EnvSetup | |anchor=EnvSetup | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=To prepare your environment for the deployment, complete the steps in this section | + | |structuredtext=To prepare your environment for the deployment, complete the steps in this section for: |
− | *[[ | + | *[[{{FULLPAGENAME}}#PrepOpenShift|OpenShift]] |
− | *[[ | + | *[[{{FULLPAGENAME}}#PrepGKE|GKE]] |
− | |||
− | {{AnchorDiv| | + | {{AnchorDiv|PrepOpenShift}} |
− | ===OpenShift | + | ===Environment setup for OpenShift=== |
− | # | + | #Log in to the OpenShift cluster via CLI on the host where you will run the deployment: |
#:<source lang="text">oc login --token <token> --server <URL of the API server></source> | #:<source lang="text">oc login --token <token> --server <URL of the API server></source> | ||
− | #(Optional) Check the cluster version | + | #(Optional) Check the cluster version: |
#:<source lang="text">oc get clusterversion</source> | #:<source lang="text">oc get clusterversion</source> | ||
− | #If the cluster administrator has not already done so, create | + | #If the cluster administrator has not already done so, create a new project for GSP: |
#:<source lang="text">oc new-project gsp</source> | #:<source lang="text">oc new-project gsp</source> | ||
− | #Set the default project to | + | #Set the default project to gsp: |
#:<source lang="text">oc project gsp</source> | #:<source lang="text">oc project gsp</source> | ||
− | #Create | + | #Create a secret for docker-registry in order to pull images from the Genesys JFrog repository: |
− | |||
− | |||
− | |||
#:<source lang="text">oc create secret docker-registry <repository secret name> --docker-server=<repository> --docker-username=<username> --docker-password=<password/API key> --docker-email=<email id> -n gsp</source> | #:<source lang="text">oc create secret docker-registry <repository secret name> --docker-server=<repository> --docker-username=<username> --docker-password=<password/API key> --docker-email=<email id> -n gsp</source> | ||
− | + | <!--{{Editgrn_open}}<font color=red>'''Writer's note:''' This step is not in the PAT team instructions.</font>{{Editgrn_close}}--> | |
− | # | + | #:Create a secret named <tt>kafka-secrets</tt> in order to access Kafka. |
− | + | #:When Kafka is deployed without authentication: | |
#:<source lang="text">oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\"} -n gsp</source> | #:<source lang="text">oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\"} -n gsp</source> | ||
− | #: | + | #:When Kafka is deployed with authentication: |
#:<source lang="text">oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\", \"username\":\"gsp\",\"password\":\"<password>\"} -n gsp</source> | #:<source lang="text">oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\", \"username\":\"gsp\",\"password\":\"<password>\"} -n gsp</source> | ||
− | #: | + | #:For example: |
#:<source lang="text">oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"infra-kafka-cp-kafka.infra.svc.cluster.local:9092\",\"username\":\"gsp\",\"password\":\"kafka-password\"} -n gsp</source> | #:<source lang="text">oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"infra-kafka-cp-kafka.infra.svc.cluster.local:9092\",\"username\":\"gsp\",\"password\":\"kafka-password\"} -n gsp</source> | ||
− | {{AnchorDiv| | + | {{AnchorDiv|PrepGKE}} |
− | ===GKE | + | ===Environment setup for GKE=== |
#Ensure that the gcloud CLI and required Helm version are installed on the host where you will run the deployment. | #Ensure that the gcloud CLI and required Helm version are installed on the host where you will run the deployment. | ||
− | # | + | #Log in to the GKE cluster from the host where you will run the deployment: |
#:<source lang="text">gcloud container clusters get-credentials <cluster></source> | #:<source lang="text">gcloud container clusters get-credentials <cluster></source> | ||
− | #If the cluster administrator has not already done so, create a new namespace | + | #If the cluster administrator has not already done so, create a new namespace for GSP: |
− | # | + | ##Create a .json file specifying the namespace metadata. For example, '''create-gsp-namespace.json''': |
− | #:<source lang="bash">{ | + | ##:<source lang="bash">{ |
"apiVersion": "v1", | "apiVersion": "v1", | ||
"kind": "Namespace", | "kind": "Namespace", | ||
Line 60: | Line 56: | ||
} | } | ||
}</source> | }</source> | ||
− | # | + | ##Execute the following command to create the namespace: |
− | #:<source lang="text">kubectl apply -f create-gsp-namespace.json</source> | + | ##:<source lang="text">kubectl apply -f create-gsp-namespace.json</source> |
− | # | + | ##Confirm namespace creation: |
− | #:<source lang="text">kubectl describe namespace gsp</source> | + | ##:<source lang="text">kubectl describe namespace gsp</source> |
− | #Create | + | #Create a secret for docker-registry in order to pull images from the Genesys JFrog repository: |
− | |||
− | |||
#:<source lang="text">kubectl create secret docker-registry <repository secret name> --docker-server=<repository> --docker-username=<username> --docker-password=<password/API key> --docker-email=<email id> -n gsp</source> | #:<source lang="text">kubectl create secret docker-registry <repository secret name> --docker-server=<repository> --docker-username=<username> --docker-password=<password/API key> --docker-email=<email id> -n gsp</source> | ||
− | #Create | + | #Create a secret named <tt>kafka-secrets</tt> in order to access Kafka. |
− | + | #:When Kafka is deployed without authentication: | |
− | |||
− | #: | ||
− | |||
− | |||
− | |||
#:<source lang="text">kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\"} -n gsp</source> | #:<source lang="text">kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\"} -n gsp</source> | ||
− | + | #:When Kafka is deployed with authentication: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | #: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
#:<source lang="text">kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\", \"username\":\"gsp\",\"password\":\"<password>\"} -n gsp</source> | #:<source lang="text">kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\", \"username\":\"gsp\",\"password\":\"<password>\"} -n gsp</source> | ||
#:For example: | #:For example: | ||
#:<source lang="text">kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"infra-kafka-cp-kafka.infra.svc.cluster.local:9092\",\"username\":\"gsp\",\"password\":\"kafka-password\"} -n gsp</source> | #:<source lang="text">kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"infra-kafka-cp-kafka.infra.svc.cluster.local:9092\",\"username\":\"gsp\",\"password\":\"kafka-password\"} -n gsp</source> | ||
− | |||
− | |||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
− | |sectionHeading=Deploy | + | |sectionHeading=Deploy |
− | |||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext= | + | |structuredtext=Execute the following command: |
<source lang="text">helm install gsp <gsp-helm-artifact> -f <gsp-values.yaml> -n gsp</source> | <source lang="text">helm install gsp <gsp-helm-artifact> -f <gsp-values.yaml> -n gsp</source> | ||
|Status=No | |Status=No | ||
Line 133: | Line 89: | ||
#Review the logs to verify no errors. | #Review the logs to verify no errors. | ||
#Monitor the operations dashboard to verify that the services report their status as Ready, and pods are not continually restarting. | #Monitor the operations dashboard to verify that the services report their status as Ready, and pods are not continually restarting. | ||
+ | <!--{{Editgrn_open}}<font color=red>'''Writer's note:''' To be extended to cover/link to troubleshooting tips like config resync.</font>{{Editgrn_close}}--> | ||
|Status=No | |Status=No | ||
}} | }} | ||
|PEPageType=45d1441f-dc69-4a17-bd47-af5d811ce167 | |PEPageType=45d1441f-dc69-4a17-bd47-af5d811ce167 | ||
}} | }} |
Revision as of 16:46, September 2, 2022
Contents
Learn how to deploy GIM Stream Processor (GSP) into a private edition environment.
Assumptions
- The instructions on this page assume you are deploying the service in a service-specific namespace, named in accordance with the requirements on Creating namespaces. If you are using a single namespace for all private edition services, replace the namespace element in the commands on this page with the name of your single namespace or project.
- Similarly, the configuration and environment setup instructions assume you need to create namespace-specific (in other words, service-specific) secrets. If you are using a single namespace for all private edition services, you might not need to create separate secrets for each service, depending on your credentials management requirements. However, if you do create service-specific secrets in a single namespace, be sure to avoid naming conflicts.
Set up your environment
To prepare your environment for the deployment, complete the steps in this section for:
Environment setup for OpenShift
- Log in to the OpenShift cluster via CLI on the host where you will run the deployment:
oc login --token <token> --server <URL of the API server>
- (Optional) Check the cluster version:
oc get clusterversion
- If the cluster administrator has not already done so, create a new project for GSP:
oc new-project gsp
- Set the default project to gsp:
oc project gsp
- Create a secret for docker-registry in order to pull images from the Genesys JFrog repository:
oc create secret docker-registry <repository secret name> --docker-server=<repository> --docker-username=<username> --docker-password=<password/API key> --docker-email=<email id> -n gsp
- Create a secret named kafka-secrets in order to access Kafka.
- When Kafka is deployed without authentication:
oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\"} -n gsp
- When Kafka is deployed with authentication:
oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\", \"username\":\"gsp\",\"password\":\"<password>\"} -n gsp
- For example:
oc create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"infra-kafka-cp-kafka.infra.svc.cluster.local:9092\",\"username\":\"gsp\",\"password\":\"kafka-password\"} -n gsp
Environment setup for GKE
- Ensure that the gcloud CLI and required Helm version are installed on the host where you will run the deployment.
- Log in to the GKE cluster from the host where you will run the deployment:
gcloud container clusters get-credentials <cluster>
- If the cluster administrator has not already done so, create a new namespace for GSP:
- Create a .json file specifying the namespace metadata. For example, create-gsp-namespace.json:
{ "apiVersion": "v1", "kind": "Namespace", "metadata": { "name": "gsp", "labels": { "name": "gsp" } } }
- Execute the following command to create the namespace:
kubectl apply -f create-gsp-namespace.json
- Confirm namespace creation:
kubectl describe namespace gsp
- Create a .json file specifying the namespace metadata. For example, create-gsp-namespace.json:
- Create a secret for docker-registry in order to pull images from the Genesys JFrog repository:
kubectl create secret docker-registry <repository secret name> --docker-server=<repository> --docker-username=<username> --docker-password=<password/API key> --docker-email=<email id> -n gsp
- Create a secret named kafka-secrets in order to access Kafka.
- When Kafka is deployed without authentication:
kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\"} -n gsp
- When Kafka is deployed with authentication:
kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"<kafka-bootstrap-url>\", \"username\":\"gsp\",\"password\":\"<password>\"} -n gsp
- For example:
kubectl create secret generic kafka-secrets --from-literal=kafka-secrets={\"bootstrap\":\"infra-kafka-cp-kafka.infra.svc.cluster.local:9092\",\"username\":\"gsp\",\"password\":\"kafka-password\"} -n gsp
Deploy
Execute the following command:
helm install gsp <gsp-helm-artifact> -f <gsp-values.yaml> -n gsp
Validate the deployment
You can consider GSP deployment successful when the pod is running and in Ready state. Genesys Info Mart does not report the Ready state for pods until internal health checks are satisfied and the pods are operational. You can use standard kubectl commands like list and get to verify the successful deployment and readiness status of the Kubernetes objects.
However, from a functional point of view, you cannot validate GSP deployment unless GCA and GIM have been deployed as well. Do not expect consistent data until all three Genesys Info Mart services are up and running. When all three services have been deployed:
- Make a few test calls employing different routing strategies under different scenarios, and verify that all the calls are correctly captured in the Info Mart database. For example:
- The calls appear in the interaction-related tables.
- The calls have been correctly assigned to agents and queues.
- Review the logs to verify no errors.
- Monitor the operations dashboard to verify that the services report their status as Ready, and pods are not continually restarting.