Chapter 5. Installing Red Hat Decision Manager from ZIP files

The Red Hat Decision Manager ZIP files (one for Business Central and one for KIE Server) do not require a graphical user interface.

Note

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

For information about installing the headless Decision Manager controller, see Chapter 10, Installing and running the headless Decision Manager controller.

5.1. Installing Business Central from the ZIP file

Business Central is a web console that enables you to create, manage, and edit your rules and related assets in a unified web-based environment.

Prerequisites

  • A backed-up Red Hat JBoss EAP installation version 7.3 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.
  • The following file is downloaded as described in Chapter 3, Downloading the Red Hat Decision Manager installation files:

    rhdm-7.8.0-decision-central-eap7-deployable.zip

Procedure

  1. Extract the rhdm-7.8.0-decision-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/rhdm-7.8.0-decision-central-eap7-deployable/jboss-eap-7.3 directory to EAP_HOME. When prompted, merge or replace files.

    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.

5.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).

Prerequisites

  • A backed-up Red Hat JBoss EAP installation version 7.3 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.
  • The following file is downloaded as described in Chapter 3, Downloading the Red Hat Decision Manager installation files:

    rhdm-7.8.0-kie-server-ee8.zip

Procedure

  1. Extract the rhdm-7.8.0-kie-server-ee8.zip archive to a temporary directory. In the following examples this directory is called TEMP_DIR.
  2. Copy the TEMP_DIR/rhdm-7.8.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 copy do not conflict with your existing deployments in the Red Hat JBoss EAP instance.

  3. Copy the contents of the TEMP_DIR/rhdm-7.8.0-kie-server-ee8/rhdm-7.8.0-kie-server-ee8/SecurityPolicy/ to EAP_HOME/bin. When asked to overwrite files, click Replace.
  4. 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.

5.3. Configuring JDBC data sources for KIE Server

A data source is an object that enables a Java Database Connectivity (JDBC) client, such as an application server, to establish a connection with a database. Applications look up the data source on the Java Naming and Directory Interface (JNDI) tree or in the local application context and request a database connection to retrieve data. You must configure data sources for KIE Server to ensure proper data exchange between the servers and the designated database.

Note

For production environments, specify an actual data source. Do not use the example data source in production environments.

Prerequisites

  • The JDBC providers that you want to use to create database connections are configured on all servers on which you want to deploy KIE Server, as described in the "Creating Datasources" and "JDBC Drivers" sections of the Red Hat JBoss Enterprise Application Server Configuration Guide.
  • The Red Hat Decision Manager 7.8.0 Add Ons (rhdm-7.8.0-add-ons.zip) file is downloaded from the Software Downloads page in the Red Hat Customer Portal.

Procedure

  1. Complete the following steps to prepare your database:

    1. Extract rhdm-7.8.0-add-ons.zip in a temporary directory, for example TEMP_DIR.
    2. Extract TEMP_DIR/rhdm-7.8.0-migration-tool.zip.
    3. Change your current directory to the TEMP_DIR/rhdm-7.8.0-migration-tool/ddl-scripts directory. This directory contains DDL scripts for several database types.
    4. Import the DDL script for your database type into the database that you want to use, for example:

      psql jbpm < /ddl-scripts/postgresql/postgresql-jbpm-schema.sql
      Note

      If you are using PostgreSQL or Oracle in conjunction with Spring Boot, you must import the respective Spring Boot DDL script, for example /ddl-scripts/oracle/oracle-springboot-jbpm-schema.sql or /ddl-scripts/postgresql/postgresql-springboot-jbpm-schema.sql.

  2. Open EAP_HOME/standalone/configuration/standalone-full.xml in a text editor and locate the <system-properties> tag.
  3. Add the following properties to the <system-properties> tag where <DATASOURCE> is the JNDI name of your data source and <HIBERNATE_DIALECT> is the hibernate dialect for your database.

    Note

    The default value of the org.kie.server.persistence.ds property is java:jboss/datasources/ExampleDS. The default value of the org.kie.server.persistence.dialect property is org.hibernate.dialect.H2Dialect.

    <property name="org.kie.server.persistence.ds" value="<DATASOURCE>"/>
    <property name="org.kie.server.persistence.dialect" value="<HIBERNATE_DIALECT>"/>

    The following example shows how to configure a datasource for the PostgreSQL hibernate dialect:

    <system-properties>
        <property name="org.kie.server.repo" value="${jboss.server.data.dir}"/>
        <property name="org.kie.example" value="true"/>
        <property name="org.jbpm.designer.perspective" value="full"/>
        <property name="designerdataobjects" value="false"/>
        <property name="org.kie.server.user" value="rhdmUser"/>
        <property name="org.kie.server.pwd" value="rhdm123!"/>
        <property name="org.kie.server.location" value="http://localhost:8080/kie-server/services/rest/server"/>
        <property name="org.kie.server.controller" value="http://localhost:8080/decision-central/rest/controller"/>
        <property name="org.kie.server.controller.user" value="kieserver"/>
        <property name="org.kie.server.controller.pwd" value="kieserver1!"/>
        <property name="org.kie.server.id" value="local-server-123"/>
    
        <!-- Data source properties. -->
        <property name="org.kie.server.persistence.ds" value="java:jboss/datasources/KieServerDS"/>
        <property name="org.kie.server.persistence.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
    </system-properties>

The following dialects are supported:

  • DB2: org.hibernate.dialect.DB2Dialect
  • MSSQL: org.hibernate.dialect.SQLServer2012Dialect
  • MySQL: org.hibernate.dialect.MySQL5InnoDBDialect
  • MariaDB: org.hibernate.dialect.MySQL5InnoDBDialect
  • Oracle: org.hibernate.dialect.Oracle10gDialect
  • PostgreSQL: org.hibernate.dialect.PostgreSQL82Dialect
  • PostgreSQL plus: org.hibernate.dialect.PostgresPlusDialect
  • Sybase: org.hibernate.dialect.SybaseASE157Dialect

5.4. Creating users

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 2, Red Hat Decision Manager roles and users.

Prerequisites

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

Procedure

  1. In a terminal application, navigate to the EAP_HOME/bin directory.
  2. 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.

    $ ./add-user.sh -a --user <USERNAME>  --password <PASSWORD> --role 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).

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

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

    Note

    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:

    $ ./add-user.sh -a --user <USERNAME>  --password <PASSWORD> --role admin,rest-all,kie-server

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

5.5. Configuring KIE Server with the integrated Decision Manager controller

Note

Only make the changes described in this section if KIE Server will be managed by Business Central and you installed Red Hat Decision Manager from the ZIP files. If you did not install Business Central, you can use the headless Decision Manager controller to manage KIE Server, as described in Chapter 10, Installing and running the headless Decision Manager controller.

KIE Server can be managed or it can be unmanaged. If KIE Server is unmanaged, you must manually create and maintain KIE containers (deployment units). If KIE Server is managed, the Decision Manager controller manages the KIE Server configuration and you interact with the Decision Manager controller to create and maintain KIE containers.

The Decision Manager controller is integrated with Business Central. If you install Business Central, you can use the Execution Server page in Business Central to interact with the Decision Manager controller.

If you installed Red Hat Decision Manager from the ZIP files, you must edit the standalone-full.xml file in both the KIE Server and Business Central installations to configure KIE Server with the integrated Decision Manager controller.

Prerequisites

Procedure

  1. In the Business Central EAP_HOME/standalone/configuration/standalone-full.xml file, uncomment the following properties in the <system-properties> section and replace <USERNAME> and <USER_PWD> with the credentials of a user with the kie-server role:

       <property name="org.kie.server.user" value="<USERNAME>"/>
       <property name="org.kie.server.pwd" value="<USER_PWD>"/>
  2. In the KIE Server EAP_HOME/standalone/configuration/standalone-full.xml file, uncomment the following properties in the <system-properties> section.

      <property name="org.kie.server.controller.user" value="<CONTROLLER_USER>"/>
      <property name="org.kie.server.controller.pwd" value="<CONTROLLER_PWD>"/>
      <property name="org.kie.server.id" value="<KIE_SERVER_ID>"/>
      <property name="org.kie.server.location" value="http://<HOST>:<PORT>/kie-server/services/rest/server"/>
      <property name="org.kie.server.controller" value="<CONTROLLER_URL>"/>
  3. Replace the following values:

    • Replace <CONTROLLER_USER> and <CONTROLLER_PWD> with the credentials of a user with the rest-all role.
    • Replace <KIE_SERVER_ID> with the ID or name of the KIE Server installation, for example, rhdm-7.8.0-kie-server-1.
    • Replace <HOST> with the ID or name of the KIE Server host, for example, localhost or 192.7.8.9.
    • Replace <PORT> with the port of the KIE Server host, for example, 8080.

      Note

      The org.kie.server.location property specifies the location of KIE Server.

    • Replace <CONTROLLER_URL> with the URL of Business Central. KIE Server connects to this URL during startup.

      • If you installed Business Central using the installer or Red Hat JBoss EAP zip installations, <CONTROLLER_URL> has this format:

        http://<HOST>:<PORT>/decision-central/rest/controller

      • If you are running Business Central using the standalone.jar file, <CONTROLLER_URL> has this format:

        http://<HOST>:<PORT>/rest/controller