/rhcs-destinasia-rules-demo

The AppDev on Cloud Suite example project where APAC Destinasia Travel discount rules are hosted on JBoss BRMS in the OpenShift Container Platform. Includes Ansible playbooks to automate deployment of services and rules to OpenShift Container Platform. Fuse rest service functions as endpoint for travel requests from Rest Client or eventual mobile application.

Primary LanguageShell

Logo

Destinasia Travel Rules Demo

Step 1: AppDev on Cloud Suite

This demo is to install JBoss BRMS with Destinasia Travel discount rules in the Cloud based on leveraging any Red Hat OpenShift container based platform, such as:

It delivers a fully functioning containerized JBoss BRMS installation.

Step 2: Install JBoss BRMS on OpenShift

  1. First ensure you have an OpenShift container based installation, such as one of the following installed first:
  1. Download and unzip this demo.

  2. Download JBoss EAP & JBoss BRMS, add to installs directory (see installs/README).

  3. Run 'init.sh' or 'init.bat' file. 'init.bat' must be run with Administrative privileges:

   # The installation needs to be pointed to a running version
   # of OpenShift, so pass an IP address such as:
   #
   $ ./init.sh 192.168.99.100  # example for OCP.

Now log in to JBoss BRMS and start developing containerized rules projects (the address will be generated by the init script):

Step 3: Ansible Playbooks for Automated Service Deployment on OpenShift

See instructions for Ansible Playbooks Service Deployment to deploy:

  1. Rules from container JBoss BRMS to xPaaS Decision Server

  2. .Net service to container

  3. Java service to xPaaS EAP Server

  4. PHP service to container

  5. Fuse service to xPaaS Integration Server

Notes

Need hands-on, step-by-step instructions? Experience the free online workshop.


This project can be installed on any OpenShift platform, such as the OpenShift Container Platform. It's possible to install it on any available installation by pointing this installer to an OpenShift IP address:

  $ ./init.sh IP

If for any reason the installation breaks or you want a new JBoss BRMS installation, just remove the project rhcs-destinasia-rules-demo entry in the OpenShift console and re-run the installation.


Should your local network DNS not handle the resolution of the above address, giving you page not found errors, you can apply the following to your local hosts file:

$ sudo vi /etc/hosts

# add host for OCP demo resolution.
192.168.99.100   destinasia-rules-demo.192.168.99.100.xip.io 

The rule test you find in the project is BROKEN... guess what, you need to fix that! Hint for the fix is that the flights are all Asian destinations, but the test uses an unknown destination for the rules. Can you fix it?


To clone a repository in the running container, the following actions would need to occur from a developer's machine.

  1. Execute port forwarding through the OpenShift CLI. This will open a tunnel between the developer's machine and the pod through the OpenShift API pod proxy. The command window will block while the session is open:

    # Read-write access to repo on port 8001.
    #
    $ oc port-forward $(oc get pod -l=deploymentconfig=destinasia-rules-demo --template='{{ range .items }} {{ .metadata.name }} {{ end }}') 9418:9418
    
  2. Clone the repository. In another window, clone the remote repository:

    # Read access to repo on port 9418.
    #
    $ git clone git://localhost:9418/destinasia 
    

Supporting Articles

Released versions

See the tagged releases for the following versions of the product:

  • v1.2 - JBoss BRMS 6.4.0, JBoss EAP 7.0.0 with Destinasia Travel discount rules running on any given OpenShift installation and Ansible playbooks for automation of service deployments (PHP, Java, Rules, .Net, Fuse).

  • v1.1 - JBoss BRMS 6.4.0, JBoss EAP 7.0.0 with Destinasia Travel discount rules running on any given OpenShift installation and port forwarding for git repo access configured.

  • v1.0 - JBoss BRMS 6.4.0, JBoss EAP 7.0.0 with Destinasia Travel discount rules running on any given OpenShift installation.

Pods

Rules

Deployments

Builds

Fuse post

Cloud Suite