+ All Categories
Home > Documents > Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices...

Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices...

Date post: 18-Jul-2020
Category:
Upload: others
View: 21 times
Download: 0 times
Share this document with a friend
45
TIBCO ® Offer and Price Engine Installation and Configuration Software Release 5.0 December 2019
Transcript
Page 1: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

TIBCO® Offer and Price EngineInstallation and ConfigurationSoftware Release 5.0December 2019

Page 2: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCHEMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (ORPROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THEEMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANYOTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.

USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS ANDCONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTEDSOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THECLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOADOR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE)OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USERLICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THESOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, ANDYOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BEBOUND BY THE SAME.

ANY SOFTWARE ITEM IDENTIFIED AS THIRD PARTY LIBRARY IS AVAILABLE UNDERSEPARATE SOFTWARE LICENSE TERMS AND IS NOT PART OF A TIBCO PRODUCT. AS SUCH,THESE SOFTWARE ITEMS ARE NOT COVERED BY THE TERMS OF YOUR AGREEMENT WITHTIBCO, INCLUDING ANY TERMS CONCERNING SUPPORT, MAINTENANCE, WARRANTIES,AND INDEMNITIES. DOWNLOAD AND USE OF THESE ITEMS IS SOLELY AT YOUR OWNDISCRETION AND SUBJECT TO THE LICENSE TERMS APPLICABLE TO THEM. BY PROCEEDINGTO DOWNLOAD, INSTALL OR USE ANY OF THESE ITEMS, YOU ACKNOWLEDGE THEFOREGOING DISTINCTIONS BETWEEN THESE ITEMS AND TIBCO PRODUCTS.

This document is subject to U.S. and international copyright laws and treaties. No part of thisdocument may be reproduced in any form without the written authorization of TIBCO Software Inc.

TIBCO, the TIBCO logo, the TIBCO O logo, and TIBCO Offer and Price Engine, are either registeredtrademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.

Enterprise Java Beans (EJB), Java Platform Enterprise Edition (Java EE), Java 2 Platform EnterpriseEdition (J2EE), and all Java-based trademarks and logos are trademarks or registered trademarks ofOracle Corporation in the U.S. and other countries.

All other product and company names and marks mentioned in this document are the property of theirrespective owners and are mentioned for identification purposes only.

This software may be available on multiple operating systems. However, not all operating systemplatforms for a specific software version are released at the same time. Please see the readme.txt file forthe availability of this software version on a specific operating system platform.

THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICALERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESECHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCOSOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S)AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.

THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY ORINDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE,INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.

This and other products of TIBCO Software Inc. may be covered by registered patents. Please refer toTIBCO's Virtual Patent Marking document (https://www.tibco.com/patents) for details.

2

TIBCO® Offer and Price Engine Installation and Configuration

Page 3: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Copyright ©2010-2019 TIBCO Software Inc. All Rights Reserved.

3

TIBCO® Offer and Price Engine Installation and Configuration

Page 4: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Contents

About this Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

TIBCO Documentation and Support Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6

Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

Docker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Post Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

Setting up Tenants in Consul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Offer Search and Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Verifying Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Red Hat Openshift Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19

Application Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Managing Health and Liveness Endpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21

Managing Health Endpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Managing Ready Endpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Hawkular Monitoring Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21

Hawkular Monitoring Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Consul Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Application Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

External Application Logging Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29

Java Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32

Configuration Externalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

auth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35

tenants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Updates to Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

OPE Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Post-production day-1 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40

MinIO Cluster Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4

TIBCO® Offer and Price Engine Installation and Configuration

Page 5: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

About this Product

TIBCO® Offer and Price Engine is a cloud-native, in-memory omnichannel server of offers and pricesfor digital service providers. It answers requests from a digital service provider's customer-facingchannels for offers and prices, subject to business rules such as customer eligibility and productcompatibility.

TIBCO Offer and Price Engine is the next generation of, and partially replaces, TIBCO® FulfillmentOrder Management. To better align the direction of TIBCO Fulfillment Order Management with marketdemand, the product’s capabilities have been reorganized into two new products:

● TIBCO® Order Management

● TIBCO® Offer and Price Engine (TIBCO OPE)

Customers who are current on maintenance for TIBCO Fulfillment Order Management are entitled toupgrade to both TIBCO Order Management and TIBCO OPE. TIBCO will continue to support TIBCOFulfillment Order Management, and there is currently no plan to retire TIBCO Fulfillment OrderManagement. New capabilities will be developed in TIBCO Order Management and TIBCO OPE.

5

TIBCO® Offer and Price Engine Installation and Configuration

Page 6: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

TIBCO Documentation and Support Services

How to Access TIBCO Documentation

Documentation for TIBCO products is available on the TIBCO Product Documentation website, mainlyin HTML and PDF formats.

The TIBCO Product Documentation website is updated frequently and is more current than any otherdocumentation included with the product. To access the latest documentation, visit https://docs.tibco.com.

Product-Specific Documentation

Documentation for TIBCO OPE is available on the Fulfillment Order Management Documentationpage.

The following documents for this product can be found on the TIBCO Documentation site:

● TIBCO Offer and Price Engine Concepts Guide

● TIBCO Offer and Price Engine Installation and Configuration Guide

● TIBCO Offer and Price Engine User's Guide

● TIBCO Offer and Price Engine Release Notes

How to Contact TIBCO Support

You can contact TIBCO Support in the following ways:

● For an overview of TIBCO Support, visit http://www.tibco.com/services/support.

● For accessing the Support Knowledge Base and getting personalized content about products you areinterested in, visit the TIBCO Support portal at https://support.tibco.com.

● For creating a Support case, you must have a valid maintenance or support contract with TIBCO.You also need a user name and password to log in to https://support.tibco.com. If you do not have auser name, you can request one by clicking Register on the website.

How to Join TIBCO Community

TIBCO Community is the official channel for TIBCO customers, partners, and employee subject matterexperts to share and access their collective experience. TIBCO Community offers access to Q&A forums,product wikis, and best practices. It also offers access to extensions, adapters, solution accelerators, andtools that extend and enable customers to gain full value from TIBCO products. In addition, users cansubmit and vote on feature requests from within the TIBCO Ideas Portal. For a free registration, go to https://community.tibco.com.

6

TIBCO® Offer and Price Engine Installation and Configuration

Page 7: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Installation

Assumptions

TIBCO OPE uses Consul as an external configuration management tool for configuring all OPESmicroservices - OPE core, mle, auth-center, msgadapter, and opegateway.

Requirements

● All OPES microservices configuration should be configured externally.

● TIBCO OPE should reload changed application configuration without restarting application orDocker container.

● Consul, MinIO, and other third-party containers should be up and running.

Downloading and Installing TIBCO OPE

Download the TIBCO OPE 5.0 build from TIBCO's e-delivery website. It downloads the followingproject artifacts in the OPE_HOME folder.

● TIB_ope_5.0.0.zip - unzip into opes folder

● jdk-11.0.4_linux-x64_bin.tar.gz

The following are the contents of the TIB_ope_5.0.0.zip.

● Docker - Contains files and artifacts to create and run Docker containers for all OPE microservices.

● Libs - Contains the opeClient jar which is available for Java customization changes.

● Ocp - Sample openshift deployment files for all OPE microservices.

● Samples - Sample models, web service request, and configuration files.

● Specs - WSDL, and REST service specification files.

DockerTIBCO OPE microservices are containerized and run on hosts that support the Docker environment.The Docker files are delivered as part of the TIB_ope_5.0.0.zip. You can build images using thoseDocker files and then run them as containers. You can see all the Docker files in respective containerfolders. You must have an Internet connection to download the base Docker image.

7

TIBCO® Offer and Price Engine Installation and Configuration

Page 8: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

You will need to take care of the instructions under the comment "REQUIRED FILES TO BUILD THISIMAGE" in each Docker file before building the Docker images.

Some of the microservices are optional and you can choose not to run them in case they are not suitablefor your use cases.

● Authorization and Authentication - These microservices are optional and you can choose to notdeploy these in case you do not need authorization or authentication for your deployment, or have aexternal tool managing this functionality.

● Search - You can choose not to deploy/connect Elasticsearch with your OPES deployment in caseyou do not have any use cases regarding search and browse functionality.

● Message Adapter - This microservice is needed only when you have incoming catalog documentsdirectly published on EMS queues.

Offline files can be copied under MinIO input bucket as an alternate option.

Building without Internet Connectivity

OPE containers are created in such a way that all environment-dependent information is configuredoutside of the container. This helps in moving the same Docker image built in a staging/testingenvironment to be copied directly to production for reuse. There are multiple advantages with thisapproach.

● Since no Docker image is rebuilt in production, stricter production security policies, such as nodirect internet access, do not have an impact.

● The same Docker image that passed Quality and user acceptance testing is moved to production.

Building Images

Building Base Docker Image

First, create the base Docker image which will be used in all Docker images internally.

1. Go to the opes/docker/base directory and check comments inside Docker file for additionalfiles/jars required.

2. As per the comment in the base Docker file, download and put jdk-11.0.4_linux-x64_bin.tar fromOPE_HOME folder parallel to Docker file.

3. Now, execute the following command from the same location ../opes/docker/base: $ docker build -t tibco/base:5.0 --rm=true .

4. Execute the following command to check the images that are created: $ docker images

8

TIBCO® Offer and Price Engine Installation and Configuration

Page 9: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Building OPE Core Microservice

1. Go to the ../opes/docker/ope directory. In case custom external libraries are needed for theengine as part of java customization, copy requires libs under lib directory.

2. Execute the following command from the same location:../opes/docker/ope $ docker build -t tibco/ope:5.0 --rm=true .

3. Execute the following command to check the images that are created: $ docker images

Building MLE Microservice

1. Go to the ../opes/docker/mle directory. No additional external libraries, etc., are needed to runthis engine, so you can directly create this image.

2. Execute the following command from the location ../opes/docker/mle: $ docker build -t tibco/mle:5.0 --rm=true .

3. Execute the following command to check the images that are created: $ docker images

Building Auth-center Microservice

1. Go to the ../opes/docker/authcenter directory and check comments inside the Docker file foradditional files/jars required.

As per the comment in the Docker file, there is no other file/jar required to build the Docker image.

2. Execute the following command from the same location ../opes/docker/authcenter: $ docker build -t tibco/authcenter:5.0 --rm=true .

3. Execute the following command to check the images that are created: $ docker images

Building OPE-gateway Microservice

1. Go to the ../opes/docker/opegateway directory and check comments inside the Docker file foradditional files/jars required.

As per the comment in the Docker file, there is no other file/jar required to build the Docker image.

2. Execute the following command from the same location ../opes/docker/opegateway: $ docker build -t tibco/opegateway:5.0 --rm=true .

3. Execute the following command to check the images that are created: $ docker images

9

TIBCO® Offer and Price Engine Installation and Configuration

Page 10: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Building MsgAdapter Microservice

1. Go to the ../opes/docker/msgadapter directory and check comments inside the Docker file foradditional files/jars required.

As per the comment in the Docker file, create a folder named lib parallel to the Docker file andput tibjms.jar and jms-2.0.jar from <EMS 8.4.1_HOME>/lib directory inside it.

tibcrypt.jar is not present in EMS 8.4.1.

2. Execute the following command from the same location ../opes/docker/msgadapter: $ docker build --rm=true -t tibco/msgadapter:5.0 .

3. Execute the following command to check the images that are created: $ docker images

Third-Party Services

TIBCO OPE depends on third-party components for configuration management, object storage andsearch indexes. The following third-party components are required to be up and running beforeproceeding with post-installation tasks:

● Consul

● Elasticsearch (optional)

● MinIO

10

TIBCO® Offer and Price Engine Installation and Configuration

Page 11: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Post Installation

ConfigurationRefer to the post configuration details mentioned in Consul configuration management.

In general, the following items need to be configured for Consul:

● All the tenants in the system. See Setting up Tenants in Consul.

● All the tenant-specific flags from earlier release to be migrated into Consul.

● Elasticsearch url pointing to the running Elasticsearch cluster (optional if not using search).

● MinIO url pointing to the MinIO object store cluster.

● MinIOAccessKey and MinIOSecretKey.

● OPE gateway configurations (optional if not using authentication and authorization).

Setting up Tenants in ConsulThe following section describes how to configure tenants for Consul.

Procedure

1. Start by bringing Consul up with no data.

2. Log in to a box that has a Consul client installed. Copy the Consul initial configuration file to somelocation on the machine and use the following import command to import initial configuration:$ consul kv import -http-addr=http://<consul_host>:<consul_port> @consul_initial_configuration.json

11

TIBCO® Offer and Price Engine Installation and Configuration

Page 12: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Importing an initial configuration such as above will work for a case where multipleConsul containers are accessing the same shared NFS file system. Example NFS Consuldeployment configuration files are available under the <OPE_HOME>/samples/initial_configuration folder.

3. After the successful import, make sure a config key is a visible under Key / Value section.

To update values for the key, follow the path to the key and update the value.

For example, to add a new tenant "tenant1" for TIBCO OPE, add the new tenant name for the key"tenantList" under path config/application/tenants/default/tenantsList, and followthese steps:

1. Reach to the required Key.

12

TIBCO® Offer and Price Engine Installation and Configuration

Page 13: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

2. Update the existing value to add "tenant1" as the new tenant to the list.

3. Click Save. UI will display confirmation popup as the key was updated successfully.

13

TIBCO® Offer and Price Engine Installation and Configuration

Page 14: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Offer Search and BrowseThe Search API allows you to perform contextual searches for products on the basis of keywords andphrases present in the product description, characteristics, and other fields that have been marked forsearching.

Post Installation

● List of Tenants

Specify the list of tenants using Consul configuration.

● Offer Search Engine URL

Once the Offer Search Engine is up and running, configure the following property using Consulconfiguration.

14

TIBCO® Offer and Price Engine Installation and Configuration

Page 15: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

15

TIBCO® Offer and Price Engine Installation and Configuration

Page 16: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Verifying Installation

Make sure the required OPE microservices and third-party services have been installed and arerunning fine without any error.

Verifying Offer Services

1. Verify that the MLE microservice is up and running without any errors.

2. Verify that the following consul configuration for model loading is present:

● Product

● Prices

● Discount

● Category

● Rule

3. Publish the models. Either:

● Use offline models under $OPE_HOME/samples/models:

1. Copy the under respective MinIO input bucket.

Or:

● Publish directly from Catalog:

1. In this case, create bridges between respective PSC topics and OPES queues and publish themodels.create bridge source=topic:tibco.ac.productmodel.topictarget=queue:tibco.aff.catalog.product.request

create bridgesource=topic:tibco.ac.rulemodel.topic target=queue:tibco.aff.catalog.operulemodel.request

create bridgesource=topic:tibco.ac.pricemodel.topic target=queue:tibco.aff.catalog.price.request

create bridge source=topic:tibco.ac.discountmodel.topic target=queue:tibco.aff.catalog.discount.request

create bridge source=topic:tibco.ac.categorymodel.topic target=queue:tibco.aff.catalog.category.request

4. Once the model loading is finished, verify that the cached models are present in MinIO's mappedvolume under "<minio>/data/cached-products", "<minio>/data/cached-prices","<minio>/data/cached-categories","<minio>/data/cached-rules","<minio>/data/cached-discounts".

5. Submit a dummy GetOffer request through SOAP over HTTP to the OPE server according to theGetOffer sample located at $OPE_HOME/samples/request_response/GetOfferRequest.xml.

Use the WSDL available at $OPE_HOME/specs/wsdl/OfferPriceServiceHTTP.wsdl to submit theoffer request.

6. Verify that the service responds with eligible offers for the request.

16

TIBCO® Offer and Price Engine Installation and Configuration

Page 17: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Verifying Search Services

To verify the Search Services feature:

1. Verify that the Consul, MinIO, and Elasticsearch clusters are up and running.

2. Verify that MLE and OPE microservices are up and running.

3. Verify that the following Consul configuration for model loading is present.

4. Publish the models. Either:

● Use offline models under $OPE_HOME/samples/models/search; Copy them under respectiveMinIO input bucket.

Or:

● Publish directly from Catalog:

In this case, create bridges between respective FC topics and OPES queues and publish themodels:create bridgesource=topic:tibco.ac.productmodel.topictarget=queue:tibco.aff.catalog.product.requestcreate bridgesource=topic:tibco.ac.rulemodel.topictarget=queue:tibco.aff.catalog.operulemodel.requestcreate bridgesource=topic:tibco.ac.pricemodel.topictarget=queue:tibco.aff.catalog.price.requestcreate bridgesource=topic:tibco.ac.discountmodel.topictarget=queue:tibco.aff.catalog.discount.requestcreate bridgesource=topic:tibco.ac.categorymodel.topictarget=queue:tibco.aff.catalog.category.request

5. Once the model loading is finished:

a. Verify that the cached models are present in MinIO's mapped volume under "<minio>/data/cached-products", "<minio>/data/cached-prices","<minio>/ data/cached-categories","< minio>/data/cached-rules", and "< minio>/data/cached-discounts".

b. Verify that the following index has been created under the Elasticsearch cluster using followingurl: <elasticsearchhost>:<port>/product_default.

6. Submit a dummy Search by keyword request to the OPE Core engine using the request samplepresent at this location: $OPE_HOME/samples/request_response/keyword-search-request.txt.

7. Verify that the service responds with a valid search response listing the found products.

Verifying Authorization and Authentication

To verify if the server is up and running, hit the ready endpoints to get following response:

Auth Center:

● Request URL: http(s)://host:port/actuator/ready

● Response:{ "is_authCenter_ready": "true"}

OPE Gateway:

17

TIBCO® Offer and Price Engine Installation and Configuration

Page 18: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

● Request URL: http(s)://host:port/actuator/ready

● Response:{ "is_opeGateway_ready": "true"}

18

TIBCO® Offer and Price Engine Installation and Configuration

Page 19: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Red Hat Openshift Deployment

TIBCO OPE containers can be deployed on Red Hat OpenShift 3.10 PaaS environment. The followingtopics describe TIBCO OPE compatibility with Red Hat OpenShift 3.10 deployment.

Make sure that your OpenShift environment is up and running and has access to its internal Dockerregistry.

Application DeploymentThe following is a sample template for deploying a new TIBCO OPE application on OpenShift. SampleOpenShift configuration files for deploying all the OPE microservices are present at the followinginstallation location: <OPE_HOME>/ocp/apiVersion: v1kind: Listitems:- apiVersion: v1 kind: Service metadata: name: ope spec: ports: - port: 9090 targetPort: 9090 name: jolokia selector: deploymentconfig: ope- apiVersion: v1 kind: DeploymentConfig metadata: name: ope annotations: hawkular-openshift-agent: ope-jolokia spec: replicas: 1 selector: deploymentconfig: ope strategy: # We set the type of strategy to Recreate, which means that it will be scaled down prior to being scaled up type: Recreate template: metadata: labels: deploymentconfig: ope spec: containers: - image: tibco/ope:5.0 name: ope ports: - name: jolokia containerPort: 9090 - name: http containerPort: 9090 env: - name: CONSOLE_LEVEL value: INFO - name: CONSUL_HOST value: 10.97.97.34 - name: CONSUL_PORT value: '8500' volumes: - name: hawkular-openshift-agent configMap: name: ope-jolokia readinessProbe: failureThreshold: 3

19

TIBCO® Offer and Price Engine Installation and Configuration

Page 20: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

httpGet: path: /actuator/ready port: 9090 scheme: HTTP periodSeconds: 300 successThreshold: 1 timeoutSeconds: 3 livenessProbe: failureThreshold: 3 httpGet: path: /actuator/health port: 9090 scheme: HTTP periodSeconds: 300 successThreshold: 1 timeoutSeconds: 3 resources: limits: cpu: '2' memory: 2Gi requests: cpu: '1' memory: 1Gi- apiVersion: v1 kind: ConfigMap metadata: name: ope-jolokia labels: name: ope-jolokia data: hawkular-openshift-agent: | endpoints: - type: jolokia protocol: http port: 9090 path: /actuator/jolokia/ collection_interval: 15s metrics: # int data value - name: java.lang:type=Memory#ObjectPendingFinalizationCount type: gauge description: Object Pending Finalization Count # long data value - name: java.lang:type=OperatingSystem#OpenFileDescriptorCount type: gauge description: Open File Descriptor Count # double data value - name: java.lang:type=OperatingSystem#ProcessCpuLoad type: gauge description: Process CPU Load # composite data value - name: java.lang:type=Memory#HeapMemoryUsage#used type: gauge description: Heap Memory Used units: B # boolean value - name: java.lang:type=Memory#Verbose type: gauge description: Memory Verbose Mode- apiVersion: v1 kind: Route metadata: name: ope spec: to: kind: Service name: ope- apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: ope spec:

20

TIBCO® Offer and Price Engine Installation and Configuration

Page 21: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

scaleTargetRef: kind: DeploymentConfig name: ope apiVersion: v1 subresource: scale minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 5

Managing Health and Liveness Endpoints

TIBCO OPE supports the following health and liveness endpoints to check the overall health of thesystem and generate the response accordingly:

● Health Endpoint

● Ready Endpoint

The HTTP response code numbers are the same for both the endpoints:

● On Success - 200 (OK)

● On Failure - 503 (Service unavailability)

While starting up an Offer and Price Engine server, Offer and Price Engine either reads the model cachegenerated generated by the model load engine from object storage. This impacts startup timedrastically, therefore there is no ideal periodSeconds wait time before liveness probe can be made.Therefore it is a good practice not to set liveness probe when deploying TIBCO OPE on Kubernetes orOpenShift.

Managing Health EndpointThe custom Health Endpoint provides information about the overall health status of the applicationresources like the Elasticsearch database and disk space.https://<host>:<port>/actuator/health

{"status":"UP"}

Managing Ready EndpointThe Ready Endpoint provides the Offer and Price Engine server liveness status. It also checks if theserver is ready to accept the external requests.

https://<host>:<port>/actuator/ready

{"is_ope_ready":"true"}

Hawkular Monitoring SupportTIBCO OPE provides support for exposing the application bean JMX endpoints on the HTTP protocolby using the Jolokia library.

Jolokia is a third-party library released under Apache license and enables exposing application JMXinformation on HTTP protocol. An OpenShift monitoring application such as Hawkular uses this

21

TIBCO® Offer and Price Engine Installation and Configuration

Page 22: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

information to display the additional metrics as shown below.

For an example of an OPE deployment yaml file with Jolokia configuration, see ApplicationDeployment

Hawkular Monitoring Support

The TIBCO OPE provides support for exposing the application bean JMX endpoints on the HTTPprotocol, by using Jolokia library.

Jolokia is a third-party library released under Apache license and enables exposing application JMXinformation on HTTP protocol. An OpenShift monitoring application such as Hawkular uses this

22

TIBCO® Offer and Price Engine Installation and Configuration

Page 23: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

information to display the additional metrics as shown below.

An example of an Offer and Price Engine deployment YAML file with Jolokia configuration:ope_openshift.yaml================================apiVersion: v1kind: Listitems:- apiVersion: v1 kind: Service metadata: name: ope spec: ports: - port: 9090 targetPort: 9090

23

TIBCO® Offer and Price Engine Installation and Configuration

Page 24: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

name: jolokia selector: deploymentconfig: ope- apiVersion: v1 kind: DeploymentConfig metadata: name: ope annotations: hawkular-openshift-agent: ope-jolokia spec: replicas: 1 selector: deploymentconfig: ope strategy: # We set the type of strategy to Recreate, which means that it will be scaled down prior to being scaled up type: Recreate template: metadata: labels: deploymentconfig: ope spec: containers: - image: tibco/ope:5.0 name: ope ports: - name: jolokia containerPort: 9090 - name: http containerPort: 9090 env: - name: CONSOLE_LEVEL value: INFO - name: CONSUL_HOST value: 10.97.97.34 - name: CONSUL_PORT value: '8500' volumes: - name: hawkular-openshift-agent configMap: name: ope-jolokia readinessProbe: failureThreshold: 3 httpGet: path: /actuator/ready port: 9090 scheme: HTTP periodSeconds: 300 successThreshold: 1 timeoutSeconds: 3 livenessProbe: failureThreshold: 3 httpGet: path: /actuator/health port: 9090 scheme: HTTP periodSeconds: 300 successThreshold: 1 timeoutSeconds: 3 resources: limits: cpu: '2' memory: 2Gi requests: cpu: '1' memory: 1Gi- apiVersion: v1 kind: ConfigMap metadata: name: ope-jolokia labels: name: ope-jolokia

24

TIBCO® Offer and Price Engine Installation and Configuration

Page 25: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

data: hawkular-openshift-agent: | endpoints: - type: jolokia protocol: http port: 9090 path: /actuator/jolokia/ collection_interval: 15s metrics: # int data value - name: java.lang:type=Memory#ObjectPendingFinalizationCount type: gauge description: Object Pending Finalization Count # long data value - name: java.lang:type=OperatingSystem#OpenFileDescriptorCount type: gauge description: Open File Descriptor Count # double data value - name: java.lang:type=OperatingSystem#ProcessCpuLoad type: gauge description: Process CPU Load # composite data value - name: java.lang:type=Memory#HeapMemoryUsage#used type: gauge description: Heap Memory Used units: B # boolean value - name: java.lang:type=Memory#Verbose type: gauge description: Memory Verbose Mode- apiVersion: v1 kind: Route metadata: name: ope spec: to: kind: Service name: ope- apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: ope spec: scaleTargetRef: kind: DeploymentConfig name: ope apiVersion: v1 subresource: scale minReplicas: 1 maxReplicas: 3 targetCPUUtilizationPercentage: 5

25

TIBCO® Offer and Price Engine Installation and Configuration

Page 26: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Configuration

TIBCO OPE uses Consul as an external configuration management tool.

Any changes to the configuration are loaded without needing to restart the micro services.Additionally, applications running OPE Core Engine are notified of changes to the configurationinformation when the Model Loading Engine loaded the data models.

Configuration Management

Consul runs as a container in cluster format along with the Offer Price Engine and the Model LoadingEngine in order to coordinate the configuration management for TIBCO OPE.

Configuration information is added to Consul as a key-value store.

Consul ConfigurationUse the consul kv import command to import the initial configuration information to instance of arunning Consul cluster.

Prerequisites

Make sure the Consul client is installed on the system where you will run the import command.

Procedure

1. Copy the initial Consul configuration file consul_initial_configuration.json from thefolder /samples/initial_configuration.

2. Run the consul import kv command to import all the initial configuration to the running consulcluster.Include the service URL endpoint of the Consul cluster in the command.

3. Once all the configuration is imported, values for most of the keys will need to be updated.For example, "tenantsList" key located at config/application/tenants/default/tenantsList/ needs to be updated to write names of the tenants in the system, or"minioAccessKey" located at config/application/tenants/default/minioAccessKey needs tobe updated to provide correct MinIO access key, etc.

26

TIBCO® Offer and Price Engine Installation and Configuration

Page 27: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Example Import

Application Properties

Offer and Price Engine Integration Configuration

Key Description

com.tibco.af.ope.flags.chkrelevantoludfs Validates User Defined Fields attached to theproduct that are defined as input characteristicsof the product. The default value is false.

com.tibco.af.ope.flags.chkvalidoludfs Validates mandatory characteristics attached tothe product model that are found in thecorresponding product instance as User DefinedFields in the request. The default value is false.

com.tibco.af.ope.flags.chkvalidlinkudfs Validates mandatory linking User Defined Fieldsthat are attached as User Defined Fields to theproduct in the order request. The default isfalse.

com.tibco.af.ope.flags.chkrecordtypevali

d

Checks if the RecordType is valid. The default isfalse.

com.tibco.af.ope.extn.enableRuleBasedEli

gibilityEvaluation

Enables the Eligible rule for Eligible products.The default value is false.

com.tibco.af.ope.extn.enableRuleBasedIne

ligibilityEvaluation

Enables the InEligible rule for InEligibleproducts. The default value is false.

com.tibco.af.ope.extn.enableRuleBasedInc

ompatibilityEvaluation

Enables the Incompatible rule for Incompatibleproducts. The default value is false.

27

TIBCO® Offer and Price Engine Installation and Configuration

Page 28: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Key Description

com.tibco.af.ope.extn.missingRuleEntityD

efault

Used for missing rule entity. The default value isfalse.

com.tibco.af.ope.extn.invConf.host The default value is localhost.

com.tibco.af.ope.extn.invConf.port The default value is 8080.

com.tibco.af.ope.extn.invConf.user The default value is admin@tibco.

com.tibco.af.ope.extn.invConf.password The default value is admin.

com.tibco.af.ope.flags.setnorecordstatus

toactive

Sets no RecordStatus to active. The default valueis false.

com.tibco.af.ope.flags.validateudfdataty

pe

Validates the data types for orderline UserDefined Fields. The default is false.

com.tibco.af.ope.flags.validateudfrange Validates that the orderline User Defined Fieldsare within the specified range specified. Thedefault is false.

com.tibco.af.ope.flags.validateudfregex Validates that the orderline User Defined Fieldshave the values per the regex. The default isfalse.

com.tibco.af.ope.flags.regexcurrency The regular expression for currency. The defaultvalue is [0-9]*.?[0-9]*.

com.tibco.af.ope.flags.regexdigits The regular expression for digits. The defaultvalue is [0-9]*.?[0-9]*.

com.tibco.af.ope.flags.regexdate The regular expression for date. The defaultvalue is [0-3]?[0-9]/[0-1][0-9]/[1-2][0-9]{3}.

com.tibco.af.ope.flags.regextime The regular expression for time. The defaultvalue is [0-2]?[0-9]:[0-5][0-9].

com.tibco.af.ope.flags.regexboolean The regular expression for Boolean. The defaultvalue is TRUE|FALSE.

28

TIBCO® Offer and Price Engine Installation and Configuration

Page 29: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Key Description

com.tibco.af.ope.flags.udfignorelist The User Defined Fields in this property are notshown as incompatible if they are in the sameorder:

EPMR_ACTION_PROVIDE

EPMR_ACTION_UPDATE

EPMR_ACTION_CEASE

EPMR_ACTION_WITHDRAW

COMPENSATE_PROVIDE

COMPENSATE_UPDATE

COMPENSATE_CEASE

MODIFICATION_IDENTIFYING_ATTR

External Application Logging ConfigurationOffer and Price Engine logging can be configured using the environmental variable CONSOLE_LEVEL tospecify the logging level.

Also, to configure the logging level through start.sh file, you can also configure the logging levelusing the environmental variable CONSOLE_LEVEL.

You can set the variable and its values such as shown in the following example,

Variable Name: CONSOLE_LEVEL

Valid Values: ALL / DEBUG / ERROR / FATAL / INFO / OFF / TRACE / WARN

Default Value: ERROR

Java ExtensionTIBCO OPE can be customized to support the functionality that can be integrated by using the Javaextension.

All TIBCO OPE web services can be extended using custom configurations in the specified hooks whilerequests execution. All the web service requests are executed sequentially in the phases and the customhooks are provided for each phase.Following are the phases and the hooks provided for every phase:

GetOffer

Phase Hook in ope_config file

Custom Validation customOfferValidationRule

Custom Filter Processing customOfferFilterRules

Custom Eligibility customEvaluateEligibilityRule

Custom Publishing customOfferResponseRule

29

TIBCO® Offer and Price Engine Installation and Configuration

Page 30: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Validate Offer

Phase Hook in ope_config file

Custom Validation customOfferValidationRule

Custom Publishing customOfferResponseRule

GetProductInformation

Phase Hook in ope_config file

Custom Filter Processing customOfferFilterRules (If the requestcontains query elements)

Custom Publishing customProdInfoResponseRule

GetPrices

Phase Hook in ope_config file

Custom Processing customPriceProcessingRule

Custom Publishing customPriceResponseRule

GetPriceInformation

Phase Hook in ope_config file

Custom Processing priceCustomInfoProcessingRule

Custom Publishing customPriceResponseRule

Prerequisites

For all the files used for the implementation of this Java extension, you need to refer the Java APIReferences .

To extend the execution of TIBCO OPE web service requests during different phases, add the java-based custom classes as described in the following steps:

Procedure

1. To implement the custom logic by extending the interfaces, create a java project such asopeExtensions.zip, and complete the following steps:a) Copy the opeClient-5.0.0-RELEASE.jar file from the $OPE_HOME/lib/opeClient-5.0.0-

RELEASE.jar , add as dependency for the java project. The opeClient-5.0.0-RELEASE.jar filecontains all the interfaces required to extend the engine execution rules.

b) To add the rule actions, extend abstract class"com.tibco.fos.opes.server.ope.extension.AbstractExtensionRuleAction".

c) To add the rule conditions, extend abstract class"com.tibco.fos.opes.server.ope.extension.AbstractExtensionRuleCondition".

30

TIBCO® Offer and Price Engine Installation and Configuration

Page 31: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

2. Create a JAR file of the project and copy it in the {OPE_HOME}/docker/ope/lib directory.

3. In consul, add key value as:com.tibco.af.ope.ope.ext.classes=c1::com.tibco.fom.ope.ext.GetPricesResponseCondition,a1::com.tibco.fom.ope.ext.GetPricesResponseAction

4. Navigate to the {OPE_HOME}/docker/ope/lib/config directory, and configure the custom class inthe ope_config.xml rule sequence configuration file.For example, to configure custom classes for validation, add them under following events:a) Add the action class under "action" element.b) Add the condition class under "condition" element.Ensure that the beanName is the classID configured in Consul and all the other details remain thesame.

The <sequencedRule> indicates an element where all the actions are executedsequentially. One condition can have multiple actions inside a <sequencedRule> element.Multiple <sequenceRule> elements are used to separate conditions and theircorresponding actions.

Example for "customOfferValidation":<!-- Custom Validation Class goes here --> <sequencedECARuleSet ruleSetName="customOfferValidationRule" runOnFailure="false" runOnError="false"> <event eventName="customOfferValidation" type="event"> <eventSource> <endpointType> <uri>sape://localhost</uri> </endpointType> <inMessageType> <javabean/> </inMessageType> </eventSource> <lifetime/> </event> <sequencedRule> <action actionType="bean"> <actionBean beanId="customActionClassId" methodName="execute" interface="com.tibco.aff.eca.base.Action"/> </action> <condition conditionType="bean"> <conditionBean beanId="customConditionClassId" methodName="evaluate" interface="com.tibco.aff.eca.base.Condition"/> </condition> </sequencedRule> </sequencedECARuleSet>

Example for "customEvaluateEligibility":<!-- Custom Validation Class goes here --> <sequencedECARuleSet ruleSetName="customEvaluateEligibilityRule" runOnFailure="false" runOnError="false"> <event eventName="customEvaluateEligibility" type="event"> <eventSource> <endpointType> <uri>sape://localhost</uri> </endpointType> <inMessageType> <javabean/> </inMessageType> </eventSource> <lifetime/> </event> <sequencedRule> <condition conditionType="bean"> <conditionBean beanId="getOfferOnlyCondition" methodName="evaluate" interface="com.tibco.aff.eca.base.Condition"/> </condition>

31

TIBCO® Offer and Price Engine Installation and Configuration

Page 32: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

<action actionType="bean"> <actionBean beanId="getOfferOnly" methodName="execute" interface="com.tibco.aff.eca.base.Action"/> </action> </sequencedRule> </sequencedECARuleSet>

All the web services are supported for the Java customization.

IndexThe Model Loading Engine creates product indexes and processes the incoming product models toindex them in the Offer Search Engine.

Product Index

To create a product index for each tenant, the tenant has to be configured in the applicationconfiguration. See External Application Logging Configuration for more information.

At startup, the Model Loading Engine tries to create a product index for all the configured tenants bycalling The Create Index API of the Offer Search Engine. This creates an <tenant id>__Product indexin the Offer Search Engine.

Index Mapping

● By default, the Offer Search Engine uses the existing incoming product model to create thecorresponding domain object. To support TIBCO OPE based queries and dynamic product modelchanges, a custom index mapping file is used. This file is used as an input along with the sourceproduct model document to index.

● For full-text purposes, all the fields eligible for full-text search are copied in theproductFullTextSearch field of the product mapping file so that search is executed only across onfield instead of insert multiple fields in the search query.

● The category from the product is mapped as follows:"categories" : { "type": "nested", "properties" : { "name" : { "copy_to": "productFullTextSearch", "type": "keyword" }, "childCatList" : { "properties" : { "name" : { "copy_to": "productFullTextSearch", "type": "keyword" }, "childCatList" : { "properties" : { "name" : { "copy_to": "productFullTextSearch", "type": "keyword" }, "level" : { "type" : "long" } } }, "level" : { "type" : "long" } } },

32

TIBCO® Offer and Price Engine Installation and Configuration

Page 33: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

● Segment mapping is as follows: "compatibleSegments": { "type": "nested", "properties": { "segmentName": { "copy_to": "productFullTextSearch", "type": "keyword" }, "segmentType": { "copy_to": "productFullTextSearch", "type": "keyword" } } },

● Record Type/ Sub Types are nested as follows:"classification": { "type": "nested", "properties": { "type": { "copy_to": "productFullTextSearch", "type": "keyword" }, "subType": { "copy_to": "productFullTextSearch", "type": "keyword" } } },

Classifications have types that contain sub types as a part of the model, this enables aggregation ontype ad sub type elements.

● Suggestion terms are mapped as follows:"suggestionTerms": { "type":"text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }

● Category attributes are mapped as follows:"filterAttributes": { "type":"nested", "properties": { "name": { "copy_to": "productFullTextSearch", "type": "keyword" }, "value": { "copy_to": "productFullTextSearch", "type": "keyword" } } },

Indexing Product Documents

After the model loading engine has started and the tenant index created, the engine can process modelsand index them against Offer Search Engine product index. The model loading engine indexes theproduct models as follows:

1. Loads models for processing (from online and offline modes) and parses them.

2. Sends the models to the Offer Search Engine for indexing against tenant based product indexcreated earlier. The products are indexed in bulk and will index all products present per product

33

TIBCO® Offer and Price Engine Installation and Configuration

Page 34: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

model xml file at the same time. For example, if the product model xml contains ten products, all tenproducts will be indexed together in a single request instead of ten individual requests.

Configuration ExternalizationApplication configuration for TIBCO OPE is configured externally in Consul.

The TIBCO OPE configuration is added to the following root path in the Consul key-value store:/config/application

All configuration keys are divided into the following sections:/config/application/auth/jwtexpiration/config/application/auth/jwtsecret/config/application/auth/userinfo

auth

This auth section defines the configuration for generating and verifying OAuth2 JSON Web Token(JWT) authentication.

This configuration section is required when using the OPE Gateway and Auth Centermicroservices.

Key Description Value

jwtexpiration The JWT expiration time, inmilliseconds.

Positive values only.

Default value: 86400

Maximum value:9,223,372,036,854,775,807

jwtsecret The JWT secret. JSON arrays only.[ { "username":"admin", "password":"$2a$10$hzOJjNdnSZ4DNhs.P4v/dO46hxcW.M0jJHiCvQFSKBBhZO3nr2vuW", "tenant":"default", "roles":[ "admin", "user" ] }, { "username":"opes", "password":"$2a$04$1ULbrNGclQWB92AQJJ66/.gq3Q/iO.JSwjDFC9UoaoUQOAOd/Epsa", "tenant":"t1", "roles":[ "user" ] }]

userinfo User configuration in JSON format.

Configuration includes username,password, tenant names, and roles.

String onlyDefault value:thisistopsecretccc3d9f9-5440-

4605-bf82-469d647f739d

34

TIBCO® Offer and Price Engine Installation and Configuration

Page 35: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

notifications

The notifications section contains keys that are created by the Model Loading Engine.

This section is initially empty with keys added when data models are processed.

The typical format of a notification key is:config/application/notifications/modelsProcessed/<TenantName>/<CacheName>

For example,config/applicatioin/notifications/modelsProcessed/<TenantName>/PRODUCT_CACHE

When the Model Loading Engine micro service completed a model loading activity, the date value forthe appropriate cache is updated. A key for that cache is created if it does not exist.

The value of this key is the current time (in milliseconds) when the notification was sent. Consulnotifies all Offer Search Engine micro service that have registered for these notifications. These microservices then update their corresponding caches without requiring a restart of the application orcontainer.

The following image shows a sample key-value notification:

tenants

The tenants section of the Consul key-value store adds all tenant-specific configuration for theproduct.

The typical format of a notification key is:

/config/application/tenants/<TenantName>/<keysSpecificToThisTenant>

For example:

The following table lists the keys that are required for any TIBCO OPE deployment:

Key Description Value

jwtexpiration The JWT expiration time, inmilliseconds.

Positive values only.

Default value: 86400

Maximum value:9,223,372,036,854,775,807

35

TIBCO® Offer and Price Engine Installation and Configuration

Page 36: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Key Description Value

miniourl The URL for MinIO.

For example: http://localhost:9000

elasticsearchUrl The URL for ElasticSearch.

For example: http://localhost:9200

tenantList The list of all tenants.If there is only one tenant, the valueis default.

For example,

For a single tenant: default

For multiple tenants: default, t1,t2

minioAccesskey The Access key for the MinIOserver.

minioSecretKey The Secret key for the MinIO server.

modelPollerThreadC

ount

The thread count for the modelprocessing.

Assuming that the Model LoadEngine micro service has enoughRAM to process models, therecommendation is to use 100threads for each MinIO clusternode.

For example, if MinIO runs as athree node cluster, this countshould be 300.

Maximum value allowed: 1000

The following fields are required if using the corresponding TIBCO OPE features.

emsUrl EMS Url endpoint URL. This key isrequired if online model loadingfunctionality is required with"Message Adapter" microservice

elasticsearchUrl Elastic Search endpoint URL. Thiskey is required if Elastic Search isenabled for "Search and Browse"OPE functionality

36

TIBCO® Offer and Price Engine Installation and Configuration

Page 37: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Key Description Value

com.tibco.af.ope.f

lags.udfignorelist

Any other OPE specific functionalkeys. For example, a key to add"ignore UDF" list

Any key required only by a specific tenant has to be added under the section for that tenant.

For example, if the com.tibco.af.ope.flags.udfignorelist key is required only by tenant t1, thekey has to be added in the following manner:kv/config/application/tenants/t1/com.tibco.af.ope.flags.udfignorelist

The key applies to all tenants if it is under the default tenant.

In case the specific key for "default" tenant is needed to be applicable ONLY for the "default" tenantthen the customer has to create a separate tenant with the name other than "default" and add thetenant-specific configuration for it.

Updates to ConfigurationsAny changes to the Consul configurations are loaded without needing to restart the micro services.

After the data models are loaded, the Model Loading Engine either creates or updates the key-valuepairs in the config folder. The OPE micro service is notified of these updates.

Any changes in the keys or their values cause the micro service to reload the properties.

An INFO level message such as this one is displayed when a key or a value is updated:2018-09-06 12:01:34.534 INFO 48162 --- [TaskScheduler-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@7dbee8f8: startup date [Thu Sep 06 12:01:34 IST 2018]; root of context hierarchy2018-09-06 12:01:34.665 INFO 48162 --- [TaskScheduler-1]o.s.c.e.event.RefreshEventListener: Refresh keys changed: [OPE.Tenant1.Property1]

OPE Storage

TIBCO OPE Storage (OPES) needs to store customer model XML and processed cached objects inpermanent storage so as to persist data across OPE micro service container restarts.

OPE can store data across any of the following backend storage systems using MinIO object storage

● File System

● NFS Storage

● SAN Storage

● Amazon S3

● Azure Blob Storage

● Google Cloud Storage

The following model types will have 3 buckets each in MinIO for model processing:

● Product

● Price

● Discount

● Category

37

TIBCO® Offer and Price Engine Installation and Configuration

Page 38: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

● Rule

Each Model will have the following 3 types of buckets:

● Input

● Failure

● Success

For example, for the product model, the MinIO buckets will be:

product-models-failure

product-models-input

product-models-success

For 5 model types with 3 different types of buckets, there will be 15 buckets for processing modelXMLs.

Similarly to store processed cache information, separate cache buckets are created for each model type;therefore, the bucket names for the processed cache will be:

● cache-products

● cache-prices

● cache-discounts

● cache-categories

● cache-rules

All bucket names have lower-case characters.

Here is an example screenshot of how the buckets look in the MinIO UI. The MinIO UI can be accessedon http(s)://<host>:<port>:9000.

38

TIBCO® Offer and Price Engine Installation and Configuration

Page 39: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

39

TIBCO® Offer and Price Engine Installation and Configuration

Page 40: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

All the buckets are needed to be created through the MinIO UI to ensure that there are no accesspermission issues on the buckets/folders on the file system.

The following is an example UI screen with an option (highlighted in the RED box) to create a newbucket.

Post-production day-1 ConfigurationAs part of the initial configuration, the following buckets need to be created manually using the MinIOUI.

Bucket Name Bucket Purpose

1 cache-products To store product cache

2 cache-prices To store price cache

3 cache-discounts To store discount cache

4 cache-categories To store category cache

5 cache-rules To store rule cache

6 product-models-input To store incoming product XML files

7 product-models-success To store successfully processed product XML files

8 product-models-failure To store failed processed product XML files

9 price-models-input To store incoming price XML files

40

TIBCO® Offer and Price Engine Installation and Configuration

Page 41: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Bucket Name Bucket Purpose

10 price-models-success To store successfully processed price XML files

11 price-models-failure To store failed processed price XML files

12 discount-models-input To store incoming discount XML files

13 discount-models-success To store successfully processed discount XML files

14 discount-models-failure To store failed processed discount XML files

15 rule-models-input To store incoming rule XML files

16 rule-models-success To store successfully processed rule XML files

17 rule-models-failure To store failed processed rule XML files

18 category-models-input To store incoming category XML files

19 category-models-success To store successfully processed category XML files

20 category-models-failure To store failed processed category XML files

MinIO Cluster SetupMinIO object store is used to store model-related information that needs to be persisted. To avoid a"Single Point of Failure" (SPF), MinIO is run in a cluster mode with 3 or more node cluster.

41

TIBCO® Offer and Price Engine Installation and Configuration

Page 42: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

(image reference: https://docs.min.io/docs/multi-tenant-minio-deployment-guide.html)

To set up a multi-disk Minio deployment, refer to the Multi-Tenant MinIO Deployment Guide athttps://docs.min.io/.

42

TIBCO® Offer and Price Engine Installation and Configuration

Page 43: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Troubleshooting

The following section describes troubleshooting information for TIBCO OPE.

Error Solution

message=Access denied, bucketName=models-products-input

Use MinIO to create buckets.

ERROR: for elasticsearch Cannot start serviceelasticsearch: OCI runtime create failed:container_linux.go:344: starting containerprocess caused "process_linux.go:424: containerinit caused \"rootfs_linux.go:58: mounting \\\"/local/fosuser/minio_consul_elastic/elastic/elasticsearch.yml\\\" to rootfs \\\"/var/lib/docker/devicemapper/mnt/2bf96ca7365c66c9e5f4a3a69a23c23eb5a4b4f721c4b06c20db626fc7e49e63/rootfs\\\" at \\\"/var/lib/docker/devicemapper/mnt/2bf96ca7365c66c9e5f4a3a69a23c23eb5a4b4f721c4b06c20db626fc7e49e63/rootfs/usr/share/elasticsCreating opes-consul ... done

s and is the expected type

ERROR: for elasticsearch Cannot start serviceelasticsearch: OCI runtime create failed:container_linux.go:344: starting containerprocess caused "process_linux.go:424: containerinit caused \"rootfs_linux.go:58: mounting \\\"/local/fosuser/minio_consul_elastic/elastic/elasticsearch.yml\\\" to rootfs \\\"/var/lib/docker/devicemapper/mnt/2bf96ca7365c66c9e5f4a3a69a23c23eb5a4b4f721c4b06c20db626fc7e49e63/rootfs\\\" at \\\"/var/lib/docker/devicemapper/mnt/2bf96ca7365c66c9e5f4a3a69a23c23eb5a4b4f721c4b06c20db626fc7e49e63/rootfs/usr/share/elasticsearch/config/elasticsearch.yml\\\"caused \\\"not a directory\\\"\"": unknown:Are you trying to mount a directory onto a file(or vice-versa)? Check if the specified host pathexists and is the expected type

ERROR: Encountered errors while bringing upthe project.

Check if the specified host path exists and is theexpected type.

Create Elastic directory and copy theelasticsearch.yml from samples under Elasticdirectory.

Also give 777 privileges on the Elastic directory:sudo docker-compose --file docker-compose.yml up elasticsearch

ERROR: Encountered errors while bringing upthe project.

[fosuser@opes-test-2 minio_consul_elastic] #

43

TIBCO® Offer and Price Engine Installation and Configuration

Page 44: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Error Solution

elasticsearch | [2019-02-07T18:55:44,689][INFO ][o.e.b.BootstrapChecks ] [es01] bound orpublishing to a non-loopback address, enforcingbootstrap checks

elasticsearch | ERROR: [2] bootstrap checksfailed

elasticsearch | [1]: initial heap size [536870912]not equal to maximum heap size [2634022912];this can cause resize pauses and preventsmlockall from locking the entire heap

elasticsearch | [2]: max virtual memory areasvm.max_map_count [65530] is too low, increaseto at least [262144]

Run the command:sudo sysctl -w vm.max_map_count=262144

44

TIBCO® Offer and Price Engine Installation and Configuration

Page 45: Installation and Configuration TIBCO Software Release 5.0 ... · Docker. TIBCO OPE microservices are containerized and run on hosts that support the Docker environment. The Docker

Error Solution

Creating minio ... error

Creating opes-consul ...

Creating elasticsearch ...

ERROR: for minio Cannot start service minio1:driver failed programming external connectivityon endpoint minio(9052cf90f8b57c32e6b303555529c0e627650c54723ec2857ea6958b8c1c55bf): (iptables failed: iptables--wait -t nat -A DOCKER -p tcp -d 0/0 --dport9000 -j DNAT --to-destination 172.21.0.2:9000 ! -ibr-8e23b769777a: iptables: No chain/target/match by that name.

Creating elasticsearch ... error

ERROR: for elasticsearch Cannot start serviceelasticsearch: driver failed programmingexternal connectivity on endpoint elasticsearch(447e4dcea1af447021e29cbaafe1c87ce08c5f8bfa8063e5faa8fa40eedd20c0): (iptables failed: iptables--wait -t nat -A DOCKER -p tcp -d 0/0 --dport9300 -j DNAT --to-destination 172.20.0.2:9300 ! -ibr-b99ab24b2e0e: iptables: No chainCreatingopes-consul ... error

(exit status 1))

ERROR: for opes-consul Cannot start serviceconsul: driver failed programming externalconnectivity on endpoint opes-consul(c9f7db7b5afaa56ed5241fb2a8fc500a3b3977dc1160616832ae3bb902f988e1): (iptables failed:iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8500 -j DNAT --to-destination172.21.0.2:8500 ! -i br-8e23b769777a: iptables: Nochain/target/match by that name.

(exit status 1))

ERROR: for minio1 Cannot start service minio1:driver failed programming external connectivityon endpoint minio(9052cf90f8b57c32e6b303555529c0e627650c54723ec2857ea6958b8c1c55bf): (iptables failed: iptables--wait -t nat -A DOCKER -p tcp -d 0/0 --dport9000 -j DNAT --to-destination 172.21.0.2:9000 ! -ibr-8e23b769777a: iptables: No chain/target/match by that name.

(exit status 1))

Enable firewall where Consul, MinIO, andElastic Search are deployed, and open the portsneeded:firewall-cmd --get-active-zones

firewall-cmd --zone=work --add-port=9000/tcp --permanent

firewall-cmd --reload

45

TIBCO® Offer and Price Engine Installation and Configuration


Recommended