Red Hat Microservices Architecture Day - New York, November 2015. Presented by Claus Ibsen.
Apache Camel is a very popular integration library that works very well with microservice architecture. This talk introduces you to Apache Camel and how you can easily get started with Camel on your computer. Then we cover how to create new Camel projects from scratch as microservices, which you can boot using Camel or Spring Boot, or other micro containers such as Jetty or fat JARs. We then take a look at what options you have for monitoring and managing your Camel microservices using tooling such as Jolokia, and hawtio web console.
3. Your Speaker
● Principal Software Engineer at Red Hat
● Apache Camel
● 7 years working with Camel
● Author of Camel in Action books
● Contact
● E-mail: cibsen@redhat.com
● Twitter: @davsclaus
● Blog: http://davsclaus.com
60. Demo - Hello Service
Hello Service
Hi I am New York. Hello Claus how are you today?
name=Claus
61. Demo - Hello Service
Java Standalone Apache Tomcat
HTTP
Hello Service
62. Demo - Hello Service
Java Standalone Apache Tomcat
HTTP
from timer
to http
to log
from servlet
transform
Hello Service
63. Demo - Create the Camel Projects
Java Standalone Apache Tomcat
HTTP
from timer
to http
to log
from servlet
transform
Hello Service
camel-archetype-cdi camel-archetype-web
64. Demo - Create the Camel Projects
● Using Command Shell
● From Eclipse
65. Demo - Create the Camel Projects
● camel-archetype-web
Ready to use
out of the box
66. Demo - Create the Camel Projects
● camel-archetype-cdi
Not ready
We need to change
he code
67. Demo - Create the Camel Projects
● add netty4-http endpoint
CMD + ALT
4
69. Demo - Create the Camel Projects
● change route to call netty
70. Demo - Create the Camel Projects
● change bean to return a name
71. Demo - Overview
● camel-archetype-cdi camel-archetype-web
Java Standalone Apache Tomcat
HTTP 8080
from timer
to http
to log
from http
transform
We are ready to run standalone
83. What is a Kubernetes Service
● Network Connection to one or more Pods
● Own fixed IP address and port
http://fabric8.io/guide/services.html
http://kubernetes.io/v1.1/docs/user-guide/services.html
84. What is a Kubernetes Service
● kube-proxy on client
http://fabric8.io/guide/services.html
http://kubernetes.io/v1.1/docs/user-guide/services.html
Java Standalone Apache Tomcat
from timer
to http
to log
from servlet
transform
kube-proxy
Kubernetes
Master
service
changes
Service
enlist
86. Define Kubernetes Service
● Defined in pom.xml in <properties>
Apache Tomcat
from servlet
transform
Service
Container Port = Inside Docker Container
(e.g. the port of Apache Tomcat)
Service Port = Outside
Consumers of Service to use
Name of service
88. Use Kubernetes Services
Java Standalone
from timer
to http
to log
● Environment Variables
● Hostname
● Port
Injected by Kubernetes
when starting a pod
89. Camel - Use Kubernetes Service
● Use {{service:name}} in Camel
Java Standalone
from timer
to http
to log
90. Microservice Demo - Ready for launch!
● camel-archetype-cdi camel-archetype-web
Java Standalone Apache Tomcat
from timer
to http
to log
from http
transform
Service
Service defined
Ready to deploy to Kubernetes
91. Deploy - myweb
● mvn -Pf8-local-deploy
Apache Tomcat
from http
transform
Service
100. Agenda
● What is Apache Camel?
● Camel Microservices
● Demo
● Hello Service
● Create the Camel projects
● Docker
● OpenShift v3
● More Information
101. More information
● Apache Camel Microservices
● http://camel.apache.org/camel-boot
● Fabric8
● http://fabric8.io
● chat room #fabric8 on freenode
● Medium Fabric8 (blogs and videos)
● https://medium.com/fabric8-io