Installing and configuring Red Hat Decision Manager in a Red Hat JBoss EAP clustered environment

Red Hat Decision Manager 7.2

Red Hat Customer Content Services

Abstract

This document describes how to create a Red Hat Decision Manager 7.2 clustered environment on Red Hat JBoss Enterprise Application Platform 7.2.

Preface

As a system engineer, you can create a Red Hat Decision Manager clustered environment to provide high availability and load balancing for your development and runtime environments.

Prerequisite

You have reviewed the information in Planning a Red Hat Decision Manager installation.

Chapter 1. Red Hat Decision Manager clusters

By clustering two or more computers, you have the benefits of high availability, enhanced collaboration, and load balancing. High availability decreases the chance of a loss of data when a single computer fails. When a computer fails, another computer fills the gap by providing a copy of the data that was on the failed computer. When the failed computer comes online again, it resumes its place in the cluster. Load balancing shares the computing load across the nodes of the cluster. Doing this improves the overall performance.

There are several ways that you can cluster Red Hat Decision Manager components. This document describes how to cluster the following scenarios:

Chapter 2. Red Hat Decision Manager clusters in a development (authoring) environment

Note

Configuration of Decision Central for high availability is currently technology preview.

The primary benefit of clustering Red Hat Decision Manager development environments is high availability. If clustering is configured and Developer X is working on Node1 and that node fails, Developer X’s work is preserved and visible on any other node of the cluster.

Most development environments consist of Decision Central and at least one Decision Server

To create a Red Hat Decision Manager clustered development environment, you download and extract Red Hat JBoss EAP 7.2 and Red Hat Decision Manager 7.2. Then, you configure Red Hat JBoss EAP 7.2 with Elasticsearch and AMQ Broker, a Java messaging server (JMS) broker. Finally, you start the cluster and install Decision Central on each cluster node.

Elasticsearch is a highly scalable open source full-text search and analytics engine. It enables you to store, search, and analyze high volumes of data quickly and in near-real time. In a Red Hat Decision Manager clustered environment, it enables you to perform complex and efficient searches across cluster nodes.

A JMS broker is a software component that receives messages, stores them locally, and forwards the messages to a recipient. AMQ Broker enables your applications to communicate with any messaging provider. It specifies how components such as message-driven beans, Enterprise JavaBeans, and servlets can send or receive messages.

2.1. Installing and configuring Elasticsearch

To use Elasticsearch for more efficient searching across cluster nodes, you must install and configure Elasticsearch for the Red Hat Decision Manager clustered environment. Use the following instructions to configure a simplified, non-high availability environment.

To configure Elasticsearch for a high availability Red Hat Decision Manager clustered environment, see the Elasticsearch documentation.

Procedure

  1. Download and unzip the Elasticsearch installation file.
  2. Replace the contents of the elasticsearch/config/elasticsearch.yml file with the following content, where <ELASTICSEARCH_NODE_IP> is the IP address of the system where you unzipped the Elasticsearch file:

    cluster.name: kie-cluster
    transport.host: <ELASTICSEARCH_NODE_IP>
    http.host: <ELASTICSEARCH_NODE_IP>
    transport.tcp.port: 9300
    discovery.zen.minimum_master_nodes: 1
  3. Run Elasticsearch:

    • On Linux or UNIX-based systems, enter:

      ELASTICSEARCH_HOME_/bin/elasticsearch

      On Windows, enter:

      ELASTICSEARCH_HOME\bin\elasticsearch.bat

2.2. Downloading and configuring AMQ Broker

AMQ Broker enables your applications to communicate with any messaging provider. It specifies how components such as message-driven beans, Enterprise JavaBeans, and servlets can send or receive messages. Use the following instructions to configure a simplified, non-high availability environment.

To configure AMQ Broker for a high availability Red Hat Decision Manager clustered environment, see Using AMQ Broker.

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: AMQ Broker
    • Version: 7.2.0
  2. Click Download next to Red Hat AMQ Broker 7.2.0 (amq-broker-7.2.0-bin.zip).
  3. Extract the amq-broker-7.2.0-bin.zip file.
  4. Change directory to amq-broker-7.2.0-bin/amq-broker-7.2.0/bin.
  5. Enter the following command and replace the following placeholders to create the broker and broker user:

    • <HOST> is the IP address or host name of the server where you installed AMQ Broker.
    • <AMQ_USER> and <AMQ_PASSWORD> is a user name and password combination of your choice.
    • <BROKER_NAME> is a name for the broker that you are creating.

      ./artemis create --host <HOST> --user <AMQ_USER> --password <AMQ_PASSWORD> --require-login <BROKER_NAME>
  6. To run AMQ Broker, enter the following command in the amq-broker-7.2.0-bin/amq-broker-7.2.0/bin directory:

    amq-broker-7.2.0/bin/<BROKER_NAME>/bin/artemis run

2.3. Downloading and extracting Red Hat JBoss EAP 7.2 and Red Hat Decision Manager

Download and install Red Hat JBoss EAP 7.2 and Red Hat Decision Manager 7.2 on each node of the cluster.

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: Enterprise Application Platform
      • Version: 7.2
    2. Click Download next to Red Hat JBoss Enterprise Application Platform {EAP_VERSION_LONG}. (JBEAP-{EAP_VERSION_LONG}/jboss-eap-{EAP_VERSION_LONG}.zip).
  2. Extract the jboss-eap-{EAP_VERSION_LONG}.zip file. In the following steps, EAP_HOME is the jboss-eap-7.2/jboss-eap-7.2 directory.
  3. Download and apply the latest Red Hat JBoss EAP patch, if available.
  4. Download Red Hat Decision Manager on each node of the cluster:

    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.2
    2. Download Red Hat Decision Manager 7.2.0 Decision Central Deployable for Red Hat JBoss EAP 7 (rhdm-7.2.0-decision-central-eap7-deployable.zip).
  5. Extract the rhdm-7.2.0-decision-central-eap7-deployable.zip file to a temporary directory. In the following commands this directory is called TEMP_DIR.
  6. Open the TEMP_DIR/rhdm-7.2.0-decision-central-eap7-deployable/jboss-eap-7.2/standalone/deployments/decision-central.war/WEB-INF/web.xml/ file, uncomment the <distributable/> tag, and save the web.xml file.
  7. Copy the contents of TEMP_DIR/rhdm-7.2.0-decision-central-eap7-deployable/jboss-eap-7.2 to EAP_HOME.
  8. Download and apply the latest Red Hat Decision Manager patch, if available.
  9. Navigate to the EAP_HOME/bin directory.
  10. Create a user with the admin role that you will use to log in to Decision Central. In the following command, replace <username> and <password> with the user name and password of your choice.

    $ ./add-user.sh -a --user <USERNAME>  --password <PASSWORD> --role admin
    Note

    Make sure that the specified user name is not the same as an existing user, role, or group. For example, do not create a user with the user name admin.

    The password must have at least eight characters and must contain at least one number and one non-alphanumeric character, but not & (ampersand).

  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.

2.4. Configuring and running Decision Central in a cluster

After you install Red Hat JBoss EAP and Decision Central you can use Elasticsearch and the AMQ Broker to configure the cluster.

Note

These steps describe a basic cluster configuration. For more complex configurations, see the Red Hat JBoss EAP 7.2 Configuration Guide.

Prerequisites

Procedure

  1. Open the EAP_HOME/standalone/configuration/standalone-full-ha.xml file in a text editor.
  2. Edit or add the following properties to the <system-properties> element and replace the following placeholders:

    • <AMQ_USER> and <AMQ_PASSWORD> are the credentials that you defined when creating the AMQ Broker.
    • <AMQ_BROKER_IP_ADDRESS> is the IP address of the AMQ Broker.
    • <ELASTICSEARCH_NODE_IP> is the IP address where Elasticseach is installed.
    • <SHARED_NETWORK_FOLDER> is the network folder that all Decision Centrals in the cluster use to exchange data. This folder must be the same on all nodes of the cluster.
    <system-properties>
      <property name="appformer-jms-connection-mode" value="REMOTE"/>
      <property name="appformer-jms-username" value="<AMQ_USER>  "/>
      <property name="appformer-jms-password" value="<AMQ_USER_PASSWORD>"/>
      <property name="appformer-jms-url" value="tcp://<AMQ_BROKER_IP_ADDRESS>:61616?ha=true&amp;retryInterval=1000&amp;retryIntervalMultiplier=1.0&amp;reconnectAttempts=-1"/>
      <property name="org.appformer.ext.metadata.elastic.port" value="9300"/>
      <property name="org.appformer.ext.metadata.elastic.host"
          value="<ELASTICSEARCH_NODE_IP>"/>
      <property name="org.appformer.ext.metadata.elastic.cluster"
          value="kie-cluster"/>
      <property name="org.appformer.ext.metadata.index" value="elastic"/>
      <property name="org.appformer.ext.metadata.elastic.retries" value="10"/>
      <property name="org.uberfire.nio.git.dir" value="<SHARED_NETWORK_FOLDER>"/>
      <property name="es.set.netty.runtime.available.processors" value="false"/>
    </system-properties>
  3. Save the standalone-full-ha.xml file.
  4. 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-ha.xml
    • On Windows:

      standalone.bat -c standalone-full-ha.xml

2.5. Verifying the Red Hat Decision Manager cluster

After configuring the cluster for Red Hat Decision Manager, create an asset to verify that the installation is working.

Procedure

  1. In a web browser, enter <node-IP-address>:8080/decision-central. Replace <node-IP-address> with the IP address of a particular node.
  2. Enter the admin user credentials that you created during installation. The Decision Central home page appears.
  3. Select MenuDesignProjects.
  4. Click Try SamplesMortgagesOK. The Assets window appears.
  5. Click Create New AssetData Object.
  6. Enter MyDataObject in the Data Object field and click OK.
  7. Click SpacesMySpaceMortgages and confirm that MyDataObject is in the list of assets.
  8. Enter the following URL in a web browser, where <node_IP_address> is the address of a different node of the cluster:

    http://<node_IP_address>:8080/decision-central

  9. Enter the same credentials that you used to log in to Decision Central on the first node, where you created the MyDataObject asset.
  10. Select MenuDesignProjects.
  11. Select the Mortgages project.
  12. Verify that MyDataObject is in the asset list.
  13. Delete the Mortgages project.

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 {EAP_VERSION_LONG}. (jboss-eap-{EAP_VERSION_LONG}.zip).
  2. Extract the jboss-eap-{EAP_VERSION_LONG}.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.2
    2. Download Red Hat Decision Manager 7.2.0 Decision Server for All Supported EE7 Containers (rhdm-7.2.0-kie-server-ee7.zip).
  5. Extract the rhdm-7.2.0-kie-server-ee7.zip archive to a temporary directory. In the following examples this directory is called TEMP_DIR.
  6. Copy the TEMP_DIR/rhdm-7.2.0-kie-server-ee7/rhdm-7.2.0-kie-server-ee7/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.2.0-kie-server-ee7/rhdm-7.2.0-kie-server-ee7/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 with the headless Decision Manager controller

The Decision Manager controller is integrated with Decision Central. However, if you do not install Decision 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.2
  2. Download Red Hat Decision Manager 7.2.0 Add Ons (the rhdm-7.2.0-add-ons.zip file).
  3. Unzip the rhdm-7.2.0-add-ons.zip file. The rhdm-7.2-controller-ee7.zip file is in the unzipped directory.
  4. Extract the rhdm-7.2-controller-ee7 archive to a temporary directory. In the following examples this directory is called TEMP_DIR.
  5. Copy the TEMP_DIR/rhdm-7.2-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.2-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

Chapter 4. Additional resources

Appendix A. Versioning information

Documentation last updated on Wednesday, February 13, 2019.

Legal Notice

Copyright © 2019 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.