Saturday, 3 September 2016

IBM Operational Decision Manager - Running it on WebSphere Liberty Profile on Docker

Context

In this article, I build and run a Docker Container, using an image created using WebSphere Liberty Profile 8.5.5 and IBM Operational Decision Manager Advanced 8.8.1.

This is based upon an excellent developerWorks article: -


The major differences are: -

(a) I'm running this natively using Docker 1.12.0a on MacOS 11 ( the article used Docker 1.8.1 )
(b) using a later version of ODM ( the article used 8.7.1 )

As per the article, I'm using Apache Derby as my database, rather than, say, DB2 or Oracle. That's for a future iteration :-)

On ODM Box

Install ODM 8.8.1

/opt/IBM/InstallationManager/eclipse/tools/imcl listInstalledPackages -features -long

/opt/IBM/InstallationManager/eclipse : com.ibm.cic.agent_1.8.2000.20150303_1526 : IBM® Installation Manager : 1.8.2 : 
/opt/IBM/WebSphere/AppServer : com.ibm.websphere.ND.v85_8.5.5005.20150220_0158 : IBM WebSphere Application Server Network Deployment : 8.5.5.5 : com.ibm.sdk.6_64bit,ejbdeploy,embeddablecontainer,samples,thinclient
/opt/IBM/HTTPServer : com.ibm.websphere.IHS.v85_8.5.5005.20150220_0158 : IBM HTTP Server for WebSphere Application Server : 8.5.5.5 : arch.64bit
/opt/IBM/WebSphere/Plugins : com.ibm.websphere.PLG.v85_8.5.5005.20150220_0158 : Web Server Plug-ins for IBM WebSphere Application Server : 8.5.5.5 : com.ibm.jre.6_64bit
/opt/IBM/ODM881 : com.ibm.websphere.odm.dc.v88_8.8.1000.20160527_0751 : Decision Center : 8.8.1.0 : Decision Center,Rule Solutions for Office,com.ibm.wbdm.dts.jboss.feature,com.ibm.wbdm.dts.tomcat.feature,com.ibm.wbdm.dts.weblogic.feature,com.ibm.wbdm.dts.wlp.feature,com.ibm.wdc.rules.samples.feature
/opt/IBM/ODM881 : com.ibm.websphere.odm.ds.rules.v88_8.8.1000.20160527_0819 : Decision Server Rules : 8.8.1.0 : com.ibm.wds.rules.res.feature,com.ibm.wds.rules.res.jboss.feature,com.ibm.wds.rules.res.tomcat.feature,com.ibm.wds.rules.res.weblogic.feature,com.ibm.wds.rules.res.wlp.feature,com.ibm.wds.rules.samples.feature,com.ibm.wds.rules.studio.feature,com.ibm.wds.updatesites.feature
/opt/IBM/ODM881 : com.ibm.websphere.odm.pt.dc.v88_8.8.1000.20160527_0943 : Decision Center profile templates for WebSphere Application Server   : 8.8.1.0 : 
/opt/IBM/ODM881 : com.ibm.websphere.odm.pt.rules.v88_8.8.1000.20160527_0949 : Decision Server Rules profile templates for WebSphere Application Server  : 8.8.1.0 : 

Grab the WAR files for WLP

zip -r -j 4Liberty.zip /opt/IBM/ODM881/executionserver/applicationservers/WLP855/*.war /opt/IBM/ODM881/teamserver/applicationservers/WLP855/*.war

  adding: DecisionRunner.war (deflated 0%)
  adding: DecisionService.war (deflated 1%)
  adding: res.war (deflated 2%)
  adding: testing.war (deflated 0%)
  adding: decisioncenter.war (deflated 2%)
  adding: teamserver.war (deflated 2%)

On Docker Box

Grab the Sample Code from the dW article

Downloaded as code_sample.zip

Grab the 4Liberty.zip file from the ODM box

scp wasadmin@odm881:~/4Liberty.zip .

Prepare Build directory

mkdir ~/ODMLibertyDocker
mkdir ~/ODMLibertyDocker/apps
cd ~/ODMLibertyDocker
unzip ~/code_sample.zip
cd apps
unzip ~/4Liberty.zip

Build Image

docker build -t odm88 .

Sending build context to Docker daemon 366.8 MB
Step 1 : FROM websphere-liberty:8.5.5
8.5.5: Pulling from library/websphere-liberty
5ba4f30e5bea: Pull complete 
6874f9870f5f: Pull complete 
4c876570bd7d: Pull complete 
10fb34ebccea: Pull complete 
aaeb769dfcba: Pull complete 
bc6dfceaf220: Pull complete 
cfe5d05f9c9f: Pull complete 
f56aa0750956: Pull complete 
c3b54b608a65: Pull complete 
9013288ef227: Pull complete 
5105572525b7: Pull complete 
948eda79efee: Pull complete 
17c48e51b624: Pull complete 
33d9c6a263b0: Pull complete 
f02a99ac1b0a: Pull complete 
Digest: sha256:0fccbace25bff7be675a9a0e75947836e9b5258d2d0aaf2e3afaa2943521822d
Status: Downloaded newer image for websphere-liberty:8.5.5
 ---> 40d6ee83cbcd
Step 2 : MAINTAINER Ming Li <lmming@cn.ibm.com>
 ---> Running in 76e9e04b6f70
 ---> f6182c027a64
Removing intermediate container 76e9e04b6f70
Step 3 : ENV LICENSE accept
 ---> Running in 847f5a446fbb
 ---> 1ca47cd66182
Removing intermediate container 847f5a446fbb
Step 4 : COPY derby.jar /opt/ibm/wlp/usr/shared/resources/derby/
 ---> 516387e3b96c
Removing intermediate container 706b18ae4677
Step 5 : ADD data.tar.gz opt/ibm/wlp/usr/shared/resources/
 ---> 9921502cf950
Removing intermediate container d0fce6ac2a48
Step 6 : COPY apps /opt/ibm/wlp/usr/servers/defaultServer/apps/
 ---> 60a90b400471
Removing intermediate container 0f2d3f7210ea
Step 7 : COPY server.xml /opt/ibm/wlp/usr/servers/defaultServer/
 ---> f2af5a4e07f7
Removing intermediate container b981fd272226
Successfully built f2af5a4e07f7

List Available Images

docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
odm88               latest              f2af5a4e07f7        17 minutes ago      850.4 MB
websphere-liberty   webProfile7         0adb796da35d        3 weeks ago         396 MB
websphere-liberty   8.5.5               40d6ee83cbcd        12 weeks ago        450.6 MB

Start a Container from the Image

odm88=`docker run -d -t -p 80:9080 -p 443:9443 odm88:latest`

Monitor the Container logs

docker logs $odm88 -f

 (WebSphere Application Server 8.5.5.9/wlp-1.0.12.cl50920160227-1523) on IBM J9 VM, version pxa6480sr3-20160428_01 (SR3) (en_US)
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/8.5.5.9/lafiles/en.html
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ibm/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[ERROR   ] CWWKF0001E: A feature definition could not be found for appsecurity-1.0
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications. 
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://13753b20da8d:9080/DecisionRunner/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://13753b20da8d:9080/testing/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://13753b20da8d:9080/res/
[AUDIT   ] CWWKZ0001I: Application testing started in 6.826 seconds.
[AUDIT   ] CWWKZ0001I: Application res started in 6.828 seconds.
[AUDIT   ] CWWKZ0001I: Application DecisionRunner started in 6.824 seconds.
[AUDIT   ] CWPKI0803A: SSL certificate created in 13.246 seconds. SSL key file: /opt/ibm/wlp/output/defaultServer/resources/security/key.jks
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://13753b20da8d:9080/teamserver/
[AUDIT   ] CWWKZ0001I: Application teamserver started in 13.000 seconds.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://13753b20da8d:9080/decisioncenter/
[AUDIT   ] CWWKZ0001I: Application decisioncenter started in 14.627 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [concurrent-1.0, servlet-3.0, jsp-2.2, ssl-1.0, jndi-1.0, json-1.0, jdbc-4.0, jaxrs-1.1].
[AUDIT   ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.

Functional Testing










Stop the Container

docker stop $odm88

Monitor the Container logs

docker logs $odm88 -f

[AUDIT   ] CWWKE0085I: The server defaultServer is stopping because the JVM is exiting.
[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://03dd319a6af9:9080/testing/
[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://03dd319a6af9:9080/decisioncenter/
[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://03dd319a6af9:9080/res/
[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://03dd319a6af9:9080/teamserver/
[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://03dd319a6af9:9080/DecisionRunner/
[AUDIT   ] CWWKZ0009I: The application testing has stopped successfully.
[AUDIT   ] CWWKZ0009I: The application DecisionRunner has stopped successfully.
[AUDIT   ] CWWKZ0009I: The application res has stopped successfully.
[AUDIT   ] CWWKZ0009I: The application teamserver has stopped successfully.
[AUDIT   ] CWWKZ0009I: The application decisioncenter has stopped successfully.
[AUDIT   ] WTRN0105I: The transaction service has shutdown successfully with no transactions requiring recovery.
[AUDIT   ] CWWKE0036I: The server defaultServer stopped after 7 minutes, 5.474 seconds.


No comments: