Skip to content

Demo showing how to orchestrate and aggregate two microservices exposing them using 3Scale

Notifications You must be signed in to change notification settings

hodrigohamalho/3scale-composition-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3Scale Composition Custom Policy

5 8 2021 17 59 53 PM

This demo shows how to create a custo policy in Red Hat 3Scale using Camel-K.

Basically we have one microservices that shows data of a person and the second one shows data of a bank account. Those are independent microservices and the policy do the composition between those microservices and return the data from a person with their respective bank accounts.

Also it tooks a copy of that message and send to the topic auditoria in Kafka.

Pre requisites

  • VSCode Extension Pack for Apache Camel by Red Hat

  • OpenShift 4.x (tested on 4.8)

Demo

Create Kubernetes namespace

5 8 2021 18 04 21 PM
5 8 2021 18 06 18 PM

Microservices deploy

Person microservice

5 8 2021 18 07 42 PM

5 8 2021 18 10 02 PM
5 8 2021 18 11 05 PM
5 8 2021 18 19 00 PM
5 8 2021 18 19 38 PM

Access the swagger-ui, make sure to correct replace for the route address.

http://person-demo.apps.cluster-5f88.5f88.sandbox1482.opentlc.com/swagger-ui/

Account microservice

5 8 2021 18 07 42 PM

5 8 2021 18 21 21 PM

5 8 2021 18 22 08 PM

5 8 2021 18 26 18 PM
5 8 2021 18 26 57 PM

Access the swagger-ui, make sure to correct replace for the route address.

http://account-demo.apps.cluster-5f88.5f88.sandbox1482.opentlc.com/swagger-u

Kafka Deploy

Install the operator

amq streams broker operator 01

Install the broker

amq streams broker deploy 01
amq streams broker deploy 02
amq streams broker deploy 03
amq streams broker deploy 04

Create the auditoria topic

amq streams create topic 01
amq streams create topic 02
amq streams create topic 03
amq streams create topic 04

Camel K Deploy

Download and install the camel-k binary https://camel.apache.org/download/#camel-k

Install the Camel-k Operator in the demo project

camel k operator install 01
camel k operator install 02
camel k operator install 03
camel k operator install 04

Deploy the route

kamel run camel-k/Composition.java

About

Demo showing how to orchestrate and aggregate two microservices exposing them using 3Scale

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 51.2%
  • Java 48.8%