SlideShare a Scribd company logo
1 of 62
Download to read offline
Apache Camel K
A cloud-native integration platform
Who we are...
Andrea Tarocchi:
● Open source enthusiast
● Apache Camel committer
● Software Engineer at Red Hat
● Twitter: @valdar
● Blog: http://blog.valdar.it/
Nicola Ferraro
● Open source enthusiast
● Apache Camel PMC Member
● Principal Software Engineer at Red Hat
● Twitter: @ni_ferraro
● Blog: https://www.nicolaferraro.me
Agenda
● What is Apache Camel K
● Kubernetes Basics
● Camel K Operator
● DEMO
● Camel K anatomy
● Status & future work
Apache Camel K
What is Apache Camel?
● The swiss knife of integration
● >10 years of development - still one of the most active Apache projects
● Java-based integration framework that can be installed on multiple runtimes:
Spring-Boot, Karaf, EAP, Standalone (in a Java Main)
● Based on Enterprise Integration Patterns
● Supports 300+ components
● Uses a powerful DSL
● Can integrate anything
This is just to recap…
We assume you already
know Camel!
What is Apache Camel K?
● A platform for directly running integrations on Openshift and
Kubernetes
● Based on (ex Core OS) operator-sdk
● A community-driven project
● A subproject of Apache Camel started on August 31st, 2018
https://github.com/apache/camel-k
How?
// Message from a bot transformed and ingested into a kafka
topic, then sent to an API
from(“telegram:bots/bot-id”)
.transform()...
.to(“kafka:topic”)
from(“kafka:topic”)
.to(“http:my-host/api/path”)
1. Create a integration file (Java, Groovy, Kotlin, JS, XML…)
$ kamel run integration.groovy
2. Run it
3. It runs on Kubernetes
Camel DSL, based on
EIPs...
Well… the “kamel” CLI is
optional!
Kubernetes Basics
Kubernetes Basics (Intro)
De-facto standard for container orchestration.
Deployment
Pod
Container
Sidecar
Containers
replicas=n
Service
User
View
Kubernetes Basics (Intro)
De-facto standard for container orchestration.
Deployment
Pod
Container
Sidecar
Containers
replicas=n
Abstracts
Physical
Machines
Load
Balancers
Service
User
View
Physical
View
Kubernetes Custom Resources
Extension mechanism: custom resource definition.
YourOwnResource
<<Deployme
nt>>
Operator
1. Observe
2. Evaluate
3. Reconcile
Higher-level resources
User
View
Kubernetes Custom Resources
Extension mechanism: custom resource definition.
YourOwnResource
<<Deployme
nt>>
Operator
1. Observe
2. Evaluate
3. Reconcile
Higher-level resources
User
View
Deployment
Pod
Servic
e
Kubernetes-level resources
Kubernetes Custom Resources
Extension mechanism: custom resource definition.
YourOwnResource
<<Deployme
nt>>
Operator
1. Observe
2. Evaluate
3. Reconcile
Higher-level resources
User
View
Deployment
Pod
Servic
e
Kubernetes-level resources Physical resources
Abstracts
Camel K Operator
Architecture
Dev Environment Cloud
kamel CLI
Camel K
Operator
“Integration”
Custom
Resource
Running
Pod
Live
updates!
Fast redeploy!
Less than 1 second!
Tailored for cloud-native development experience
“Integration” Custom Resource
kind: Integration
apiVersion: camel.apache.org/v1alpha1
metadata:
name: my-integration
spec:
sources:
- name: source.groovy
content: |-
from(“telegram:...”)
.transform()...
.to(“kafka:...”)
from(“telegram:bots/bot-id”)
.transform()...
.to(“kafka:topic”);
from(“kafka:topic”)
.to(“http:my-host/api/path”);
This is what people
care about: Camel DSL
Camel K Operator
1. Choose a runtime
2. Scaffold a project
3. Add boilerplate
4. Add dependencies
5. Create container image
6. Create Kubernetes
resources for deployment
kamel CLI
or others ...
Cloud
Camel K
Operator
“Integration”
Custom
Resource
Running
Pod
Alternative clients
Camel
DSL
“kamel” CLI
Camel
DSL
Console
or CLI
Camel
DSL
Apps...
No matter who creates the integration, it behaves the same...
Classic scenario:
“When someone uploads a file on Dropbox, I want to upload that file also to a FTP location, publish some file details on a Slack channel and
also send a confirmation email to a specific user”
Our web-based integration platform (Syndesis).
Target: Citizen Integrators
Features:
● Multiple connectors built from Camel
components
● Few clicks to define a integration
● Graphical data mapping capabilities
● Design, expose or consume REST API
● Integrated with Apicur.io “Apicurito” for API
design
● Integrated with 3-scale for API management
Demo
Demo: chatbot
Let’s build a Telegram Chat Bot in few minutes. You’ll need shortly on
your phone:
- Telegram App
- A QR Code reader
Video
Demo: chatbot
Let’s build a Telegram Chat Bot in few minutes.
@camelkbot
Code here: https://github.com/nicolaferraro/camel-k-chuck-bot
Camel K anatomy
What happens under the hood
Operator
25
An operator is "traditionally" defined as software that
encodes a domain knowledge and extends Kubernetes
API through extensions Custom Resource Definition
(CRD) enabling users to create, deploying and manage
Kubernetes applications.
In Camel K we have leveraged this pattern to the next
level and the Camel K Operator is the intelligence that
coordinates all the moving parts:
- It adapts the behavior of the platform to the
environment in which it runs
- It understands the integration code and handles
the workflow to determine dependencies, to build
and deploying your application
- It scaffolds reusable resources
Operator Pattern
26
The Operator:
- Create a WATCH on CR Objects
- Evaluate difference of the current state
versus the desired state
- Act
Observe
Evaluate
Reconcile
Hierarchical Operator Pattern*
27
Camel K defines 3 main API:
- Integration
- IntegrationKit
- Build
To manage the interactions between them, a
simple reconcile method was not enough and
we ended up with a sort of “Hierarchical
Operator Pattern” where the reconcile phase
may trigger sub operators and supervises them.
Integration
Evaluate
Reconcile
Integration
Kit
Evaluate
Reconcile
* Patent pending :)
Integration State Machine
28
Evaluate
Run
Deploy
Build
Integration State Machine
29
The Evaluate phase has the following
responsibilities:
- pre-flight checks
- enrich the integration with defaults values
if not provided by the user
- configure the integration according to the
target platform/environment
- monitor the integration for changes once
it is in its running phase
Evaluate
Run
Deploy
Build
Integration State Machine
30
The Build phase has the following
responsibilities:
- instantiates an integration kit sub
operator and monitor it
- assemble a container image with the
dependencies required by the integration
- publish the integration to a container
image registryRun
Deploy
Build
Evaluate
Assemble
Publish
Integration Kit
Evaluate
Integration State Machine
31
The Deploy phase owns the following
responsibilities:
- generates deployment resources
according to the platform i.e. :
- deployment
- knative
service/channel/subscription
- service
- ingress/route
- attach sources and resources to the pod
using configmap/secret volume mount
Run Build
Deploy
Evaluate
Integration State Machine
32
The Run phase is owned by k8s :-)
Build
Evaluate
Deploy
Run
from(“netty4-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.to(“knative:channel/words”)
33
Code driven
from(“netty4-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.to(“knative:channel/words”)
34
● dependencies
Code driven
from(“netty4-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.to(“knative:channel/words”)
35
● Dependencies
● Sources and targets
Code driven
from(“netty4-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.to(“knative:channel/words”)
36
● Dependencies
● Sources and targets
● Your business logic
Code driven
service
ingress
channel
image
Optimizations: Integration State Machine
37
Evaluate
Run
Deploy
Build
If an IntegrationKit that satisfies the
requirement of an integration exists, the
evaluation phase can move the integration to
the deploy phase.
38
from(“netty4-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.to(“knative:channel/words”)
Optimizations: Incremental image builder
91e54dfb1179 ADD camel-netty4-http
d74508fb5532 ADD camel-knative
fabric8:s2i-java-8
ik-ab34df5462
from(“netty4-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.pollEnrich(“http4://service”)
.to(“knative:channel/words”)
d74508fb5532 ADD camel-http4
ictx-ab34df5462
ik-cxfr345d
Traits
39
Traits are high level named features of Camel K
that can be enabled/disabled or configured to
customize the behavior of the final integration.
40
kamel run --trait route.enabled=true
Camel K provide sensible defaults for all the
traits, taking into account the integration code
and the details of the target platform where the
integration is going to run into.
In some case user need to provide some hints to
the operator in order to make it working
properly i.e. the operator cannot determine if a
service need to be exposed, for such case you
need to manually enable the route trait:
Traits
Runtimes
41
● Java Main
● Quarkus (in progress)
● What future will hold...
Runtimes - Goals
● set up routes
● set up properties
● set up logging
● set up context
42
Runtimes - Languages
43
Language Technology Notes Native
Java jOOR Compile at runtime Maybe
Groovy GroovyScript
Engine
No
Kotlin Kotlin Script
Runtime
Maybe
JavaScript Graal JS Yes
XML Jaxb Support for route fragments only Yes
YAML Jackson
YAML
Huge hack Yes
Status &
Future Work
Tomorrow session camel k + knative:
Apache Camel K: connect your Knative
serverless applications with everything else
Thursday, 12th Sep, 09:00 - 09:50
Laughlin 2 (this very same room!)
Future Work
● BDD testing
● Support the new Knative Eventing Broker/Trigger model
● Better support Quarkus (https://github.com/apache/camel-quarkus)
● Integrate with Tekton pipelines
● Enable webhook-based components available in Camel 3
(https://github.com/apache/camel/blob/master/components/camel-telegr
am/src/main/docs/telegram-component.adoc#webhook-mode)
We love contributions!
● Project repo: https://github.com/apache/camel-k
● list of tasks to start from
(pick anyone with “easy fix - newcomers” label on them)
Questions?
Bytheway, what is Apache
Camel?
Camel K
● The swiss knife of integration
● >10 years of development - still one of the most active Apache projects
● Java-based integration framework that can be installed on multiple runtimes:
Spring-Boot, Karaf, EAP, Standalone
● The cornerstone of Red Hat Fuse
● Based on Enterprise Integration Patterns
● Supports 300+ components
● Uses a powerful DSL
● Can integrate anything
http://camel.apache.org/
What is Apache Camel?
50
Camel K
System Integration
System A System B
Camel is the glue between disparate Systems.
Transport A Transport B
Camel K
Integration Framework
Camel K
Enterprise Integration Patterns
Camel K
Enterprise Integration Patterns
Camel K
Camel Routes
from("file:data/inbox")
.to("jms:queue:order");
<route>
<from uri="file:data/inbox"/>
<to uri="jms:queue:order"/>
</route>
Java DSL
XML DSL
Camel K
Camel Routes with Splitter
Camel K
Camel Routes with Splitter
from("file:inbox")
Camel K
Camel Routes with Splitter
from("file:inbox")
.split(body().tokenize("n"))
Camel K
Camel Routes with Splitter
from("file:inbox")
.split(body().tokenize("n"))
.marshal(customToXml)
.to("activemq:line"); Custom data
transformation
300+ Components
ahc ahc-ws amqp apns as2 asn1 asterisk atmos atmosphere-websocket atom atomix avro aws aws-xray azure bam barcode base64
beanio beanstalk bean-validator bindy blueprint bonita boon box braintree cache caffeine cassandraql castor cdi chronicle chunk cmis
cm-sms coap cometd consul context corda core-osgi core-xml couchbase couchdb crypto crypto-cms csv cxf cxf-transport
digitalocean disruptor dns docker dozer drill dropbox eclipse ehcache ejb elasticsearch elasticsearch5 elasticsearch-rest elsql etcd
eventadmin exec facebook fastjson fhir flatpack flink fop freemarker ftp ganglia geocoder git github google-bigquery google-calendar
google-drive google-mail google-pubsub google-sheets gora grape groovy groovy-dsl grpc gson guava-eventbus guice hawtdb
hazelcast hbase hdfs hdfs2 headersmap hessian hipchat hl7 http http4 http-common hystrix ibatis ical iec60870 ignite infinispan
influxdb ipfs irc ironmq jackson jacksonxml jasypt javaspace jaxb jbpm jcache jclouds jcr jdbc jetty jetty9 jetty-common jgroups jibx
jing jira jms jmx johnzon jolt josql jpa jsch jsonpath json-validator jt400 juel jxpath kafka kestrel krati kubernetes kura ldap ldif leveldb
linkedin lra lucene lumberjack lzf mail master metrics micrometer milo mina mina2 mllp mongodb mongodb3 mongodb-gridfs mqtt
msv mustache mvel mybatis nagios nats netty netty4 netty4-http netty-http nsq ognl olingo2 olingo4 openshift openstack opentracing
optaplanner paho paxlogging pdf pgevent printer protobuf pubnub quartz quartz2 quickfix rabbitmq reactive-streams reactor restlet
rest-swagger ribbon rmi routebox rss ruby rx rxjava2 salesforce sap-netweaver saxon scala schematron scr script service servicenow
servlet servletlistener shiro sip sjms sjms2 slack smpp snakeyaml snmp soap solr spark spark-rest splunk spring spring-batch
spring-boot spring-cloud spring-cloud-consul spring-cloud-netflix spring-cloud-zookeeper spring-integration spring-javaconfig
spring-ldap spring-redis spring-security spring-ws sql ssh stax stomp stream stringtemplate swagger swagger-java syslog tagsoup
tarfile telegram test test-blueprint test-cdi testcontainers testcontainers-spring test-karaf testng test-spring thrift tika twilio twitter
undertow univocity-parsers urlrewrite velocity vertx weather web3j websocket wordpress xchange xmlbeans xmljson xmlrpc
xmlsecurity xmpp xstream yammer yql zendesk zipfile zipkin zookeeper zookeeper-master
Camel K
+
+
+
=
Camel K
Runs on popular Java Runtimes

More Related Content

What's hot

Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Claus Ibsen
 
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
confluent
 

What's hot (20)

Building flexible ETL pipelines with Apache Camel on Quarkus
Building flexible ETL pipelines with Apache Camel on QuarkusBuilding flexible ETL pipelines with Apache Camel on Quarkus
Building flexible ETL pipelines with Apache Camel on Quarkus
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationSouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
 
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
JEEConf 2018 - Camel microservices with Spring Boot and KubernetesJEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
JEEConf 2018 - Camel microservices with Spring Boot and Kubernetes
 
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
 
Integrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and CamelIntegrating systems in the age of Quarkus and Camel
Integrating systems in the age of Quarkus and Camel
 
The forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for youThe forgotten route: Making Apache Camel work for you
The forgotten route: Making Apache Camel work for you
 
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
Meetup Melbourne August 2017 - Agile Integration with Apache Camel microservi...
 
Apache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the boxApache Camel Introduction & What's in the box
Apache Camel Introduction & What's in the box
 
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
 
What's new with Apache Camel 3? | DevNation Tech Talk
What's new with Apache Camel 3? | DevNation Tech TalkWhat's new with Apache Camel 3? | DevNation Tech Talk
What's new with Apache Camel 3? | DevNation Tech Talk
 
MuleSoft Manchester Meetup #3 slides 31st March 2020
MuleSoft Manchester Meetup #3 slides 31st March 2020MuleSoft Manchester Meetup #3 slides 31st March 2020
MuleSoft Manchester Meetup #3 slides 31st March 2020
 
Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov,...
Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov,...Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov,...
Kafka on Kubernetes: Does it really have to be "The Hard Way"? (Viktor Gamov,...
 
JavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless ArchtiecturesJavaDay Lviv: Serverless Archtiectures
JavaDay Lviv: Serverless Archtiectures
 
Javaeeconf 2016 how to cook apache kafka with camel and spring boot
Javaeeconf 2016 how to cook apache kafka with camel and spring bootJavaeeconf 2016 how to cook apache kafka with camel and spring boot
Javaeeconf 2016 how to cook apache kafka with camel and spring boot
 
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
Streaming Design Patterns Using Alpakka Kafka Connector (Sean Glover, Lightbe...
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Moving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to MicroservicesMoving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to Microservices
 
Crafting Kubernetes Operators
Crafting Kubernetes OperatorsCrafting Kubernetes Operators
Crafting Kubernetes Operators
 
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
Kafka on Kubernetes: Keeping It Simple (Nikki Thean, Etsy) Kafka Summit SF 2019
 
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
TDC2017 | São Paulo - Trilha Containers How we figured out we had a SRE team ...
 

Similar to ApacheCon NA - Apache Camel K: a cloud-native integration platform

Similar to ApacheCon NA - Apache Camel K: a cloud-native integration platform (20)

Camel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KCamel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel K
 
Running Apache Spark Jobs Using Kubernetes
Running Apache Spark Jobs Using KubernetesRunning Apache Spark Jobs Using Kubernetes
Running Apache Spark Jobs Using Kubernetes
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
 
Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & Kubernetes
 
Building APIs with Mule and Spring Boot
Building APIs with Mule and Spring BootBuilding APIs with Mule and Spring Boot
Building APIs with Mule and Spring Boot
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
 
Kubernetes Java Operator
Kubernetes Java OperatorKubernetes Java Operator
Kubernetes Java Operator
 
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 2
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 2MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 2
MuleSoft Meetup Roma - Runtime Fabric Series (From Zero to Hero) - Sessione 2
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
The automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm chartsThe automation challenge Kubernetes operators vs Helm charts
The automation challenge Kubernetes operators vs Helm charts
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 
What's new for Apache Flink's Table & SQL APIs?
What's new for Apache Flink's Table & SQL APIs?What's new for Apache Flink's Table & SQL APIs?
What's new for Apache Flink's Table & SQL APIs?
 
Toronto MuleSoft_Meetup_Run Time Fabric - Self Managed Kubernetes.pptx
Toronto MuleSoft_Meetup_Run Time Fabric - Self Managed Kubernetes.pptxToronto MuleSoft_Meetup_Run Time Fabric - Self Managed Kubernetes.pptx
Toronto MuleSoft_Meetup_Run Time Fabric - Self Managed Kubernetes.pptx
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
Hybrid Cloud, Kubeflow and Tensorflow Extended [TFX]
 

Recently uploaded

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

ApacheCon NA - Apache Camel K: a cloud-native integration platform

  • 1. Apache Camel K A cloud-native integration platform
  • 2. Who we are... Andrea Tarocchi: ● Open source enthusiast ● Apache Camel committer ● Software Engineer at Red Hat ● Twitter: @valdar ● Blog: http://blog.valdar.it/ Nicola Ferraro ● Open source enthusiast ● Apache Camel PMC Member ● Principal Software Engineer at Red Hat ● Twitter: @ni_ferraro ● Blog: https://www.nicolaferraro.me
  • 3. Agenda ● What is Apache Camel K ● Kubernetes Basics ● Camel K Operator ● DEMO ● Camel K anatomy ● Status & future work
  • 5. What is Apache Camel? ● The swiss knife of integration ● >10 years of development - still one of the most active Apache projects ● Java-based integration framework that can be installed on multiple runtimes: Spring-Boot, Karaf, EAP, Standalone (in a Java Main) ● Based on Enterprise Integration Patterns ● Supports 300+ components ● Uses a powerful DSL ● Can integrate anything This is just to recap… We assume you already know Camel!
  • 6. What is Apache Camel K? ● A platform for directly running integrations on Openshift and Kubernetes ● Based on (ex Core OS) operator-sdk ● A community-driven project ● A subproject of Apache Camel started on August 31st, 2018 https://github.com/apache/camel-k
  • 7. How? // Message from a bot transformed and ingested into a kafka topic, then sent to an API from(“telegram:bots/bot-id”) .transform()... .to(“kafka:topic”) from(“kafka:topic”) .to(“http:my-host/api/path”) 1. Create a integration file (Java, Groovy, Kotlin, JS, XML…) $ kamel run integration.groovy 2. Run it 3. It runs on Kubernetes Camel DSL, based on EIPs... Well… the “kamel” CLI is optional!
  • 9. Kubernetes Basics (Intro) De-facto standard for container orchestration. Deployment Pod Container Sidecar Containers replicas=n Service User View
  • 10. Kubernetes Basics (Intro) De-facto standard for container orchestration. Deployment Pod Container Sidecar Containers replicas=n Abstracts Physical Machines Load Balancers Service User View Physical View
  • 11. Kubernetes Custom Resources Extension mechanism: custom resource definition. YourOwnResource <<Deployme nt>> Operator 1. Observe 2. Evaluate 3. Reconcile Higher-level resources User View
  • 12. Kubernetes Custom Resources Extension mechanism: custom resource definition. YourOwnResource <<Deployme nt>> Operator 1. Observe 2. Evaluate 3. Reconcile Higher-level resources User View Deployment Pod Servic e Kubernetes-level resources
  • 13. Kubernetes Custom Resources Extension mechanism: custom resource definition. YourOwnResource <<Deployme nt>> Operator 1. Observe 2. Evaluate 3. Reconcile Higher-level resources User View Deployment Pod Servic e Kubernetes-level resources Physical resources Abstracts
  • 15. Architecture Dev Environment Cloud kamel CLI Camel K Operator “Integration” Custom Resource Running Pod Live updates! Fast redeploy! Less than 1 second! Tailored for cloud-native development experience
  • 16. “Integration” Custom Resource kind: Integration apiVersion: camel.apache.org/v1alpha1 metadata: name: my-integration spec: sources: - name: source.groovy content: |- from(“telegram:...”) .transform()... .to(“kafka:...”) from(“telegram:bots/bot-id”) .transform()... .to(“kafka:topic”); from(“kafka:topic”) .to(“http:my-host/api/path”); This is what people care about: Camel DSL Camel K Operator 1. Choose a runtime 2. Scaffold a project 3. Add boilerplate 4. Add dependencies 5. Create container image 6. Create Kubernetes resources for deployment kamel CLI or others ...
  • 17. Cloud Camel K Operator “Integration” Custom Resource Running Pod Alternative clients Camel DSL “kamel” CLI Camel DSL Console or CLI Camel DSL Apps... No matter who creates the integration, it behaves the same...
  • 18. Classic scenario: “When someone uploads a file on Dropbox, I want to upload that file also to a FTP location, publish some file details on a Slack channel and also send a confirmation email to a specific user” Our web-based integration platform (Syndesis). Target: Citizen Integrators Features: ● Multiple connectors built from Camel components ● Few clicks to define a integration ● Graphical data mapping capabilities ● Design, expose or consume REST API ● Integrated with Apicur.io “Apicurito” for API design ● Integrated with 3-scale for API management
  • 19. Demo
  • 20. Demo: chatbot Let’s build a Telegram Chat Bot in few minutes. You’ll need shortly on your phone: - Telegram App - A QR Code reader
  • 21. Video
  • 22. Demo: chatbot Let’s build a Telegram Chat Bot in few minutes. @camelkbot Code here: https://github.com/nicolaferraro/camel-k-chuck-bot
  • 24. What happens under the hood
  • 25. Operator 25 An operator is "traditionally" defined as software that encodes a domain knowledge and extends Kubernetes API through extensions Custom Resource Definition (CRD) enabling users to create, deploying and manage Kubernetes applications. In Camel K we have leveraged this pattern to the next level and the Camel K Operator is the intelligence that coordinates all the moving parts: - It adapts the behavior of the platform to the environment in which it runs - It understands the integration code and handles the workflow to determine dependencies, to build and deploying your application - It scaffolds reusable resources
  • 26. Operator Pattern 26 The Operator: - Create a WATCH on CR Objects - Evaluate difference of the current state versus the desired state - Act Observe Evaluate Reconcile
  • 27. Hierarchical Operator Pattern* 27 Camel K defines 3 main API: - Integration - IntegrationKit - Build To manage the interactions between them, a simple reconcile method was not enough and we ended up with a sort of “Hierarchical Operator Pattern” where the reconcile phase may trigger sub operators and supervises them. Integration Evaluate Reconcile Integration Kit Evaluate Reconcile * Patent pending :)
  • 29. Integration State Machine 29 The Evaluate phase has the following responsibilities: - pre-flight checks - enrich the integration with defaults values if not provided by the user - configure the integration according to the target platform/environment - monitor the integration for changes once it is in its running phase Evaluate Run Deploy Build
  • 30. Integration State Machine 30 The Build phase has the following responsibilities: - instantiates an integration kit sub operator and monitor it - assemble a container image with the dependencies required by the integration - publish the integration to a container image registryRun Deploy Build Evaluate Assemble Publish Integration Kit Evaluate
  • 31. Integration State Machine 31 The Deploy phase owns the following responsibilities: - generates deployment resources according to the platform i.e. : - deployment - knative service/channel/subscription - service - ingress/route - attach sources and resources to the pod using configmap/secret volume mount Run Build Deploy Evaluate
  • 32. Integration State Machine 32 The Run phase is owned by k8s :-) Build Evaluate Deploy Run
  • 36. from(“netty4-http://0.0.0.0:8080”) .process(new YourBusinessLogic()) .to(“knative:channel/words”) 36 ● Dependencies ● Sources and targets ● Your business logic Code driven service ingress channel image
  • 37. Optimizations: Integration State Machine 37 Evaluate Run Deploy Build If an IntegrationKit that satisfies the requirement of an integration exists, the evaluation phase can move the integration to the deploy phase.
  • 38. 38 from(“netty4-http://0.0.0.0:8080”) .process(new YourBusinessLogic()) .to(“knative:channel/words”) Optimizations: Incremental image builder 91e54dfb1179 ADD camel-netty4-http d74508fb5532 ADD camel-knative fabric8:s2i-java-8 ik-ab34df5462 from(“netty4-http://0.0.0.0:8080”) .process(new YourBusinessLogic()) .pollEnrich(“http4://service”) .to(“knative:channel/words”) d74508fb5532 ADD camel-http4 ictx-ab34df5462 ik-cxfr345d
  • 39. Traits 39 Traits are high level named features of Camel K that can be enabled/disabled or configured to customize the behavior of the final integration.
  • 40. 40 kamel run --trait route.enabled=true Camel K provide sensible defaults for all the traits, taking into account the integration code and the details of the target platform where the integration is going to run into. In some case user need to provide some hints to the operator in order to make it working properly i.e. the operator cannot determine if a service need to be exposed, for such case you need to manually enable the route trait: Traits
  • 41. Runtimes 41 ● Java Main ● Quarkus (in progress) ● What future will hold...
  • 42. Runtimes - Goals ● set up routes ● set up properties ● set up logging ● set up context 42
  • 43. Runtimes - Languages 43 Language Technology Notes Native Java jOOR Compile at runtime Maybe Groovy GroovyScript Engine No Kotlin Kotlin Script Runtime Maybe JavaScript Graal JS Yes XML Jaxb Support for route fragments only Yes YAML Jackson YAML Huge hack Yes
  • 45. Tomorrow session camel k + knative: Apache Camel K: connect your Knative serverless applications with everything else Thursday, 12th Sep, 09:00 - 09:50 Laughlin 2 (this very same room!)
  • 46. Future Work ● BDD testing ● Support the new Knative Eventing Broker/Trigger model ● Better support Quarkus (https://github.com/apache/camel-quarkus) ● Integrate with Tekton pipelines ● Enable webhook-based components available in Camel 3 (https://github.com/apache/camel/blob/master/components/camel-telegr am/src/main/docs/telegram-component.adoc#webhook-mode)
  • 47. We love contributions! ● Project repo: https://github.com/apache/camel-k ● list of tasks to start from (pick anyone with “easy fix - newcomers” label on them)
  • 49. Bytheway, what is Apache Camel?
  • 50. Camel K ● The swiss knife of integration ● >10 years of development - still one of the most active Apache projects ● Java-based integration framework that can be installed on multiple runtimes: Spring-Boot, Karaf, EAP, Standalone ● The cornerstone of Red Hat Fuse ● Based on Enterprise Integration Patterns ● Supports 300+ components ● Uses a powerful DSL ● Can integrate anything http://camel.apache.org/ What is Apache Camel? 50
  • 51. Camel K System Integration System A System B Camel is the glue between disparate Systems. Transport A Transport B
  • 55. Camel K Camel Routes from("file:data/inbox") .to("jms:queue:order"); <route> <from uri="file:data/inbox"/> <to uri="jms:queue:order"/> </route> Java DSL XML DSL
  • 56. Camel K Camel Routes with Splitter
  • 57. Camel K Camel Routes with Splitter from("file:inbox")
  • 58. Camel K Camel Routes with Splitter from("file:inbox") .split(body().tokenize("n"))
  • 59. Camel K Camel Routes with Splitter from("file:inbox") .split(body().tokenize("n")) .marshal(customToXml) .to("activemq:line"); Custom data transformation
  • 60. 300+ Components ahc ahc-ws amqp apns as2 asn1 asterisk atmos atmosphere-websocket atom atomix avro aws aws-xray azure bam barcode base64 beanio beanstalk bean-validator bindy blueprint bonita boon box braintree cache caffeine cassandraql castor cdi chronicle chunk cmis cm-sms coap cometd consul context corda core-osgi core-xml couchbase couchdb crypto crypto-cms csv cxf cxf-transport digitalocean disruptor dns docker dozer drill dropbox eclipse ehcache ejb elasticsearch elasticsearch5 elasticsearch-rest elsql etcd eventadmin exec facebook fastjson fhir flatpack flink fop freemarker ftp ganglia geocoder git github google-bigquery google-calendar google-drive google-mail google-pubsub google-sheets gora grape groovy groovy-dsl grpc gson guava-eventbus guice hawtdb hazelcast hbase hdfs hdfs2 headersmap hessian hipchat hl7 http http4 http-common hystrix ibatis ical iec60870 ignite infinispan influxdb ipfs irc ironmq jackson jacksonxml jasypt javaspace jaxb jbpm jcache jclouds jcr jdbc jetty jetty9 jetty-common jgroups jibx jing jira jms jmx johnzon jolt josql jpa jsch jsonpath json-validator jt400 juel jxpath kafka kestrel krati kubernetes kura ldap ldif leveldb linkedin lra lucene lumberjack lzf mail master metrics micrometer milo mina mina2 mllp mongodb mongodb3 mongodb-gridfs mqtt msv mustache mvel mybatis nagios nats netty netty4 netty4-http netty-http nsq ognl olingo2 olingo4 openshift openstack opentracing optaplanner paho paxlogging pdf pgevent printer protobuf pubnub quartz quartz2 quickfix rabbitmq reactive-streams reactor restlet rest-swagger ribbon rmi routebox rss ruby rx rxjava2 salesforce sap-netweaver saxon scala schematron scr script service servicenow servlet servletlistener shiro sip sjms sjms2 slack smpp snakeyaml snmp soap solr spark spark-rest splunk spring spring-batch spring-boot spring-cloud spring-cloud-consul spring-cloud-netflix spring-cloud-zookeeper spring-integration spring-javaconfig spring-ldap spring-redis spring-security spring-ws sql ssh stax stomp stream stringtemplate swagger swagger-java syslog tagsoup tarfile telegram test test-blueprint test-cdi testcontainers testcontainers-spring test-karaf testng test-spring thrift tika twilio twitter undertow univocity-parsers urlrewrite velocity vertx weather web3j websocket wordpress xchange xmlbeans xmljson xmlrpc xmlsecurity xmpp xstream yammer yql zendesk zipfile zipkin zookeeper zookeeper-master
  • 62. Camel K Runs on popular Java Runtimes