Apache Camel & The Art of Entreprise Integration

Post on 12-Jan-2017

226 views 1 download

Transcript of Apache Camel & The Art of Entreprise Integration

Apache Camel & l’Art de l'intégration

Abdellatif BOUCHAMA

@a_bouchama

#ApacheCamel #microservices

@a_bouchama#ApacheCamel #microservices

Abdellatif BOUCHAMASenior Middleware Engineer

I work at Red Hat on Open Source Integration technology.

ContactTwitter: @a_bouchamaLinkedin: https://fr.linkedin.com/in/abouchamaBlog: http://bushorn.com/author/a_bouchama/

@a_bouchama#ApacheCamel #microservices

AGENDAEIP : Entreprise Integration Patterns

Faire connaissance à Apache Camel ?

Mon Aventure avec Camel:

Défi #Microservices : Spring-boot, Docker & OpenShift / KubernetesDéfi #DevOps : CI/CD

@a_bouchama#ApacheCamel #microservices

EIPEntreprise Integration Patterns

@a_bouchama#ApacheCamel #microservices

EIPEssentiel Integration Patterns

Conclusion

@a_bouchama#ApacheCamel #microservices

Apache Camel est un framework d’intégration open source

qui fournit la mise en œuvre des EIP.

@a_bouchama#ApacheCamel #microservices

Pourquoi utiliser Apache Camel ?

❏ Routage et médiation

❏ EIP (Entreprise Integration patterns)

❏ Domain-spécific language (DSL)

❏ Libraries extensibles

❏ Architecture modulaire

❏ Conversion automatique de typesTrés léger

GrandeCommunauté

Testable

Facilement Configurable

@a_bouchama#ApacheCamel #microservices

Apache Camel

Extrait de Camel In Action 2nd Edition

Composants

@a_bouchama#ApacheCamel #microservices

Apache Camel

Camel XML<route><from uri="activemq:queue:newOrder"/><choice><when><xpath>/order/product = widget</xpath><to uri="activemq:queue:widget"/></when><otherwise><to uri="activemq:queue:gadget"/></otherwise></choice></route>

Configuration

Camel Java DSLimport org.apache.camel.builder.RouteBuilder;public class MyRoute extends RouteBuilder

{public void configure() throws Exception {

from("activemq:queue:newOrder").choice().when(xpath("/order/product = widget")).to("activemq:queue:widget").otherwise().to("activemq:queue:gadget").end();}

}

@a_bouchama#ApacheCamel #microservices

Apache CamelExemple

</route>

<from uri="timer:foo?period=5000"/>

<choice>

</choice>

<transform> <method ref="myTransformer"/> </transform>

</otherwise>

<otherwise>

<when> <simple>${body} > 500</simple>

</when><log message="High priority message : ${body}"/>

<log message="Low priority message : ${body}"/>

<route id="cbr-route">

@a_bouchama#ApacheCamel #microservices

Mon Aventure avec Camel

@a_bouchama#ApacheCamel #microservices

Parler #microservices c’est bien, en faire c’est mieux

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: Spring Boot

●Déploiement simple: jar “self-contained”●Cloud ready●Démarrage ultra rapide●Une configuration par défault d’un certain nombre de paramétres via application.properties

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: Spring Boot

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: Docker

●Isolation de l’environnement d’exécution d’un service●Déploiement rapide et sans couture●Portabilité et de la scalabilité●Compatibilité avec des solutions d’hébergement dans un Cloud privé, public ou hybride

@a_bouchama#ApacheCamel #microservices

let's develop #microservices faster and have fun!

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservice: Docker

fabric8:build

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: OpenShift / Kubernetes

@a_bouchama#ApacheCamel #microservices

OpenShift ?

Bro, I’m lost with my all Docker containers ?

You need certainly Kubernetes, this will help you to orchestrate the lifecycle of your containers, ...

What ? again a new thing, and what about managing my applications (Build, develop, deployment. scale...) with this thing.

Sorry, new thing again: you need OpenShift

@a_bouchama#ApacheCamel #microservices

OpenShift: How it works?

@a_bouchama#ApacheCamel #microservices

Apache CamelMicroservices: OpenShift / Kubernetes

fabric8:build

fabric8:deploy

fabric8:log

fabric8:start

fabric8:debug

MasterNode

API / Authentication

Data Store

Scheduler

Management/Replication

PodPod

fabric8:stop

@a_bouchama#ApacheCamel #microservices

#DevOps à portée de main

@a_bouchama#ApacheCamel #microservices

@a_bouchama#ApacheCamel #microservices

Apache Camel#DevOps (CI /CD) Workflow

Automated Workflow

Testing Staging Production

fabric8:importDocker

Registry

@a_bouchama#ApacheCamel #microservices

Notre voyage avec Camel

DevOps microservices

@a_bouchama#ApacheCamel #microservices

http://developers.redhat.comdevelopers.redhat.com

Questions ?

#ApacheCamel #microservices

Thank youAbdellatif BOUCHAMA@a_bouchama

#ApacheCamel #microservices