Red Hat Training

A Red Hat training course is available for Red Hat Decision Manager

Chapter 3. Decision Server clusters in a runtime environment

The primary benefit of clustering a Decision 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 Decision Server clustered runtime environment, you download and extract Red Hat JBoss EAP 7.2 and Decision Server. Then, you configure Red Hat JBoss EAP 7.2 for a cluster, start the cluster, and install Decision Server on each cluster node.

If desired, you can then cluster the headless Decision Manager controller.

3.1. Downloading and extracting Red Hat JBoss EAP 7.2 and Decision Server

Complete the steps in this section to download and install Red Hat JBoss EAP 7.2 and Decision Server for installation in a clustered environment.

Procedure

  1. Download Red Hat JBoss EAP 7.2 on each node of the cluster:

    1. 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: Red Hat JBoss EAP
      • Version: 7.2
    2. Click Download next to Red Hat JBoss Enterprise Application Platform 7.2.0. (jboss-eap-7.2.0.zip).
  2. Extract the jboss-eap-7.2.0.zip file. The jboss-eap-7.2/jboss-eap-7.2 directory is referred to as EAP_HOME.
  3. Download and apply the latest Red Hat JBoss EAP patch, if available.
  4. Download Decision Server:

    1. Navigate to the Software Downloads page in the Red Hat Customer Portal and select the product and version from the drop-down options:

      • Product: Decision Manager
      • Version: 7.3
    2. Download Red Hat Decision Manager 7.3.0 Decision Server for All Supported EE8 Containers (rhdm-7.3.0-kie-server-ee8.zip).
  5. Extract the rhdm-7.3.0-kie-server-ee8.zip archive to a temporary directory. In the following examples this directory is called TEMP_DIR.
  6. Copy the TEMP_DIR/rhdm-7.3.0-kie-server-ee8/rhdm-7.3.0-kie-server-ee8/kie-server.war directory to EAP_HOME/standalone/deployments/.

    Warning

    Ensure the names of the Red Hat Decision Manager deployments you are copying do not conflict with your existing deployments in the Red Hat JBoss EAP instance.

  7. Copy the contents of the TEMP_DIR/rhdm-7.3.0-kie-server-ee8/rhdm-7.3.0-kie-server-ee8/SecurityPolicy/ to EAP_HOME/bin. When asked to overwrite files, click Replace.
  8. In the EAP_HOME/standalone/deployments/ directory, create an empty file named kie-server.war.dodeploy. This file ensures that Decision Server is automatically deployed when the server starts.
  9. Download and apply the latest Red Hat Decision Manager patch, if available.
  10. Navigate to the EAP_HOME/bin directory.
  11. Create a user with the kie-server role that you will use to log in to Decision Server.

    $ ./add-user.sh -a --user <USERNAME>  --password <PASSWORD> --role kie-server
  12. Make a note of your user names and passwords.
  13. To start the cluster, navigate to EAP_HOME/bin and enter one of the following commands:

    • On Linux or UNIX-based systems:

      $ ./standalone.sh -c standalone-full.xml
    • On Windows:

      standalone.bat -c standalone-full.xml

3.2. Clustering Decision Servers with the headless Decision Manager controller

The Decision Manager controller is integrated with Business Central. However, if you do not install Business Central, you can install the headless Decision Manager controller and use the REST API or the Decision Server Java Client API to interact with it.

Prerequisites

  • A backed-up Red Hat JBoss EAP installation version 7.2 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 mounted partition is available.

Procedure

  1. 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: Decision Manager
    • Version: 7.3
  2. Download Red Hat Decision Manager 7.3.0 Add Ons (the rhdm-7.3.0-add-ons.zip file).
  3. Unzip the rhdm-7.3.0-add-ons.zip file. The rhdm-7.3-controller-ee7.zip file is in the unzipped directory.
  4. Extract the rhdm-7.3-controller-ee7 archive to a temporary directory. In the following examples this directory is called TEMP_DIR.
  5. Copy the TEMP_DIR/rhdm-7.3-controller-ee7/controller.war directory to EAP_HOME/standalone/deployments/.

    Warning

    Ensure that the names of the headless Decision Manager controller deployments you are copying do not conflict with your existing deployments in the Red Hat JBoss EAP instance.

  6. Copy the contents of the TEMP_DIR/rhdm-7.3-controller-ee7/SecurityPolicy/ directory to EAP_HOME/bin. When asked to overwrite files, select Yes.
  7. In the EAP_HOME/standalone/deployments/ directory, create an empty file named controller.war.dodeploy. This file ensures that the headless Decision Manager controller is automatically deployed when the server starts.
  8. Open the EAP_HOME/standalone/configuration/standalone.xml file in a text editor.
  9. 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:

    <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>

    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.

  10. To start the headless Decision Manager controller, navigate to EAP_HOME/bin and enter the following command:

    • On Linux or UNIX-based systems:

      $ ./standalone.sh
    • On Windows:

      standalone.bat