Lab 4

Automated rule service deployment

Lab Goal

To leverage Ansible automation to extract JBoss BRMS rule project from container and deploy in xPaaS Decision Server.

ARCHITECTURE

Deploy travel discount rules in xPaaS Decision Server

WHERE ARE PLAYBOOKS?

  • The travel backend services are deployed using Ansible playbooks
  • They are found here:

    • $ cd support/playbooks/deploy-ocp-services


  • Start with the discount rules service:

    • $ ./ansible-playbook-ruleservice.sh

PLAYBOOK START

  • The rule service playbook stars with messages, setup and logging in to the OpenShift Container Platform:

    • $ ./ansible-playbook-ruleservice.sh

PLAYBOOK LOOKUP

  • The rule service playbook looks up the JBoss BRMS containers internal IP in preparation for extracting the discount rules project:

PLAYBOOK DEPLOYMENT

  • The rule service playbook finally deploys a new container, xPaaS Decision Service with the discount rules extracted previously and reports playbook status as it finishes:

IF BUILD FAILS

  • Look in OCP console at Monitoring for Builds
  • The playbook build can fail if JBoss BRMS container's not ready
  • It fails trying to fetch the rules project:

HOW TO FIX

  • Open Monitoring view, open Destinasia rules deployment container log, notice it's busy starting up the server still:

NOW READY

  • Once the build is finished, the log shows you can now run the playbook (note highlighted line):

REBUILD RULE SERVICE

  • It's easiest take the last failed build and click on it to open it's details and click on the Rebuild button:


BUILDING RULE SERVICE

  • The build should run without issues now that the container with discount rules is running and available:


DEPLOYED RULE SERVICE

  • When a build finishes you see a new deployment container appears in Monitoring view under Deployments:

END LAB 4

QUESTIONS?

Eric D. Schabell
Portfolio Architect Director
@ericschabell
http://schabell.org

UP NEXT...

Lab 5 - Flight service playbook