Blog Posts BPMN DMN

Getting started with TrustyAI in only 15 minutes

Blog: Drools & jBPM Blog

Hi Kogito folks,
In the previous blogposts we demonstrated how to deploy a Kogito service together with the TrustyAI infrastructure on an OpenShift cluster https://blog.kie.org/2020/12/how-to-integrate-your-kogito-application-with-trustyai-part-1.html.
If you are new to TrustyAI, we suggest you read this introduction: https://blog.kie.org/2020/06/trusty-ai-introduction.html

In this blogpost, we’d like to demonstrate how to get started with TrustyAI in ~15 minutes. In order to start the demo, you will need the following applications installed on your laptop

git >= 2.27.0
docker >= 20.10.3
docker-compose >= 1.25.2
java >= 11
maven >= 3.6.3

Note that also previous versions of the applications might work, but they were not tested.

The first step is to clone our kogito-examples repository (if you haven’t it yet) with

git clone https://github.com/kiegroup/kogito-examples.git

and checkout the stable branch

cd kogito-examples
git checkout stable

and build a Kogito decision service with the tracing-addon and the monitoring-addon. For example kogito-examples/dmn-tracing-quarkus is already prepared, so you can compile and package it with

mvn clean package -DskipTests -f dmn-tracing-quarkus/pom.xml

and then copy the generated grafana dashboards to the docker-compose directory with

cp dmn-tracing-quarkus/target/classes/META-INF/resources/monitoring/dashboards/* trusty-demonstration/docker-compose/grafana/provisioning/dashboards/

and then build the docker image with

docker build -t org.kie.kogito/dmn-tracing-quarkus:1.0 dmn-tracing-quarkus/

In this example we tag the image org.kie.kogito/dmn-tracing-quarkus:1.0, but you can use another tag.

The second step is to run the Kogito service together with the TrustyAI infrastructure. In order to do that, change your current directory to kogito-examples/trusty-demontration/docker-compose .

With your preferred editor, edit the file docker-compose.yaml and replace the line 48 with the tag of the docker image you have just created (we used org.kie.kogito/dmn-tracing-quarkus:1.0 for example)

The final step is just about running the docker-compose script with (depending on your setup, you might need to run this command with sudo )

docker-compose up

The services are available at the following endpoints:

You can now open localhost:8080/swagger-ui and execute some POST requests to the LoanEligibility with the following payload

{
  "Bribe": 1000,
  "Client": {
    "age": 43,
    "existing payments": 100,
    "salary": 1950
  },
  "Loan": {
    "duration": 15,
    "installment": 180
  },
  "SupremeDirector": "Yes"
}

You should now see the executions in the AuditUI and the monitoring data in Grafana.

The post Getting started with TrustyAI in only 15 minutes appeared first on KIE Community.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/getting-started-with-trustyai-in-only-15-minutes/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×