Chapter 29. KIE Server clusters in a runtime environment
Chapter 29. KIE Server clusters in a runtime environment The primary benefit of clustering a KIE Server runtime environment is load balancing. If activity on one node of the cluster increases, that activity can be shared among the other nodes of the cluster to improve performance. To create a KIE Server clustered runtime environment, you download and extract Red Hat JBoss EAP 7.4 and KIE Server. Then, you configure Red Hat JBoss EAP 7.4 for a cluster, start the cluster, and install KIE Server on each cluster node. Optionally, you can then cluster the headless Process Automation Manager controller. Note Do not connect KIE Server to Business Central in high availability (HA) on premise environments. Business Central instances are not able to keep in sync with the status of each KIE Server. For example, if a KIE Server is up but not in sync, Business Central will not be able to deploy through that instance. 29.1. Downloading and extracting Red Hat JBoss EAP 7.4 and KIE Server Complete the steps in this section to download and install Red Hat JBoss EAP 7.4 and KIE Server for installation in a clustered environment. Procedure Download Red Hat JBoss EAP 7.4 on each node of the cluster: Navigate to the Software Downloads page in the Red Hat Customer Portal (login required) and select the product and version from the drop-down options: Product: Enterprise Application Platform Version: 7.4 Click Download to Red Hat JBoss Enterprise Application Platform 7.4.14 . ( jboss-eap-7.4.14.zip ). Extract the jboss-eap-7.4.14.zip file. The jboss-eap-7.4/jboss-eap-7.4 directory is referred to as EAP_HOME . Download and apply the latest Red Hat JBoss EAP patch, if available. Download KIE Server: Navigate to the Software Downloads page in the Red Hat Customer Portal and select the product and version from the drop-down options: PRODUCT: Process Automation Manager Version: 7.13.5 Download Red Hat Process Automation Manager 7.13.5 KIE Server for All Supported EE8 Containers ( rhpam-7.13.5-kie-server-ee8.zip ). Extract the rhpam-7.13.5-kie-server-ee8.zip archive to a temporary directory. In the following examples this directory is called TEMP_DIR . Copy the TEMP_DIR /rhpam-7.13.5-kie-server-ee8/rhpam-7.13.5-kie-server-ee8/kie-server.war directory to EAP_HOME /standalone/deployments/ . Warning Ensure the names of the Red Hat Decision Manager deployments you copy do not conflict with your existing deployments in the Red Hat JBoss EAP instance. Copy the contents of the TEMP_DIR /rhpam-7.13.5-kie-server-ee8/rhpam-7.13.5-kie-server-ee8/SecurityPolicy/ to EAP_HOME /bin . When prompted to overwrite files, click Replace . In the EAP_HOME /standalone/deployments/ directory, create an empty file named kie-server.war.dodeploy . This file ensures that KIE Server is automatically deployed when the server starts. Download and apply the latest Red Hat Decision Manager patch, if available. Navigate to the EAP_HOME /bin directory. Create a user with the kie-server role that you will use to log in to KIE Server. USD ./bin/jboss-cli.sh --commands="embed-server --std-out=echo,/subsystem=elytron/filesystem-realm=ApplicationRealm:add-identity(identity=<USERNAME>),/subsystem=elytron/filesystem-realm=ApplicationRealm:set-password(identity=<USERNAME>, clear={password='<PASSWORD>'}),/subsystem=elytron/filesystem-realm=ApplicationRealm:add-identity-attribute(identity=<USERNAME>, name=role, value=['kie-server'])" Make a note of your user names and passwords. To start the cluster, navigate to EAP_HOME /bin and enter one of the following commands: On Linux or UNIX-based systems: USD ./standalone.sh -c standalone-full.xml On Windows: standalone.bat -c standalone-full.xml 29.2. Clustering KIE Servers with the headless Process Automation Manager controller The Process Automation Manager controller is integrated with Business Central. However, if you do not install Business Central, you can install the headless Process Automation Manager controller and use the REST API or the KIE Server Java Client API to interact with it. Prerequisites A backed-up Red Hat JBoss EAP installation version 7.4 or later is available. The base directory of the Red Hat JBoss EAP installation is referred to as EAP_HOME . Sufficient user permissions to complete the installation are granted. An NFS server with a shared folder is available as described in Section 28.3, "Configuring an NFS version 4 server" . Procedure Navigate to the Software Downloads page in the Red Hat Customer Portal (login required), and select the product and version from the drop-down options: PRODUCT: Process Automation Manager Version: 7.13.5 Download Red Hat Process Automation Manager 7.13.5 Add Ons (the rhpam-7.13.5-add-ons.zip file). Extract the rhpam-7.13.5-add-ons.zip file. The rhpam-7.13.5-controller-ee7.zip file is in the extracted directory. Extract the rhpam-7.13.5-controller-ee7.zip archive to a temporary directory. In the following examples this directory is called TEMP_DIR . Copy the TEMP_DIR /rhpam-7.13.5-controller-ee7/controller.war directory to EAP_HOME /standalone/deployments/ . Warning Ensure that the names of the headless Process Automation Manager controller deployments you copy do not conflict with your existing deployments in the Red Hat JBoss EAP instance. Copy the contents of the TEMP_DIR /rhpam-7.13.5-controller-ee7/SecurityPolicy/ directory to EAP_HOME /bin . When prompted to overwrite files, click Yes . In the EAP_HOME /standalone/deployments/ directory, create an empty file named controller.war.dodeploy . This file ensures that the headless Process Automation Manager controller is automatically deployed when the server starts. Open the EAP_HOME /standalone/configuration/standalone.xml file in a text editor. Add the following properties to the <system-properties> element and replace <NFS_STORAGE> with the absolute path to the NFS storage where the template configuration is stored: Template files contain default configurations for specific deployment scenarios. If the value of the org.kie.server.controller.templatefile.watcher.enabled property is set to true, a separate thread is started to watch for modifications of the template file. The default interval for these checks is 30000 milliseconds and can be further controlled by the org.kie.server.controller.templatefile.watcher.interval system property. If the value of this property is set to false, changes to the template file are detected only when the server restarts. To start the headless Process Automation Manager controller, navigate to EAP_HOME /bin and enter the following command: On Linux or UNIX-based systems: USD ./standalone.sh On Windows: standalone.bat
./bin/jboss-cli.sh --commands="embed-server --std-out=echo,/subsystem=elytron/filesystem-realm=ApplicationRealm:add-identity(identity=<USERNAME>),/subsystem=elytron/filesystem-realm=ApplicationRealm:set-password(identity=<USERNAME>, clear={password='<PASSWORD>'}),/subsystem=elytron/filesystem-realm=ApplicationRealm:add-identity-attribute(identity=<USERNAME>, name=role, value=['kie-server'])" ./standalone.sh -c standalone-full.xml standalone.bat -c standalone-full.xml <system-properties> <property name="org.kie.server.controller.templatefile.watcher.enabled" value="true"/> <property name="org.kie.server.controller.templatefile" value="<NFS_STORAGE>"/> </system-properties> ./standalone.sh standalone.bat