This service implements the integration routing of the PHM Heathcare Demo. It is responsible for routing events from a Kafka Stream Topic to the Red Hat Process Automation Service.
Read this blog for more information:
-
Spin up a Kafka cluster
-
Clone and install the model in your Maven https://github.com/mauriziocarioli/PHM-Model
-
Clone the rule kjar project https://github.com/mauriziocarioli/PHM-Rules-SB-kjar
-
Clone and install the rule service project https://github.com/mauriziocarioli/PHM-Rules-SB-service
-
Clone the process kjar project https://github.com/mauriziocarioli/PHM-Processes-SB-kjar
-
Clone and install the process service project https://github.com/mauriziocarioli/PHM-Processes-SB-service
-
Configure a mock SMTP server such as https://mailtrap.io
Please read the readme files in the projects listed above
Each service can run in Docker as well as OpenShift as documented in the respective readme files.
The requirements above satisfied you can specify the connection properties in the application.properties config file.
You can use the following endpoint to generate some test msgs into Kafka Topic:
{
"triggerId": "1",
"memberId": "0987654321"
}
You can use Apache JMeter with Pepper Box plugin to load about 10m triggers using this JMeter Test plan jmeter/JMteter_kafka_topic_load_plan.jmx
before running the test plan make sure your local Kafka cluster is up & running. expects zookeper listening on
localhost:2181
and broker onlocalhost:9092
the Pepper Box plugin JAR file is avaiable inside the
jmeter/
dir. Before start JMeter copy this JAR into theJMETER_HOME/lib/ext
Access the OpenAPI spec with Swagger-UI
You can run this service in the following modes:
-
Single-node OpenShift cluster
-
Standalone on your machine
The most effective way to use this service is to deploy and run the project on OpenShift.
Important
|
This project requires Java 8 JDK or later and Maven 3.3.x or later. |
To deploy your application to a running single-node OpenShift cluster without preinstalled images:
-
Download the project and extract the archive on your local filesystem.
-
Log in to your OpenShift cluster:
$ oc login -u developer -p developer
-
Create a new OpenShift project for the application:
$ oc new-project phm-project
-
Import base images in your newly created project (phm-project):
$ oc import-image {image-name-version} --from={image-registry}{image-prefix}{image-name-version} --confirm
-
Build and deploy the project to the OpenShift cluster:
$ mvn clean -DskipTests fabric8:deploy -Popenshift
or
$ mvn clean -DskipTests fabric8:deploy -Popenshift -Dfabric8.generator.fromMode=istag -Dfabric8.generator.from=PHM_PROJECT/{image-name-version}
-
In your browser, navigate to the
phm-project
project in the OpenShift console. Wait until you can see that the pod for thePHM-integration-service
application has started up. -
On the project’s
Overview
page, locate the URL for thePHM-integration-service
application. The URL uses this form:http://PHM-integration-service-phm-project.OPENSHIFT_IP_ADDR.nip.io
. -
Click the URL to access the PHM Integration service application and then follow the instructions on that page.
To run this booster as a standalone project on your local machine:
-
Download the project and extract the archive on your local filesystem.
-
Build the project:
$ cd PROJECT_DIR $ mvn clean package
-
Run the services:
$ mvn spring-boot:run
-
Go to http://localhost:8181 and then follow the instructions on that page.
-
To view the Fuse Console got to link://localhost:10001/