The so-called experts are saying microservices and containers will
change the way we build, maintain, operate, and integrate
applications. This talk is intended for Java developers who wants to hear and see how you can develop Java microservices that are ready to run in containers.
In this talk we will build a set of Java based Microservices that uses a mix of technologies with Apache Camel, Spring Boot and WildFly Swarm.
You will see how we can build small discrete microservices with these Java technologies and build and deploy on the Kubernets container platform.
We will discuss practices how to build distributed and fault tolerant microservices using technologies such as Kubernetes Services, Camel EIPs, and Netflixx Hysterix.
And the self healing and fault tolerant aspects of the Kubernetes platform is also discussed and demoed when we let the chaos monkeys loose killing containers.
This talk is a 50/50 mix between slides and demo.
The talk was presented at JDKIO on September 13th 2016.
2. Claus Ibsen
• Principal Software Engineer
at Red Hat
• Apache Camel
8 years working with Camel
• Author of
Camel in Action books
@davsclaus
davsclaus
davsclaus.com
10. Kubernetes
‣ Open Source orchestration platform for Docker
containers
• Rewrite of Google’s internal framework “Borg”
‣ Declarative specification of a desired state
‣ Self-healing
‣ Service discovery
‣ Scheduling across hosts
‣ Replication
12. Key Concepts
‣Nodes
• Worker machine (physical or VM) running pods
‣Pods
• Collection of one or more Docker containers
‣Replication Controller
• Creates and takes care of Pods
‣Services
• Network Proxy for a collection of Pods
‣Labels
• Grouping and organization of Objects
‣Namespaces
• Virtual clusters backend by same physical cluster
13. Pod
‣ Collection of Docker containers running on the same
host.
‣ Pods have unique IPs
‣ Containers in a Pod ….
• …. share the same IP address
• …. can reach each other via local ports
• …. can share data via volumes
‣ Pods can have one or more Labels
14. Replication Controller
‣ Controls Pods selected by Labels
‣ Ensures that a specified number of Pod replicas is
running
‣ Holds Pod templates for creating new Pods
‣ Autoscaling
‣ Rolling Updates
15. Service
‣ View on a set of Pods with single
IP address and port
‣ Pods are selected by Label
‣ Services are referenced by
environment variables
‣ Service addresses stay stable
• Pods come and go (with different IPs)
18. fabric8
‣ Opinionated microservices platform based on
Docker, Kubernetes and Jenkins
• Management: console, logging, metrics, dashboards, …
• Continuous Delivery Pipeline
• iPaaS: Camel route visualization, API registry, Messaging as
a Service, …
• Tools: Kubernetes/OpenShift build integration, Kubernetes
component test support, CDI extensions
• Quickstarts: Ready to use examples, also available as
Maven archetypes
50. Using Kubernetes
Service
• Environment Variables
• Hostname
• Port
Client
from timer
to http
log
Service Discovery using DNS is available
in newer versions of Kubernetes.