Containerised Integration with Apache Camel August 2017Claus Ibsen @davsclaus .. or any kind of Java application
In 2002 at Aussie Rules
In 2002 on the top
In 2002 I walked 1 lap
In 2017 I ran 5 laps
Camel vs F1 Camel 2017 F1 2017 Lap Distance 5.3 km 5.3 km Best Lap Time 23m36s 1m26s Total Laps 5 57 Total Distance 26 km 307 km Total Time 2h3m 1h24m
Claus Ibsen • Senior Principal Software
 Engineer at Red Hat • Apache Camel
 8½ years working with Camel • Author of
 Camel in Action books @davsclaus davsclaus www.davsclaus.com cibsen@redhat.com
Key Message
Key Message
Key Message ?
Key Message ? ? or
Tip of Iceberg
Running Local
 OpenShift / Kubernetes • MiniShift • OpenShift CDK
 • MiniKube (Kubernetes)
Running Kubernetes Locally • Download MiniKube
 
 https://github.com/kubernetes/minikube • Install kubectl • Start MiniKube
 
 minikube start https://kubernetes.io/docs/tasks/tools/install-minikube/
Running OpenShift Locally • Download MiniShift
 
 https://github.com/minishift/minishift/releases • Start MiniShift
 
 minishift start https://www.openshift.org/minishift/
How I installed OpenShift locally
Build a Camel Demo Time
Source Code & Slides https://github.com/davsclaus/minishift-hello
Hello Service Hello Service Client
Hello Service Hello Service Swarm says hello from $HOSTNAME Client
Implementation Client Hello Service HTTP WildFy
 Swarm Spring Boot WildFly Swarm
Implementation Hello Service Client Hello Service HTTP
Implementation Client Hello Service HTTP from timer to http4 log from undertow transform helloservice
WildFly Swarm Generator
Hello Service
Hello Service
Spring Boot Starter
Client
How to build Docker Image? Maven Project Docker Image
Fabric8 Maven Plugin Maven Project Fabric8 Maven Plugin Docker Image build https://maven.fabric8.io
https://maven.fabric8.io Fabric8 Maven Plugin
Build Docker Image mvn fabric8:build OpenShift S2I Build
Our Demo Client Hello Service http://localhost:8080 from timer to http4 log from undertow transform helloservice
Static vs Dynamic Platform Client Hello Service from timer to http4 log from undertow transform helloservice Hardcoded hostname and port http://localhost:8080
Dynamic Platform Hello ServiceClient from timer to http4 log from undertow transform helloservice Expose as Kubernetes Service
Dynamic Platform Client helloservice pod pod Hello Service
Dynamic Platform Client helloservice pod helloservice pod pod Hello Service
Dynamic Platform Client helloservice pod helloservice pod Service pod Hello Service
Dynamic Platform Client helloservice pod helloservice pod Service IP:Port pod Hello Service Static
Dynamic Platform Client helloservice pod helloservice pod Service IP:Port pod Hello Service Static Dynamic Dynamic Dynamic
Kubernetes Service
 from user point of view service ip:port from timer to http4 log pod from undertow transform helloservice pod
Using Kubernetes Service Client from timer to http4 log We want to use hello service How do we do that?
Using Kubernetes Service • Environment Variables • Hostname • Port Client from timer to http4 log Service Discovery using DNS is also available
Service using ENV • {{service:name}} Client from timer to http4 log
Service using DNS • servicename:port Client from timer to http4 log
Ready to run in OpenShift Client Hello Service {{service:helloswarm}} from timer to http4 log from undertow transform helloservice
How to deploy to OpenShift? Maven Project
How to deploy to OpenShift? Maven Project fabric8 Maven Plugin deploy
Deploy - Hello Service • mvn fabric8:deploy Hello Service from undertow transform helloservice
Deploy - Client • mvn fabric8:deploy Client from timer to http4 log
Run - Client • mvn fabric8:run Client from timer to http4 log Runs in foreground, tail log, undeploys when ctrl + c
Ready to run in OpenShift
• Change deployment replicas Scaling
Scaling • Service load balancing Load balancing is random
Error Handling • Client Side Retry service ip:port from timer to http4 log pod from undertow transform helloservice pod service ip:port service ip:port service ip:port
Error Handling • Client Side Retry
Error Handling • Client Side Retry Figure by Christian Posta Thundering Herd Problem
Error Handling • Client Side Circuit Breaker with Hystrix
Error Handling • Client Side Circuit Breaker with Hystrix
Hystrix Dashboard Instructions in readme how to install and use
Hystrix Demo
Debugging • Debugging Pods mvn fabric8:debug
Remote Debug Port 5005
Remote Debug Breakpoint hit
• minishift openshift service helloswarm -n myproject Access Service from your computer Name of project (namespace)
Tip of Iceberg Figure by Bilgin Ibryam
Service Mesh http://philcalcado.com/2017/08/03/pattern_service_mesh.html
Service Mesh http://philcalcado.com/2017/08/03/pattern_service_mesh.html
Service Mesh Projects Istio
Upcoming Webinar
 August 17th https://developers.redhat.com/devnationlive
Free Books http://developers.redhat.com/promotions/microservices-for- java-developers/
Free Books https://www.openshift.com/promotions/for-developers.html
Free Books https://www.openshift.com/promotions/devops-with- openshift.html
Not so free Book coupon code: redhatcamel https://www.manning.com/books/ibsen2

Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservices in containers on Kubernetes