OpenShift / Process Improvement / Technology / Uncategorized

Decision Service Made Easy with OpenShift

Introduction

The Weight Watcher – a Goal Attainment Scale is an example of an implementation of a Really Simple Rules Service (RSRS). RSRS is a (stateless REST) Decision Server based on JBoss BRMS 6.x that uses a simple facts-in-facts-out (FIFO) pattern and supports CEP use cases. Milo, the Red Dog look-a-like, will show you the way. This lab is another in the OpenShift MiniLabs series.

milo

Objectives

In this post we make this even easier by hosting our RSRS on OpenShift building on the setup instructions covered in A/B Deployments Made Easy with OpenShift.

RSRS

Setup

Initial Attempt

This tutorial assumes you have completed the OpenShift MiniLabs installation procedure. Then refresh before continuing. Clone down the rsrs app as follows:

$ cd ~/containersascode
$ git clone https://github.com/StefanoPicozzi/rsrs.git

Repeat Attempt

To reset your environment to repeat this tutorial do the following:

$ cd ~/containersascode
$ ./oc-cluster-wrapper/oc-cluster up containersascode
$ oc login -u developer -p developer
$ oc delete project weightwatcher

Instructions

Create OpenShift Project and Application

Pull down and import the the JBoss BRMS image for 6.4 and then create the template as follows:

$ oc login -u developer -p developer
$ oc new-project weightwatcher --display-name='WeightWatcher' --description='The WeightWatcher Decision Service Example'
$ oc project weightwatcher
$ oc import-image decisionserver64 --from=registry.access.redhat.com/jboss-decisionserver-6/decisionserver64-openshift --confirm 
$ oc create -f rsrs/weightwatcher-template-64.json
$ oc new-app decisionserver64-weightwatcher-s2i -l name=weightwatcher --param=KIE_SERVER_PASSWORD=kieserver1!
$ oc status

Verify Lab Success

Monitor the build progress from the Console. Once completed the following cURL commands should return a valid response if the solution is operating correctly. You may need to edit the shell script with your weightwatcher URL and KIE_SERVER password. Visit the Environment variables Tab to recover the password set when the template was processed.

$ cd ~/containersascode
$ cd rsrs/tools/cURL
$ ./post-facts.sh

Trivia

JBoss Demo Central

The weightwatcher demo is on JBoss Demo Central. Check https://github.com/jbossdemocentral/brms-weightwatcher-realtime-decision-server-demo and https://github.com/jbossdemocentral/jboss-fis-weightwatcher for further worked examples using the application.

Customize

To refactor this example for your own Decision Server, just fork the RSRS Git Repo and change the contents to reflect your application. In particular ensure that the kmodule.xml file matches your requirements as at https://github.com/StefanoPicozzi/rsrs/tree/master/weightwatchers/src/main/resources/META-INF .

Advertisements

5 thoughts on “Decision Service Made Easy with OpenShift

  1. Pingback: Really Simple Rules Service | emergile

  2. Pingback: The Weight Watcher – a Goal Attainment Scale | emergile

  3. Hi, I do think this is an excellent blog. I stumbledupon it 😉
    I’m going to revisit once again since i have book marked it.

    Money and freedom is the greatest way to change, may you be rich and continue to guide other people.

  4. Pingback: OpenShift DevOps Tutorial | emergile

  5. Pingback: CEP made easyR – Drools with R using RStudio | emergile

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s