Monday 24 September 2018

Deploying IBM Operational Decision Manager 8.9.2.1 to WebSphere Liberty Profile 17.0.0.4 - Walkthrough

Following on from my earlier post: -

IBM Operational Decision Manager - ODM on Liberty

this is an updated version, using the later 8.9.2.1 fix pack of ODM Rules.

Prepare File Systems ( as root )

mkdir /opt/ibm/ODM89
mkdir /opt/ibm/Java
chown -R wasadmin:wasadmins /opt/ibm/ODM89
chown -R wasadmin:wasadmins /opt/ibm/Java


Install Java 8

/mnt/Java8/ibm-java-jre-8.0-3.12-x86_64-archive.bin -i silent -f /mnt/ResponseFiles/installer.properties 1>console.txt 2>&1

Setup Path

vi ~/.bashrc

Append: -

JAVA_HOME=/opt/ibm/Java/jre
PATH=$PATH:$JAVA_HOME/bin


source ~/.bashrc

Validate Java

java -version

java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 8.0.5.6 - pxa6480sr5fp6-20171124_02(SR5 FP6))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64 Compressed References 20171122_371101 (JIT enabled, AOT enabled)
OpenJ9   - 8e3c85d
OMR      - 713f08e
IBM      - c041ee8)
JCL - 20171113_01 based on Oracle jdk8u151-b12


Install WLP

jar xvf /mnt/WLP/JARs/wlp-nd-all-17.0.0.4.jar

Fixup Executable Bits

chmod +x /home/wasadmin/wlp/bin/server
chmod +x /home/wasadmin/wlp/bin/securityUtility


Setup Path

vi ~/.bashrc

Amend: -

PATH=$PATH:$JAVA_HOME/bin:/home/wasadmin/wlp/bin

source ~/.bashrc

Validate WLP

server version

WebSphere Application Server 17.0.0.4 (1.0.19.201712061531) on IBM J9 VM, version pxa6480sr3fp12-20160919_01 (SR3 FP12) (en_GB)

See what's available to install

/opt/ibm/InstallationManager/eclipse/tools/imcl listAvailablePackages -repositories /mnt/ODM891/disk1/DecisionServerRules/repository.config,/mnt/ODM892/DS/updates/repository.config

com.ibm.websphere.odm.ds.rules.v89_8.9.1000.20171018_1824
com.ibm.websphere.odm.ds.rules.v89_8.9.0.20170123_1210
com.ibm.websphere.odm.ds.rules.v89_8.9.2001.20180723_1224


Install ODM

/opt/ibm/InstallationManager/eclipse/tools/imcl -input /mnt/ResponseFiles/installODM8921_RES.rsp -acceptLicense

Installed com.ibm.websphere.odm.ds.rules.v89_8.9.2001.20180723_1224 to the /opt/ibm/ODM89 directory.

Validate WARs

ls -al /opt/ibm/ODM89/executionserver/applicationservers/WLP855/

...
-rw-r--r-- 1 wasadmin wasadmins 52157759 Sep 24 17:45 DecisionRunner.war
-rw-r--r-- 1 wasadmin wasadmins 40631899 Sep 24 17:45 DecisionService.war
-rw-r--r-- 1 wasadmin wasadmins 31488087 Jul 20 18:23 res.war
-rw-r--r-- 1 wasadmin wasadmins 52751122 Sep 24 17:45 testing.war

...

Validate Derby

ls -al /opt/ibm/ODM89/shared/tools/derby/lib/derby.jar

...
-rw-r--r-- 1 wasadmin wasadmins 2838580 Jul 23 11:56 /opt/ibm/ODM89/shared/tools/derby/lib/derby.jar
...

Create WLP server

server create odm

Deploy Apps

cp /opt/ibm/ODM89/executionserver/applicationservers/WLP855/res.war /home/wasadmin/wlp/usr/servers/odm/apps/
cp /opt/ibm/ODM89/executionserver/applicationservers/WLP855/DecisionService.war /home/wasadmin/wlp/usr/servers/odm/apps/

Deploy Derby

mkdir /home/wasadmin/wlp/usr/shared/resources/derby
cp /opt/ibm/ODM89/shared/tools/derby/lib/derby.jar /home/wasadmin/wlp/usr/shared/resources/derby


Configure server.xml

vi /home/wasadmin/wlp/usr/servers/odm/server.xml

Amend to: -

<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">

    <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>

    <httpEndpoint id="defaultHttpEndpoint"
                  host="*"
                  httpPort="10080"
                  httpsPort="10443" />

    <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>

    <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>

    <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>

    <application type="war" id="DecisionService"
      name="DecisionService"
      location="${server.config.dir}/apps/DecisionService.war">
    </application>

    <applicationManager autoExpand="true"/>

    <featureManager>
           <feature>ssl-1.0</feature>
    </featureManager>
    <keyStore id="defaultKeyStore" password="{xor}Lz4sLChvLTs=" />

</server>


Create SSL Certificate

/home/wasadmin/wlp/bin/securityUtility createSSLCertificate --server=odm --password=passw0rd --validity=365

...
Creating keystore /home/wasadmin/wlp/usr/servers/odm/resources/security/key.jks

Created SSL certificate for server odm. The certificate is created with CN=workflow.uk.ibm.com,OU=odm,O=ibm,C=us as the SubjectDN.

Add the following lines to the server.xml to enable SSL:

    <featureManager>
        <feature>ssl-1.0</feature>
    </featureManager>
    <keyStore id="defaultKeyStore" password="{xor}Lz4sLChvLTs=" />

...

Start WLP

server start odm

...
Starting server odm.
Server odm started with process ID 117294.

...

Monitor Logs

cat /home/wasadmin/wlp/usr/servers/odm/logs/console.log

...
Launching odm (WebSphere Application Server 17.0.0.4/wlp-1.0.19.201712061531) on IBM J9 VM, version pxa6480sr3fp12-20160919_01 (SR3 FP12) (en_GB)
[AUDIT   ] CWWKE0001I: The server odm has been launched.
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKS4104A: LTPA keys created in 0.464 seconds. LTPA key file: /home/wasadmin/wlp/usr/servers/odm/resources/security/ltpa.keys
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://workflow.uk.ibm.com:10080/DecisionService/
[AUDIT   ] CWWKZ0001I: Application DecisionService started in 0.943 seconds.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://workflow.uk.ibm.com:10080/res/
[AUDIT   ] CWWKZ0001I: Application res started in 2.474 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [jsp-2.3, concurrent-1.0, servlet-3.1, ssl-1.0, jndi-1.0, distributedMap-1.0, appSecurity-2.0, jdbc-4.1, el-3.0].
[AUDIT   ] CWWKF0011I: The server odm is ready to run a smarter planet.
[WARNING ] XOM repository set in database persistence mode: Apache Derby 10.10.2.0 - (1582446)
[ERROR   ] Initialization failed
The persistence check failed. Diagnostic report:
DAO Class Name = ilog.rules.res.persistence.impl.jdbc.IlrGenericRepositoryDAO
Database Product Name = Apache Derby
Database Product Version = 10.10.2.0 - (1582446)
Driver Name = Apache Derby Embedded JDBC Driver
Driver Product Version = 10.10.2.0 - (1582446)
Ruleset enabled view test passed = False
RuleApp properties table test passed = False
RuleApps table test passed = False
Ruleset properties table test passed = False
Ruleset resources table test passed = False
Rulesets table test passed = False
Is Transaction Supported = True
JDBC URL = jdbc:derby:/home/wasadmin/wlp/usr/shared/config//derby/resdb
Username = resdbUser.
...

cat /home/wasadmin/wlp/usr/servers/odm/logs/messages.log

...
********************************************************************************
product = WebSphere Application Server 17.0.0.4 (wlp-1.0.19.201712061531)
wlp.install.dir = /home/wasadmin/wlp/
java.home = /opt/ibm/Java/jre
java.version = 1.8.0
java.runtime = Java(TM) SE Runtime Environment (pxa6480sr3fp12-20160919_01 (SR3 FP12))
os = Linux (3.10.0-862.11.6.el7.x86_64; amd64) (en_GB)
process = 117294@workflow.uk.ibm.com
********************************************************************************
[24/09/18 17:51:42:380 BST] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           A CWWKE0001I: The server odm has been launched.
[24/09/18 17:51:43:306 BST] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           I CWWKE0002I: The kernel started after 1.087 seconds
[24/09/18 17:51:43:445 BST] 00000022 com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0007I: Feature update started.
[24/09/18 17:51:44:215 BST] 0000001b com.ibm.ws.security.ready.internal.SecurityReadyServiceImpl  I CWWKS0007I: The security service is starting...
[24/09/18 17:51:44:450 BST] 00000027 com.ibm.ws.tcpchannel.internal.TCPChannel                    I CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host *  (IPv6) port 10080.
[24/09/18 17:51:44:456 BST] 0000001b com.ibm.ws.app.manager.internal.monitor.DropinMonitor        A CWWKZ0058I: Monitoring dropins for applications.

...
[24/09/18 17:51:49:283 BST] 0000002e com.ibm.ws.webcontainer.servlet                              I SRVE0242I: [res] [/res] [FacesServlet]: Initialization successful.
...

Access RES

https://workflow.uk.ibm.com:10443/res/login.jsf

(1) Need to authenticate as resAdmin
(2) Need to run through "Installation Settings Wizard" to set up database
(3) Deploy Rule App e.g. HelloWorldRuleApp_19012016.jar
(4) Use HTDS to test Rule App via REST

<?xml version="1.0" encoding="UTF-8"?><par:Response xmlns:par="http://www.ibm.com/rules/decisionservice/HelloWorldRuleApp/HelloWorld/param">
  <par:DecisionID>string</par:DecisionID>
  <par:response>Hello David Hay</par:response>
</par:Response>


(5) Monitor logs for output

cat /home/wasadmin/wlp/usr/servers/odm/logs/console.log

...
Hello David Hay!
...

cat /home/wasadmin/wlp/usr/servers/odm/logs/messages.log

...
[24/09/18 17:56:01:858 BST] 00000065 SystemOut                                                    O Hello David Hay!
...

URL for HTDS: -

https://workflow.uk.ibm.com:10443/DecisionService/run.jsp?path=/HelloWorldRuleApp/1.0/HelloWorld&trace=false&type=WADL&kind=native

Operational Decision Manager V8.9.2 Download Document

https://www-01.ibm.com/support/docview.wss?uid=swg24044455

How to install ODM 8.9.0 in silent mode in command line ?


ODM Rules 8.9.2.1 Fixpack - via IBM Fix Central


8.9.2-WS-ODM_PTR-Multi-FP001
Operational Decision Manager - Profile Template for Decision Server for Rules V8.9.2.1

8.9.2-WS-ODM_PTDC-Multi-FP001
Operational Decision Manager - Profile Template for Decision Center V8.9.2.1

8.9.2-WS-ODM_DSR-LIN_X86-FP001
Operational Decision Manager - Decision Server for Rules V8.9.2.1 for Linux x86

8.9.2-WS-ODM_DC-LIN_X86-FP001
Operational Decision Manager - Decision Center V8.9.2.1 for Linux x86

-rw-r--r--@ 1 davidhay  staff  3778625885 24 Sep 18:27 8.9.2-WS-ODM_DC-LIN_X86-FP001.zip
-rw-r--r--@ 1 davidhay  staff  3492719362 24 Sep 18:25 8.9.2-WS-ODM_DSR-LIN_X86-FP001.zip

2 comments:

gogingtoflying said...

Great post!
Could you please share the install packages?

Dave Hay said...

Sorry, I'm not totally sure for what you're looking ? What, specifically, do you need ?

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...