Date: Thu, 28 Mar 2024 20:38:32 +0000 (UTC) Message-ID: <1016802961.140200.1711658312687@ip-10-0-0-39.us-west-2.compute.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_140199_47189882.1711658312685" ------=_Part_140199_47189882.1711658312685 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This documentation demonstrates how t= o run Joget in clustering mode with transparent failover, and it is deploye= d on Red Hat Openshift with JBoss EAP 7. In order to achieve session replic= ation, we externalized HTTP sessions using Red Hat JBoss Data Grid. This al= lows the sessions of logged in users remain intact while we scale up/down t= he deployment Joget, or even during the rolling update.
Create a MySQL Database server with t= hese commands:
export = DB_APP_NAME=3Djogetdb export MYSQL_DATABASE=3Djwdb export MYSQL_USER=3Djoget export MYSQL_PASSWORD=3Djoget oc new-app openshift/mysql:5.7 --name $DB_APP_NAME -e MYSQL_USER=3D$MYSQL_U= SER -e MYSQL_PASSWORD=3D$MYSQL_PASSWORD -e MYSQL_DATABASE=3D$MYSQL_DATABASE=
Create a new Red Hat JBoss Data Grid = app in your project using this command:
oc new-= app --template=3Ddatagrid71-basic -p CACHE_NAMES=3Dhttp-session-cache -p ME= MCACHED_CACHE=3Dmemcached
Once above app is available, create a= Red Hat JBoss EAP 7 with this command:
oc new-= app --template=3Deap71-basic-s2i -p CONTEXT_DIR=3D -e JGROUPS_PING_PROTOCOL= =3Dopenshift.DNS_PING -e OPENSHIFT_DNS_PING_SERVICE_NAME=3Deap-app-ping -e = OPENSHIFT_DNS_PING_SERVICE_PORT=3D8888 -e CACHE_NAME=3Dhttp-session-cache&n= bsp;
We need a common storage for Joget da= ta folder wflow, hence we will add a storage to the new deplo= yed Red Hat JBoss EAP. Make sure the storage access mode is Read-Write-Many= as multiple pods will connect to this volume in clustering environment, an= d set the Mount Path to /hom= e/jboss/wflow:
export = STORAGE_NAME=3Dwflow echo =3D=3D=3D create persistent storage claim =3D=3D=3D cat <<EOF > pvc.yaml apiVersion: "v1" kind: "PersistentVolumeClaim" metadata: name: "wflow" spec: accessModes: - "ReadWriteMany" resources: requests: storage: "1Gi" EOF oc create -f pvc.yaml rm pvc.yaml echo =3D=3D=3D mount storage =3D=3D=3D oc set volume dc/eap-app --add --type=3DpersistentVolumeClaim --claim-name= =3D$STORAGE_NAME --mount-path=3D/home/jboss/wflow
Since deployment-scanner in JBoss EAP= is not designed to use a shared deployment folder, therefore we need to cr= eate a new build and deploy Joget WAR file to Openshift. To do that, first&= nbsp;download and install a copy of Joget locally to obta= in the jw.war in the apache-tomcat/webapps directory.
Then run this command:
oc star= t-build eap-app --from-file=3Djw.war
Once it is done, it should trigger a = new deployment. Check the log of new pod and make sure the jw.war is deploy= ed.
Try to log in to Joget via $routePath/jw/setup, where $routePath is the result= of the command: oc get rout= es eap-app. Complete the database setu= p on Joget using the dat= abase credentials used when creating the MySQL instance, then you should ab= le to scale up or down the deployments, and your login session will still b= e kept during these processes.