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

Note

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

Developers can use Red Hat Process Automation Manager to author rules and processes that assist users with decision making.

You can configure Red Hat Process Automation Manager as a clustered development environment to benefit from high availability. With a clustered environment, if a developer is working on $node1 and that node fails, that developer’s work is preserved and visible on any other node of the cluster.

Most development environments consist of Business Central for creating rules and processes. and at least one Process Server to test those rules and processes .

To create a Red Hat Process Automation Manager clustered development environment, you must perform the following tasks:

  • Configure Red Hat JBoss EAP 7.2 with Red Hat Data Grid 7.3.1 on a machine.
  • Configure AMQ Broker, a Java messaging server (JMS) broker, on a machine.
  • Configure an NFS file server on a machine.
  • Download Red Hat JBoss EAP 7.2 and Red Hat Process Automation Manager 7.5, then install them on each machine that is to become a cluster node.
  • Configure and start Business Central on each cluster node to start the operation of the cluster.

Red Hat Data Grid is built from the Infinispan open-source software project. It is a distributed highly scalable full-text search and analytics engine. It contains indexing capabilities that enable you to store, search, and analyze high volumes of data quickly and in near-real time. In a Red Hat Process Automation 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 Red Hat Data Grid

To use Red Hat Data Grid for more efficient searching across cluster nodes, install and configure Red Hat Data Grid for the Red Hat Process Automation Manager clustered environment. Use the following instructions to configure a simplified, non-high availability environment on a separate machine.

For information about Red Hat Data Grid modules for Red Hat JBoss EAP, see Red Hat Data Grid modules for EAP in the Red Hat Data Grid User Guide.

Note

Do not install Red Hat Data Grid on the same node as Business Central.

Prerequisites

  • A Java Virtual Machine (JVM) environment compatible with Java 8.0 or later is installed.
  • A backed-up Red Hat JBoss EAP installation version 7.2 or higher is available. The base directory of the Red Hat JBoss EAP installation is referred to as EAP_HOME.
  • Red Hat Process Automation Manager is installed and configured.
  • Sufficient user permissions to complete the installation are granted.

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: Data Grid
    • Version: 7.3
  2. Download and unzip the Red Hat JBoss Data Grid 7.3.0 Server (jboss-datagrid-7.3.0-1-server.zip) installation file to the preferred location on your system.

    The unzipped directory is referred to as JDG_HOME.

  3. To run Red Hat Data Grid, navigate to JDG_HOME/bin and enter one of the following commands:

    • On Linux or UNIX-based systems:

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

      standalone.bat -c clustered.xml

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 on a separate machine.

To configure AMQ Broker for a high availability Red Hat Process Automation 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. Configuring an NFS server

You must deploy and configure an NFS server to provide the file system necessary for a Business Central clustered environment.

You must use NFS version 4.

Procedure

  1. Configure a server to export NFS version 4 shares. For instructions about exporting NFS shares on Red Hat Enterprise Linux, see Exporting NFS shares.
  2. Create an /opt/kie/data share with the options: rw,sync,no_root_squash. For example, you can use one of the following lines in the /etc/exports file:

    /opt/kie/data *(rw,sync,no_root_squash)
    /opt/kie/data 192.268.1.0/24(rw,sync,no_root_squash)
    Note

    You can use another share name instead of '/opt/kie/data'. In this case, you must use this name when configuring all nodes that run Business Central.

2.4. Downloading and extracting Red Hat JBoss EAP 7.2 and Red Hat Process Automation Manager

Download and install Red Hat JBoss EAP 7.2 and Red Hat Process Automation Manager 7.5 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 7.2.0. (JBEAP-7.2.0/jboss-eap-7.2.0.zip).
  2. Extract the jboss-eap-7.2.0.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 Process Automation 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: Process Automation Manager
      • Version: 7.5
    2. Download Red Hat Process Automation Manager 7.5.1 Business Central Deployable for Red Hat JBoss EAP 7 (rhpam-7.5.1-business-central-eap7-deployable.zip).
  5. Extract the rhpam-7.5.1-business-central-eap7-deployable.zip file to a temporary directory. In the following commands this directory is called TEMP_DIR.
  6. Copy the contents of TEMP_DIR/rhpam-7.5.1-business-central-eap7-deployable/jboss-eap-7.2 to EAP_HOME.
  7. Download and apply the latest Red Hat Process Automation Manager patch, if available.
  8. Navigate to the EAP_HOME/bin directory.
  9. Create a user with the admin role that you will use to log in to Business 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,rest-all
    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).

  10. Create a user with the kie-server role that you will use to log in to Process Server.

    $ ./add-user.sh -a --user <USERNAME> --password <PASSWORD> --role kie-server
  11. Make a note of your user names and passwords.

2.5. Configuring and running Business Central in a cluster

After you install Red Hat JBoss EAP and Business Central you can use Red Hat Data Grid and the AMQ Broker to configure the cluster. Complete these steps on each node of 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. Mount the directory shared over NFS as /data. Enter the following commands as the root user:

    mkdir /data
    mount <NFS_SERVER_IP>:<DATA_SHARE> /data

    Replace <NFS_SERVER_IP> with the IP address or hostname of the NFS server machine. Replace <DATA_SHARE> with the share name that you configured (for example, /opt/kie/data).

  2. Open the EAP_HOME/standalone/configuration/standalone-full.xml file in a text editor.
  3. Edit or add the properties under 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.
    • <INFINISPAN_NODE_IP> is the IP address where Red Hat Data Grid is installed.

      <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.infinispan.port"
           value="11222"/>
        <property name="org.appformer.ext.metadata.infinispan.host"
           value="<INFINISPAN_NODE_IP>"/>
        <property name="org.appformer.ext.metadata.infinispan.realm"
           value="ApplicationRealm"/>
        <property name="org.appformer.ext.metadata.infinispan.cluster"
           value="kie-cluster"/>
        <property name="org.appformer.ext.metadata.index"
           value="infinispan"/>
        <property name="org.uberfire.nio.git.dir"
           value="/data"/>
        <property name="es.set.netty.runtime.available.processors"
           value="false"/>
      </system-properties>
  4. Optional: If the Red Hat Data Grid deployment requires authentication, edit or add the properties under the <system-properties> element and replace the following placeholders:

    • <SERVER_NAME> is the server name specified in your Red Hat Data Grid server configuration.
    • <SASL_QOP> is the combination of auth, auth-int and auth-conf values for your Red Hat Data Grid server configuration.

      <property name="org.appformer.ext.metadata.infinispan.server.name"
         value="<SERVER_NAME>"/>
      <property name="org.appformer.ext.metadata.infinispan.sasl.qop"
         value="<SASL_QOP>"/>
      <property name="org.appformer.ext.metadata.infinispan.username"
         value=""/>
      <property name="org.appformer.ext.metadata.infinispan.password"
         value=""/>
  5. Save the standalone-full.xml file.
  6. 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

2.6. Verifying the Red Hat Process Automation Manager cluster

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

Procedure

  1. In a web browser, enter <node-IP-address>:8080/business-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 Business Central home page appears.
  3. Select MenuDesignProjects.
  4. Open the MySpace space.
  5. Click Try SamplesMortgagesOK. The Assets window appears.
  6. Click Add AssetData Object.
  7. Enter MyDataObject in the Data Object field and click OK.
  8. Click SpacesMySpaceMortgages and confirm that MyDataObject is in the list of assets.
  9. 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/business-central

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