Deploy the archive file to use Rule Execution Server on
the Liberty profile.
About this task
Configuring the
Rule Execution Server console
on Liberty involves the following:
- Copy the Rule Execution Server archive
file to the Liberty directory for deployment.
- Prepare the database and define the datasource. Unless you are
using Derby Embedded, make sure that you have already created the
database (see Creating the Decision
Server database).
- Define security access. Rule Execution Server uses
the roles resAdministrator, resConfigManager,
and resMonitor (see Rule Execution Server console and user
roles).
Procedure
- Create a Liberty profile
server by running the server command from <WLP_HOME>/bin.
For example: server create odm
- Copy the file <InstallDir>/executionserver/applicationservers/WLP855/res.war to <WLP_HOME>/usr/servers/<SERVER_NAME>/apps.
Note: The .war file supports version 18.0.0.3 of Liberty.
- Copy the database driver to a directory that you will specify
in the server.xml file when you declare the data
source. For example, copy the Derby embedded database driver derby.jar from <InstallDir>/shared/tools/derby/lib or
from the web to the <WLP_HOME>/usr/shared/resources/derby directory.
- In <WLP_HOME>/usr/servers/<SERVER_NAME>/server.xml,
add the following:
- To enable the required features, replace <feature>webProfile-7.0</feature> with:
<!-- Enable features -->
<featureManager>
<feature>servlet-3.1</feature>
<feature>jsp-2.3</feature>
<feature>jdbc-4.1</feature>
<feature>appSecurity-2.0</feature>
<feature>concurrent-1.0</feature>
</featureManager>
Note: You may need to enable the version of these features
by running a command such as: <WLP_HOME>/bin/installUtility
install servlet-3.1 jsp-2.3 jdbc-4.1 appSecurity-2.0 concurrent-1.0.
- To specify the address and port number on which the
server listens:
<httpEndpoint id="defaultHttpEndpoint"
host="*"
httpPort="9080"
httpsPort="9443"/>
- To define the data source:
<!-- RES data source -->
<jdbcDriver id="DerbyJdbcDriver" libraryRef="DerbyLib"/>
<library id="DerbyLib" filesetRef="DerbyFileset"/>
<fileset id="DerbyFileset" dir="${shared.resource.dir}/derby" includes="derby.jar"/>
<dataSource id="derbyEmbedded" isolationLevel="TRANSACTION_READ_COMMITTED" jndiName="jdbc/resdatasource" jdbcDriverRef="DerbyJdbcDriver">
<properties.derby.embedded
databaseName="${shared.config.dir}/derby/resdb"
createDatabase="create"
user="resdbUser"
password="resdbUser"
/>
</dataSource>
For more information about configuring a data source in
the Liberty profile,
see the IBM® WebSphere® Application Server
Liberty Core documentation
- To declare the a default user for each role in the Liberty
federated user registry, create users and groups that will bind to
the roles:
<!-- Web application security -->
<basicRegistry id="basic" realm="customRealm">
<user name="resAdmin" password="resAdmin"/>
<user name="resDeploy" password="resDeploy"/>
<user name="resMonitor" password="resMonitor"/>
<group name="resAdministrators">
<member name="resAdmin"/>
</group>
<group name="resDeployers">
<member name="resDeploy"/>
</group>
<group name="resMonitors">
<member name="resMonitor"/>
</group>
</basicRegistry>
- To declare the Rule Execution Server console
and bind the groups of your user registry to the role:
<!-- RES console -->
<application type="war" id="res" name="res" location="${server.config.dir}/apps/res.war">
<application-bnd>
<security-role name="resAdministrators">
<group name="resAdministrators"/>
</security-role>
<security-role name="resDeployers">
<group name="resDeployers"/>
</security-role>
<security-role name="resMonitors">
<group name="resMonitors"/>
</security-role>
</application-bnd>
</application>
- Save the file.