1. CAMEL DAY ITALIA 2021
CAMEL K
Nicola Ferraro - Principal Software Engineer @ Red Hat
Luca Burgazzoli - Principal Architect @ Red Hat
2. About us
2
Luca Burgazzoli
Principal Architect at Red Hat
Twitter: @lburgazzoli
We work on:
- Apache Camel and Camel K
- Red Hat Integration
- Knative Contrib
Nicola Ferraro
Principal Software Engineer at Red Hat
Twitter: @ni_ferraro
5. … when you’re free to play!
We all love
microservices!
Kubernetes
is so fun!
Software development is fun…
My
App
Let’s do it
serverless!
We are the
best team in
the world!
6. But then you realize...
… that you’re not alone in the world!
My
App
7. You need to solve a lot of problems:
● Different communication models (e.g. sync / async)
● Different protocols or messaging systems
● Different languages or technologies
● Different business domains
● Different data access patterns
● …
● What if your app is unavailable?
● How do we manage consistency?
Even with only two systems...
My
App
Your
App
I WAS A SHEEP
RANCHER
BEFORE I
WORKED HERE
● Different life philosophy
● Inability to change the other
side
● ...
8. Apache Camel K can set you free!
My
App
Your
App
from(“pulsar://company/nsx/topic1”)
.unmarshal().json()
.transform().simple(“${body[data]}”)
.to(“knative:event/activity”)
from(“knative:event/produced”)
.pollEnrich()
.simple(“aws2-s3://mybucket/files/${header.Ce-File}”)
.to(“kafka:ext-topic”)
Party Area
(Free lunch zone ®)
9. Encapsulate complexity into an “Integration”
from(“pulsar://company/nsx/topic1”)
.unmarshal().json()
.transform().simple(“${body[data]}”)
.to(“knative:event/activity”)
Apache Camel DSL (routes.groovy)
My
App
Kubernetes
Kubernetes custom
resource
300+ components!
10. Camel K as an architectural component
Platform
Kubernetes
App App
App
● Ingress
● Egress
● Transformations
● Persistence
● Integration
Patterns
● ...
12. ● https://github.com/apache/camel-k
● A lightweight platform for running integrations on Openshift and Kubernetes
● Reached version 1.3.0 on December 28, 2020
What is Apache Camel K?
A lightweight integration platform, born on
Kubernetes, with serverless superpowers
13. Camel K for Developers
Create
integration file
from(“knative:channel/xxxx”)
.transform()...
.to(“kafka:topic”)
1
EXECUTE
CLI Tools
$ kamel run integration.java
2
RUNNING
Serverlesson
OpenShift/Kubernetes
3
14. Camel K Architecture
Knative
Kubernetes/OpenShift
Camel K Operator
DEVELOPER
Serverless
Function/Application
Pod
Serverless
Function/Application
Pod
Serverless
Function/Application
Pod
Tailored for cloud-native development
experience.
● Live coding on cloud
● Built-in dependency management
● Rapid deployment, incremental
updates
● Automate cloud resource generation
● Highly customizable
Integration
Custom Resource
LIVE
UPDATE!!
16. Developer Tooling
● Work on VSCode and Eclipse Che
● Auto-completion (LSP based)
and error highlighting
● Manage lifecycle of
integrations
● Inspect status and logs
● Actively developed with
tech-marketing feedback
● Improved “kamel” CLI
18. Camel K loves Knative
A lightweight integration platform, born on
Kubernetes, with serverless superpowers
Not the official
logo, but we like it!
Camel K can also live without Knative, but it doesn’t want to ;)
20. Knative
Service
POD
Scale Down to Zero
Request
Initiate and Start
Scale Up with Load
Knative Serving
Request
Request
Request
Request
POD
POD
POD
POD
22. Knative Eventing
Event Source
kn source
kn source create
kn source list
kn source list-types
Broker
New
Event
Trigger
kn trigger
Kn trigger create
kn trigger delete
kn trigger list
kn broker
Kn broker create
kn broker delete
kn broker list
Provider
kn service
kn service create
kn service delete
kn service describe
kn service list
kn service update
Event Providers
Infrastructure
New Customer
created event
Email service
Log service
Loyalty points
service
Trigger
Trigger
New
Event
New
Event
FEW Providers
23. Knative Eventing with Camel K
Event Source
Broker
New
Event
Camel K
Provider
Event Providers
Infrastructure
New Customer
created event
Email service
Log service
Loyalty points
service
New
Event
New
Event
300+ components!
Camel K
300+ components!
kamel run
kamel list
kamel delete
kamel run
kamel list
kamel delete
kn trigger
Kn trigger create
kn trigger delete
kn trigger list
Trigger
28. POD
Quarkus
Currently, integrations can run on Quarkus in JVM mode:
POD POD
from(“knative:event/produced”)
.pollEnrich()
.simple(“aws2-s3://mybucket/files/${header.Ce-File}”)
.to(“kafka:ext-topic”)
The future is native,
with no changes in ux,
and much better
performance!
Have you heard
about GraalVM
and Mandrel?
https://github.com/apache/camel-quarkus
29. Kamelets
Meaning: Kamel route snippets
Non-camel users find it difficult to write Camel DSL, they just want to leverage it.
… … … …
1. Pick one
2. Configure parameters
3. Choose destination
query=quarkus
token=...
Kamelets have many more use cases outside Knative:
● Camel Kafka Connect
● Visual Tools for Camel K development
Kamelet Catalog (Kubernetes Objects)
Native on
OpenShift 4.7
Console
+ create your
own Kamelet
30. Testing software using BDD style.
Now part of citrusframework.org.
Same structure of Camel K (CLI + operator)
To run the test:
yaks test gateway.feature
https://github.com/citrusframework/yaks
Feature: API Gateway Works
Background:
Given URL: https://myservice/api/films
Scenario: Get a result from API
When send GET /
Then receive HTTP 200 OK
YAKS
31. Other important future developments
● Webhooks: reduce the amount of components that need an “always on” pod
● Keda: autoscaling not only limited to http workloads
32. Want to learn more about Camel K?
Official doc: https://camel.apache.org/camel-k/
Kubernetes enterprise integration patterns with Camel-K | DevNation Tech Talk
https://developers.redhat.com/videos/youtube/51x9BewGCYA/
By Nicola Ferraro and Luca Burgazzoli
Event-driven serverless applications with Camel K | DevNation Tech Talk
https://developers.redhat.com/devnation/tech-talks/serverless-apps-camelk
By Nicola Ferraro and Luca Burgazzoli