Contents


Deploy an IBM Operational Decision Manager topology with Docker Compose

Comments

To be competitive, companies must build, deploy, and scale applications faster than before. With adoption of the continuous build and DevOps approaches, application architecture trends shift from a monolithic model to an assembly of microservices working together, potentially developed and operated by different teams.

Docker® is a popular open source technology to develop and deploy microservices as micro-containers. Each micro-container runs your microservice in isolation with an accelerated deployment, compared to deploying directly on the operating system or on hypervisor software.

With IBM® Operational Decision Manager (ODM), all lines of business in an organization can capture and automate their decision expertise to be applied to a large volume of data. IT and business users alike can manage the business decision logic that is used by operational systems within an organization. IBM ODM Standard covers all the authoring, test, simulation, deployment and operation tasks for your business policies (implemented as decision services).

You might wonder, "Can we leverage Docker technology when deploying IBM ODM?" For example, you might be interested in deploying IBM ODM Decision Center and Decision Server as micro-containers to support your DevOps lifecycle in an agile and automated way. More precisely, you can benefit from a simplified and accelerated deployment for your team's development and test stages. If you reproduce your IBM ODM environment through simulation, pre-production, and production phases, you benefit with repeatability in your deployment orchestration.

This tutorial focuses on how to prepare Docker images, instantiate micro-containers, and compose them to build an IBM ODM Standard topology, including the Decision Center and Decision Server Rules (the Rule Execution Server) components. The Decision Server Rules component is composed of three web applications:

  • The Rule Execution Server console, for the management of executable decision services packaged as RuleApp and ruleset archives.
  • The Hosted Transparent Decision Service, which exposes a decision service as a web service in SOAP or Representational State Transfer (REST) style.
  • The Decision Runner, the back-end application for running test suite and simulation workloads.

The tutorial steps describe how to put the following topologies in action:

  • A stand-alone topology to evaluate the product. The IBM ODM Decision Center and Decision Server Rules applications with their databases are combined into a single docker image.
  • An unclustered topology preferred for a development use. The IBM ODM Decision Center and Decision Server Rules applications run seperately as a set of unclustered containers.
  • A clustered topology that is preferred for pre-production and production environments. Decision Center and Decision Server Rules applications are spread across different micro-containers. All applications are clustered, with the exception of the Rule Execution Server console that runs on a stand-alone micro-server.

Both Decision Center and Decision Server rely on a relational database to store assets during development and run time. For convenience, the unclustered topology and the the clustered topologies share a single Derby Network server (called dbserver). The stand-alone topology embeds its Derby database.

Note that Docker Hub (the public registry for Docker images) includes a Docker image for the IBM WebSphere Liberty server, which is a supported application server for IBM ODM. This tutorial shows how to leverage the Liberty Docker images to make your own Docker images for IBM ODM Decision Center and Decision Server Rules. With these Docker images, you can create any IBM ODM topology to address your needs along the lifecycle of your decision automation.

Docker basics and terminology

To understand the Docker terminology in this tutorial, keep in mind the following definitions:

  • A Docker image is a read-only snapshot of a container stored in Docker Hub to be used as a template for building containers.
  • A Docker container is the standard unit in which the application service resides or is transported.
  • A Docker hub or a Docker registry stores, distributes and shares container images.
  • The Docker engine is a program that creates, ships and runs application containers. It runs on any physical and virtual machine or server locally, in private or public cloud, and it includes a command-line client.
  • Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose descriptor file to configure your application's services. Then, using a single command, you create and start all the microservices from your configuration.

What you need to build your IBM ODM Standard topology

In this tutorial, all steps were tested with the following versions on Mac OS X and Ubuntu 14.04 operating systems:

  • IBM ODM V8.9.0.1
  • Docker Engine 17.03.01
  • Docker Compose 1.11.2

This tutorial applies to IBM ODM Standard V8.9.0.1 and previous versions back as far as IBM ODM V8.7.0.

The source code for this tutorial is available on Github at github.com/lgrateau/odm-ondocker.

You must have IBM ODM installed on your local development machine.

You can decide to run IBM ODM Decision Server and IBM ODM Decision Center separately. It's not mandatory to have the two parts installed together.

To create IBM ODM Docker images, you need to install one of the following parts of IBM ODM:

  • Decision Center (WebSphere Liberty Profile option)
  • Decision Server Rules (WebSphere Liberty Profile option)

Make sure to install the following web archive (WAR) files:

  • The res.war file that contains the Rule Execution Server console
  • The DecisionService.war file that contains hosted transparent decision services
  • The teamserver.war file that contains the Enterprise console
  • The decisioncenter.war file that contains the Business console
  • The DecisionRunner.war file for the testing and simulation features

On the file system where you installed IBM ODM V8.8.1 with WebSphere Liberty Profile option, find the required WAR files in the following locations:

  • installation_directory/executionserver/applicationservers/WLP855/res.war
  • installation_directory/executionserver/applicationservers/WLP855/DecisionService.war
  • installation_directory/teamserver/applicationservers/WLP855/teamserver.war
  • installation_directory/teamserver/applicationservers/WLP855/decisioncenter.war
  • installation_directory/executionserver/applicationservers/WLP855/DecisionRunner.war

Step 1. Install the Docker materials

To install the Docker materials from the Git version control system, complete the following steps:

  1. Get the sample code: git clone https://github.com/ODMDev/odm-ondocker in the IBM ODM installation directory.
  2. Copy the odm-ondocker/resources/.dockerignore file into your IBM ODM installation directory.

    Look for a layout like the following example:

    Screen capture of                     the IBM ODM files in the installation directory
    Screen capture of the IBM ODM files in the installation directory

    This directory includes the following files:

    • components/Dockerfile, which describes how to build the Docker images.
    • odm-standalone.yml, which describes how to provision a stand-alone topology.
    • docker-compose.yml, which describes how to orchestrate a development topology.
    • odm-cluster.yml, which describes how to orchestrate a cluster topology.
  3. Verify that the Docker Engine and Docker Compose are running.

    Open a command prompt and run the following two operations:

    > docker -–version
    Docker version 1.12.3
    > docker-compose version
    docker-compose version 1.8.1

Now you are ready to build and run the Docker images.

Step 2. Run an IBM ODM stand-alone topology

To run a standalone topology for development and evaluation, complete the following steps:

  1. Open a command line with the Docker environment enabled.
  2. Go to installation_directory/odm-ondocker_directory
  3. Run the $ docker-compose -f odm-standalone.yml up command.

This command builds, creates, and runs one Docker container that contains the following components:

  • a Derby embedded database server
  • a Decision Server runtime environment
  • a Decision Server console
  • a Decision Runner application
  • a Decision Center

If the Docker container is not already built, Docker Compose builds it and runs it.

You can check the container status with the following command: docker-compose ps. Look for results that list one container, running odmdocker/standalone:8.9.0.

The following table lists the URL, the user name, and the password for each component:

ComponentURLUser name and password
Decision Centerhttp://localhost:9080/decisioncenter/t/libraryrtsAdmin / rtsAdmin
Decision Server consolehttp://localhost:9080/resresAdmin / resAdmin
Decision Server running servicehttp://localhost:9080/DecisionService/No user name or password required.
Decision Runner application http://localhost:9080/DecisionRunner/No user name or password required.

Step 3. Run an IBM ODM unclustered topology

To run an unclustered topology for development, complete the following steps:

  1. Open a command line with the Docker environment enabled.
  2. Go to installation_directory/docker-compose directory
  3. Run the $ docker-compose up command.

    If you have installed only Decision Server, run the Docker-compose up decisionserverruntime command.

    If you have installed only Decision Center, run the Docker-compose up decisioncenter command.

This command builds, creates, and runs five Docker containers:

  • a container for the Derby Network database server
  • a container for the Decision Server runtime environment
  • a container for the Decision Server console
  • a container for the Decision Runner application
  • a container for the Decision Center

If the Docker container is not already built, Docker Compose builds it and runs it.

You could also start only one of the components. For example: docker-compose up decisioncenter starts the Decision Center and its dependencies, including the dbserver Derby Network server.

The following screen capture shows logs when a container is built:

Example of Docker Compose logs when the container is                     building
Example of Docker Compose logs when the container is building

Step 4. Verify the Docker images

Now use the following screen capture to verify that the Rule Execution Server and the Decision Center in IBM ODM V8.8.1 or IBM ODM V8.9.X are configured correctly and run properly in the Docker containers.

Example of Docker Compose logs when the container is                     building
Example of Docker Compose logs when the container is building

You can check the container status with the following command: docker-compose ps. The following screen capture shows the list of running containers.

List of the running containers
List of the running containers

Now you can use the different parts of IBM ODM, as shown in the following illustration.

Illustration of                     different parts of IBM ODM
Illustration of different parts of IBM ODM

See the following list of URL credentials:

ComponentURLUser name and password
Decision Center http://localhost:9060/decisioncenter/t/libraryrtsAdmin / rtsAdmin
Decision Server console http://localhost:9080/resresAdmin / resAdmin
Decision Server running service http://localhost:9090/DecisionService/ No user name or password required.
Decision Runner application http://localhost:9070/DecisionRunner/ No user name or password required.

The dbserver Derby Network server is provided with sample data. If you would like to have no sample data in the database, remove the following lines from compose file, as shown in the following screen capture:

Screen capture of                     populating sample data
Screen capture of populating sample data

Finally, run the compose command to stop the topology: docker-compose stop .

Step 5. Run an IBM ODM Standard clustered topology

The Docker images are generic and can be used in a clustered or in an unclustered environment.

Run the compose command: docker-compose -f odm-cluster.yml up

Now you have the following topology:

Illustration of                     load balancer proxy in cluster topology
Illustration of load balancer proxy in cluster topology

The docker-compose command instantiates six Docker containers:

  • a container for the Derby Network database server
  • a container for the load balancer high availability proxy server
  • a container for the Decision Server runtime environment
  • a container for the Decision Server console
  • a container for the Decision Center
  • a container for the Decision Runner application

If you decide that you want to run only the Decision Server part of the environment, run the following command:

docker-compose -f odm-cluster.yml up decisionserverruntime

You can access the application with the following URLs:

ComponentURLUser name and password
Decision Centerhttp://localhost:9060/decisioncenter/t/libraryrtsAdmin / rtsAdmin
Load balancer statshttp://localhost:1936/stats / stats
Decision Server consolehttp://localhost:9080/resresAdmin / resAdmin
Decision Server runtimehttp://localhost/DecisionService/ No user name or password required.
Decision Runnerhttp://localhost:9070/DecisionRunner/ No user name or password required.

To add a Decision Server runtime member to the cluster, run the following command:

docker-compose -f odm-cluster.yml scale decisionserverruntime=2

You should see two runtime environments attached to the Rule Execution Server console. The load balancer is configured with a round robin algorithm, the default load-balancing logic that dispatches a new request to the next cluster member in a circular list.

To check the clustered Decision Server topology, complete the following steps:

  1. Open the Rule Execution Server console at http://localhost:9080/res (use the following user name and password: resAdmin / resAdmin )
  2. Open the REST Test form at http://localhost/DecisionService/run.jsp?path=/miniloan/1.0/miniloan/1.0&trace=false&type=WADL&kind=native
  3. Click the Execute Request button twice. (You start the two runtime environments.)
  4. Click the Server Info tab. You should see two execution units, as shown in the following screen capture.
Screen capture                     of Server Info View in the Rule Execution Server console
Screen capture of Server Info View in the Rule Execution Server console

Conclusion

In this tutorial you learned how to build reusable Docker images for IBM ODM Standard and how to instantiate Decision Center and Decision Server Rules as micro-containers. You learned how to compose stand-alone, unclustered, and clustered IBM ODM topologies. You can customize the Docker material to adapt to your corporate and next project requirements to benefit from IBM ODM decision automation and Docker deployment advantages along your DevOps lifecycle.

Acknowledgments

The authors would like to thank Gael Crova for reviewing this tutorial.


Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Middleware, Cloud computing
ArticleID=1040525
ArticleTitle=Deploy an IBM Operational Decision Manager topology with Docker Compose
publish-date=05252017