Difference between revisions of "PEC-AD/Current/WWEPEGuide/Deploy"
(Published) |
(Published) |
||
Line 10: | Line 10: | ||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
− | |sectionHeading= | + | |sectionHeading=Prerequisites for GKE |
+ | |anchor=PrerequisiteGKE | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext==== | + | |structuredtext====Secret configuration for pulling image=== |
− | Use the following command to log in to | + | ===Log in to the cluster=== |
+ | Use the following command to log in to the cluster from the deployment host: | ||
<source lang="Emacs"> | <source lang="Emacs"> | ||
− | + | kubectl login --token <token> --server <url of api server> | |
+ | </source> | ||
+ | ===Connect to the cluster using Cloud SDK=== | ||
+ | Use the following command to connect to the cluster from the deployment host: | ||
+ | <source lang="Emacs"> | ||
+ | gcloud container clusters get-credentials <gke cluster> --zone <gke zone> --project <gcp project> | ||
+ | </source> | ||
+ | ===Create the secret for accessing the jfrog registry=== | ||
+ | Use the following command to create the secret: | ||
+ | <source lang="Emacs"> | ||
+ | kubectl create secret docker-registry mycred | ||
+ | --docker-server=pureengage-docker-staging.jfrog.io | ||
+ | --docker-username=<camelot-username> | ||
+ | --docker-password=<API key from jfrog> | ||
+ | --docker-email=<emailid> -n wwe | ||
+ | </source> | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=Environment Preparation for GKE | ||
+ | |anchor=EnviPrepGKE | ||
+ | |alignment=Vertical | ||
+ | |structuredtext====Download the Helm charts=== | ||
+ | <ol> | ||
+ | <li>Download the WWE Helm charts from following repository: | ||
+ | |||
+ | <nowiki> | ||
+ | https://pureengage.jfrog.io/ui/repos/tree/General/helm-staging%2Fwwe | ||
+ | </nowiki> | ||
+ | </li> | ||
+ | <li>Create the '''override_values.yaml''' with appropriate overrides from the following sample file for a sample deployment: | ||
+ | |||
+ | <source lang="Emacs"> | ||
+ | context: | ||
+ | envs: | ||
+ | optimizedConfig: false | ||
+ | gwsUrl: 'https://<gws-external -url>' | ||
+ | </source> | ||
+ | </li> | ||
+ | <li>Enable and set Ingress with the appropriate hostname.</li> | ||
+ | <li>Set the value for '''gwsUrl''' applying the external gws url.</li> | ||
+ | </ol> | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=WWE installation on GKE | ||
+ | |anchor=InstallGKE | ||
+ | |alignment=Vertical | ||
+ | |structuredtext====Log in to GKE cluster=== | ||
+ | Use the following command to connect to the GKE cluster using Cloud SDK from the deployment host: | ||
+ | <source lang="Emacs"> | ||
+ | gcloud container clusters get-credentials <gke cluster> --zone <gke zone> --project <gcp project> | ||
+ | </source> | ||
+ | ===Create Namespace for WWE=== | ||
+ | Use the following command to create a new namespace for WWE: | ||
+ | <source lang="Emacs"> | ||
+ | kubectl create namespace wwe | ||
+ | </source> | ||
+ | ===Render the templates=== | ||
+ | To verify whether resources are getting created without issue, execute the following command to render templates without installing: | ||
+ | <source lang="Emacs"> | ||
+ | helm template --debug wwe ./wwe-nginx-9.0.5.tgz -f override_values.yaml -n wwe | ||
+ | </source> | ||
+ | Review the displayed Kubernetes descriptors. The values are generated from Helm templates and are based on settings from the '''values.yaml''' and '''values-test.yaml''' files. Ensure that no errors are displayed. Later, you will apply this configuration to your Kubernetes cluster. | ||
+ | |||
+ | ===Deploy WWE=== | ||
+ | Use the following command to deploy WWE: | ||
+ | <source lang="Emacs"> | ||
+ | helm install wwe ./wwe-nginx-9.0.5.tgz -f override_values.yaml -n wwe | ||
+ | </source> | ||
+ | This process takes several minutes. Wait until all objects are created and allocated, and the Kubernetes descriptors applied to the environment appear. | ||
+ | |||
+ | ===Verify the installation=== | ||
+ | Use the following command to check the installed Helm release: | ||
+ | <source lang="Emacs"> | ||
+ | helm list –all-namespaces | ||
+ | </source> | ||
+ | Use the following command to check the WWE objects created by Helm: | ||
+ | <source lang="Emacs"> | ||
+ | kubectl get all -n wwe | ||
+ | </source> | ||
+ | Verify that you can now access WWE at the following URL: | ||
+ | |||
+ | <nowiki>http://wwe.<host></nowiki> | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=Provisioning WWE Ingress on GKE | ||
+ | |anchor=IngressGKE | ||
+ | |alignment=Vertical | ||
+ | |structuredtext====Create or download the wwe-ingress.yaml file=== | ||
+ | Use the following example template to create the '''wwe-ingress.yaml''' Ingress file for WWE. In this example template, the namespace is set specifically to '''wwe'''. Adjust the values needed for your deployment. | ||
+ | |||
+ | <source lang="yaml"> | ||
+ | apiVersion: extensions/v1beta1 | ||
+ | kind: Ingress | ||
+ | metadata: | ||
+ | name: wwe-ingress | ||
+ | namespace: wwe | ||
+ | annotations: | ||
+ | # add an annotation indicating the issuer to use. | ||
+ | cert-manager.io/cluster-issuer: "selfsigned-cluster-issuer" | ||
+ | # Custom annotations for NGINX Ingress Controller | ||
+ | kubernetes.io/ingress.class: "nginx" | ||
+ | nginx.ingress.kubernetes.io/ssl-redirect: "false" | ||
+ | nginx.ingress.kubernetes.io/use-regex: "true" | ||
+ | spec: | ||
+ | rules: | ||
+ | - host: wwe.test.dev | ||
+ | http: | ||
+ | paths: | ||
+ | - path: /.* | ||
+ | backend: | ||
+ | serviceName: wwe-wwe-nginx | ||
+ | servicePort: 80 | ||
+ | tls: | ||
+ | - hosts: | ||
+ | - wwe.test.dev | ||
+ | secretName: wwe-ingress-cert | ||
+ | </source> | ||
+ | ===Apply the yaml file to your namespace=== | ||
+ | Use the following command to apply the yaml file to your namespace: | ||
+ | <source lang="EMACS"> | ||
+ | kubectl apply -f wwe-ingress.yaml -n wwe | ||
+ | </source> | ||
+ | |Status=No | ||
+ | }}{{Section | ||
+ | |sectionHeading=Deploy in Kubernetes on OpenShift | ||
+ | |anchor=DeployOpenShift | ||
+ | |alignment=Vertical | ||
+ | |structuredtext====Log in to the cluster=== | ||
+ | Use the following command to log in to the cluster from the deployment host : | ||
+ | <source lang="Emacs"> | ||
+ | kubectl login --token <token> --server <url of api server> | ||
</source> | </source> | ||
===Select your WWE Project=== | ===Select your WWE Project=== | ||
Use the following command to select the default WWE project that was created as a prerequisite: | Use the following command to select the default WWE project that was created as a prerequisite: | ||
<source lang="Emacs"> | <source lang="Emacs"> | ||
− | + | kubectl project wwe | |
</source> | </source> | ||
===Render the templates=== | ===Render the templates=== | ||
Line 27: | Line 159: | ||
helm template --debug -f values.yaml wwe-helm wwe-nginx/ | helm template --debug -f values.yaml wwe-helm wwe-nginx/ | ||
</source> | </source> | ||
− | Kubernetes descriptors are displayed. The values are generated from Helm templates, based on settings from '''values.yaml''' and '''values-test.yaml'''. Ensure that no errors are displayed. This configuration | + | Kubernetes descriptors are displayed. The values are generated from Helm templates, based on settings from '''values.yaml''' and '''values-test.yaml'''. Ensure that no errors are displayed. This configuration is applied to your Kubernetes cluster. |
===Deploy WWE=== | ===Deploy WWE=== | ||
Line 43: | Line 175: | ||
Use the following command to check the status of the WWE project: | Use the following command to check the status of the WWE project: | ||
<source lang="Emacs"> | <source lang="Emacs"> | ||
− | + | kubectl status | |
</source> | </source> | ||
− | Use the following command to check the WWE | + | Use the following command to check the WWE objects created by Helm: |
<source lang="Emacs"> | <source lang="Emacs"> | ||
− | + | kubectl get all -n wwe | |
</source> | </source> | ||
===Expose the WWE service=== | ===Expose the WWE service=== | ||
− | Make WWE accessible from outside the cluster, using the standard HTTP port. Use the following command to expose the WWE service: | + | Make WWE accessible from outside the cluster, using the standard HTTP port. Use the following command to expose the WWE service on OpenShift: |
<source lang="Emacs"> | <source lang="Emacs"> | ||
oc create route edge --service=wwe-helm-wwe-nginx --hostname=<hostname> | oc create route edge --service=wwe-helm-wwe-nginx --hostname=<hostname> | ||
Line 56: | Line 188: | ||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
− | |sectionHeading=Validate the deployment | + | |sectionHeading=Validate the deployment on OpenShift |
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=Use the following command to verify that the new route is created in the WWE project: | + | |structuredtext=Use the following command to verify that the new route is created in the WWE project on OpenShift: |
<source lang="Emacs"> | <source lang="Emacs"> | ||
oc get route -n wwe | oc get route -n wwe | ||
Line 70: | Line 202: | ||
</source> | </source> | ||
− | where <host> is the host name generated by | + | where <host> is the host name generated by Kubernetes. |
Verify that you can access WWE at the following URL: | Verify that you can access WWE at the following URL: |
Revision as of 17:58, November 1, 2021
Contents
Learn how to deploy Workspace Web Edition.
Prerequisites for GKE
Secret configuration for pulling image
Log in to the cluster
Use the following command to log in to the cluster from the deployment host:
kubectl login --token <token> --server <url of api server>
Connect to the cluster using Cloud SDK
Use the following command to connect to the cluster from the deployment host:
gcloud container clusters get-credentials <gke cluster> --zone <gke zone> --project <gcp project>
Create the secret for accessing the jfrog registry
Use the following command to create the secret:
kubectl create secret docker-registry mycred
--docker-server=pureengage-docker-staging.jfrog.io
--docker-username=<camelot-username>
--docker-password=<API key from jfrog>
--docker-email=<emailid> -n wwe
Environment Preparation for GKE
Download the Helm charts
- Download the WWE Helm charts from following repository: https://pureengage.jfrog.io/ui/repos/tree/General/helm-staging%2Fwwe
- Create the override_values.yaml with appropriate overrides from the following sample file for a sample deployment:
context: envs: optimizedConfig: false gwsUrl: 'https://<gws-external -url>'
- Enable and set Ingress with the appropriate hostname.
- Set the value for gwsUrl applying the external gws url.
WWE installation on GKE
Log in to GKE cluster
Use the following command to connect to the GKE cluster using Cloud SDK from the deployment host:
gcloud container clusters get-credentials <gke cluster> --zone <gke zone> --project <gcp project>
Create Namespace for WWE
Use the following command to create a new namespace for WWE:
kubectl create namespace wwe
Render the templates
To verify whether resources are getting created without issue, execute the following command to render templates without installing:
helm template --debug wwe ./wwe-nginx-9.0.5.tgz -f override_values.yaml -n wwe
Review the displayed Kubernetes descriptors. The values are generated from Helm templates and are based on settings from the values.yaml and values-test.yaml files. Ensure that no errors are displayed. Later, you will apply this configuration to your Kubernetes cluster.
Deploy WWE
Use the following command to deploy WWE:
helm install wwe ./wwe-nginx-9.0.5.tgz -f override_values.yaml -n wwe
This process takes several minutes. Wait until all objects are created and allocated, and the Kubernetes descriptors applied to the environment appear.
Verify the installation
Use the following command to check the installed Helm release:
helm list –all-namespaces
Use the following command to check the WWE objects created by Helm:
kubectl get all -n wwe
Verify that you can now access WWE at the following URL:
http://wwe.<host>
Provisioning WWE Ingress on GKE
Create or download the wwe-ingress.yaml file
Use the following example template to create the wwe-ingress.yaml Ingress file for WWE. In this example template, the namespace is set specifically to wwe. Adjust the values needed for your deployment.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wwe-ingress
namespace: wwe
annotations:
# add an annotation indicating the issuer to use.
cert-manager.io/cluster-issuer: "selfsigned-cluster-issuer"
# Custom annotations for NGINX Ingress Controller
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- host: wwe.test.dev
http:
paths:
- path: /.*
backend:
serviceName: wwe-wwe-nginx
servicePort: 80
tls:
- hosts:
- wwe.test.dev
secretName: wwe-ingress-cert
Apply the yaml file to your namespace
Use the following command to apply the yaml file to your namespace:
kubectl apply -f wwe-ingress.yaml -n wwe
Deploy in Kubernetes on OpenShift
Log in to the cluster
Use the following command to log in to the cluster from the deployment host :
kubectl login --token <token> --server <url of api server>
Select your WWE Project
Use the following command to select the default WWE project that was created as a prerequisite:
kubectl project wwe
Render the templates
To ensure that resources are created correctly, you can render the templates for debugging purposes without installing them. Use the following command to render the templates:
helm template --debug -f values.yaml wwe-helm wwe-nginx/
Kubernetes descriptors are displayed. The values are generated from Helm templates, based on settings from values.yaml and values-test.yaml. Ensure that no errors are displayed. This configuration is applied to your Kubernetes cluster.
Deploy WWE
Use the following command to deploy WWE:
helm install --debug --namespace wwe --create-namespace -f values.yaml wwe-helm wwe-nginx
This process takes several minutes. Wait until all objects are created and allocated, and the Kubernetes descriptors applied to the environment appear.
Check the deployment
Use the following command to check the installed Helm release:
helm list –all-namespaces
Use the following command to check the status of the WWE project:
kubectl status
Use the following command to check the WWE objects created by Helm:
kubectl get all -n wwe
Expose the WWE service
Make WWE accessible from outside the cluster, using the standard HTTP port. Use the following command to expose the WWE service on OpenShift:
oc create route edge --service=wwe-helm-wwe-nginx --hostname=<hostname>
Validate the deployment on OpenShift
Use the following command to verify that the new route is created in the WWE project on OpenShift:
oc get route -n wwe
The result should show details similar to the following:
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
wwe wwe.apps.vce-c0.eps.genesys.com wwe-helm-wwe-nginx http edge/Allow None
where <host> is the host name generated by Kubernetes.
Verify that you can access WWE at the following URL:
http://wwe.<host>