Chapter 14. Installing Red Hat Process Automation Manager from ZIP files

You can use the Red Hat Process Automation Manager ZIP files (one for Business Central and one for KIE Server) to install Red Hat Process Automation Manager without using the installer.

Note

You should install Business Central and KIE Server on different servers in production environments.

For information about installing the headless Process Automation Manager controller, see Chapter 19, Installing and running the headless Process Automation Manager controller.

14.1. Installing Business Central from the ZIP file

Business Central is the graphical user interface where you create and manage business rules that KIE Server executes. You can use a deployable ZIP file to install and configure Business Central.

Prerequisites

Procedure

  1. Extract the rhpam-7.13.5-business-central-eap7-deployable.zip file to a temporary directory. In the following examples this directory is called TEMP_DIR.
  2. Copy the contents of the TEMP_DIR/rhpam-7.13.5-business-central-eap7-deployable/jboss-eap-7.4 directory to EAP_HOME. When prompted, merge or replace files.

    Warning

    Ensure that the names of the Red Hat Process Automation Manager deployments that you copy do not conflict with your existing deployments in the Red Hat JBoss EAP instance.

14.2. Installing KIE Server from the ZIP file

KIE Server provides the runtime environment for business assets and accesses the data stored in the assets repository (knowledge store). You can use a deployable ZIP file to install and configure KIE Server.

Prerequisites

Procedure

  1. 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.
  2. Copy the TEMP_DIR/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.

  3. 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.
  4. When prompted to overwrite files, click Replace.
  5. 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.

14.3. Creating users

If you used the deployable ZIP files to install Red Hat Process Automation Manager, before you can log in to Business Central or KIE Server, you must create users. This section shows you how to create a Business Central user with the admin, rest-all, and kie-server roles and a KIE Server user that has the kie-server role. For information about roles, see Chapter 11, Red Hat Decision Manager roles and users.

Note

Red Hat Decision Manager stores user data as a set of properties or as a set of files. File-based storage provides several extra features, such as SSH login and a user maintenance UI.

The user script examples in this documentation use the file-based user script, jboss-cli.sh, instead of the property-based user script, add-users.sh.

Prerequisites

  • Red Hat Process Automation Manager is installed in the base directory of the Red Hat JBoss EAP installation (EAP_HOME).

Procedure

  1. Optional: To change Red Hat Process Automation Manager from using property-based user storage to file-based user storage, complete the following steps:

    1. Run the following command to apply the kie-fs-realm patch:

      $ ./bin/elytron-tool.sh filesystem-realm --users-file application-users.properties --roles-file application-roles.properties --output-location kie-fs-realm-users
    2. Open each kie-fs-realm-users/*/<USER>.xml file where <USER> is a Red Hat Process Automation Manager user.
    3. Replace <attribute name="roles" value= with <attribute name="role" value=.
  2. In a terminal application, navigate to the EAP_HOME/bin directory.
  3. Create a user with the admin, rest-all, and kie-server roles.

    Note

    Users with the admin role are Business Central administrators. Users with rest-all role can access Business Central REST capabilities. Users with the kie-server role can access KIE Server (KIE Server) REST capabilities.

    In the following command, replace <USERNAME> and <PASSWORD> with the user name and password of your choice:

    $ ./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=[admin,rest-all,kie-server])"
    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).

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

    $ ./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])"
  5. Make a note of your user names and passwords.
  6. Optional: If you installed Business Central and KIE Server in the same server instance, you can create a single user that has both of these roles:

    $ ./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=[admin,rest-all,kie-server])"
    Note

    You should install Business Central and KIE Server on different servers in production environments.

  7. Optional: To create several users at one time, create a file that contains the user data and run the following command, where <USER_DATA>.cli is the file that contains the user data:

    $ ./bin/jboss-cli.sh --file=<USER_DATA>.cli

    The <USER_DATA>.cli file should contain data similar to the following example:

    embed-server --std-out=echo
    
    # first user
    /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=[admin,role,group])
    
    # second user
    ...

14.4. Configuring KIE Server to connect to Business Central

Warning

This section provides a sample setup that you can use for testing purposes. Some of the values are unsuitable for a production environment, and are marked as such.

If a KIE Server is not configured in your Red Hat Process Automation Manager environment, or if you require additional KIE Servers in your Red Hat Process Automation Manager environment, you must configure a KIE Server to connect to Business Central.

Note

If you are deploying KIE Server on Red Hat OpenShift Container Platform, see the Deploying an Red Hat Decision Manager environment on Red Hat OpenShift Container Platform 4 using Operators document for instructions about configuring it to connect to Business Central.

Prerequisites

Procedure

  1. In your Red Hat Process Automation Manager installation directory, navigate to the standalone-full.xml file. For example, if you use a Red Hat JBoss EAP installation for Red Hat Process Automation Manager, go to $EAP_HOME/standalone/configuration/standalone-full.xml.
  2. Open the standalone-full.xml file and under the <system-properties> tag, set the following JVM properties:

    Table 14.1. JVM Properties for the managed KIE Server instance

    PropertyValueNote

    org.kie.server.id

    default-kie-server

    The KIE Server ID.

    org.kie.server.controller

    http://localhost:8080/business-central/rest/controller

    The location of Business Central. The URL for connecting to the API of Business Central.

    org.kie.server.controller.user

    controllerUser

    The user name with the role rest-all who can log in to the Business Central.

    org.kie.server.controller.pwd

    controllerUser1234;

    The password of the user who can log in to the Business Central.

    org.kie.server.location

    http://localhost:8080/kie-server/services/rest/server

    The location of KIE Server. The URL for connecting to the API of KIE Server.

    Table 14.2. JVM Properties for the Business Central instance

    PropertyValueNote

    org.kie.server.user

    controllerUser

    The user name with the role kie-server.

    org.kie.server.pwd

    controllerUser1234;

    The password of the user.

    The following example shows how to configure a KIE Server instance:

    <property name="org.kie.server.id" value="default-kie-server"/>
    <property name="org.kie.server.controller" value="http://localhost:8080/business-central/rest/controller"/>
    <property name="org.kie.server.controller.user" value="controllerUser"/>
    <property name="org.kie.server.controller.pwd" value="controllerUser1234;"/>
    <property name="org.kie.server.location" value="http://localhost:8080/kie-server/services/rest/server"/>

    The following example shows how to configure a for Business Central instance:

    <property name="org.kie.server.user" value="controllerUser"/>
    <property name="org.kie.server.pwd" value="controllerUser1234;"/>
  3. To verify that KIE Server starts successfully, send a GET request to http://SERVER:PORT/kie-server/services/rest/server/ when KIE Server is running. For more information about running Red Hat Process Automation Manager on KIE Server, see Running Red Hat Process Automation Manager.

    After successful authentication, you receive an XML response similar to the following example:

    <response type="SUCCESS" msg="Kie Server info">
        <kie-server-info>
            <capabilities>KieServer</capabilities>
            <capabilities>BRM</capabilities>
            <capabilities>BPM</capabilities>
            <capabilities>CaseMgmt</capabilities>
            <capabilities>BPM-UI</capabilities>
            <capabilities>BRP</capabilities>
            <capabilities>DMN</capabilities>
            <capabilities>Swagger</capabilities>
            <location>http://localhost:8230/kie-server/services/rest/server</location>
            <messages>
                <content>Server KieServerInfo{serverId='first-kie-server', version='7.5.1.Final-redhat-1', location='http://localhost:8230/kie-server/services/rest/server', capabilities=[KieServer, BRM, BPM, CaseMgmt, BPM-UI, BRP, DMN, Swagger]}started successfully at Mon Feb 05 15:44:35 AEST 2018</content>
                <severity>INFO</severity>
                <timestamp>2018-02-05T15:44:35.355+10:00</timestamp>
            </messages>
            <name>first-kie-server</name>
            <id>first-kie-server</id>
            <version>7.5.1.Final-redhat-1</version>
        </kie-server-info>
    </response>
  4. Verify successful registration:

    1. Log in to Business Central.
    2. Click MenuDeployExecution Servers.

      If registration is successful, you will see the registered server ID.

14.5. Thread efficiency

To ensure that the optimal number of threads are used, set the value of the threading system properties to the sum of the number of CPUs plus one.

  1. In your Red Hat Process Automation Manager installation directory, navigate to the standalone-full.xml file. For example, if you use a Red Hat JBoss EAP installation for Red Hat Process Automation Manager, go to $EAP_HOME/standalone/configuration/standalone-full.xml.
  2. Open the standalone-full.xml file.
  3. Under the <system-properties> tag, set the value of the following JVM properties to the number of CPUs plus one:
org.appformer.concurrent.managed.thread.limit
org.appformer.concurrent.unmanaged.thread.limit
org.appformer.concurrent.indexing.thread.limit
org.appformer.concurrent.rest.api.thread.limit
Note

The number of CPUs plus one is a valid baseline value for all properties. You might have to fine-tune further based on additional testing.