4. Florent Biville ( @fbiville)
■ riffer at by day
■ ambassador and trainer by night
■ Spring Paris, Hackergarten Paris co-org
■ co-founder and co-org
■ Bu cümleyi anlarsan, sunumumdan sonra konuşalım!
`who am i`
6. Word of caution ⚠
What you will 👀 about is
not released yet and is subject to change
7. What is love ?
is the open-source serverless Function As A Service platform
■ based on Kubernetes (shorthand: K8s)
■ easy to install (CNAB FTW)
■ easy to scale (via Knative serving built-in autoscaling, inc. scale-{to,from}-zero)
■ with polyglot function support (build sources via Knative build and buildpacks v3)
■ with emergent stateful streaming support
■ and an overall improved User eXperience in mind
8. Thanks for attending, bye!
Source: https://www.ina.fr/video/I08358793/valery-giscard-d-estaing-au-revoir-video.html
11. Kubernetes has become the de-facto IaaS
■ Open-source, CNCF project
■ Rich and growing ecosystem
■ Sane and simple conceptual core model
■ Generic and extensible via CRD
13. K8s is awesome, but!
■ Common deployment patterns complex to
implement (want to 👀 some more YAML? 🤕)
■ Perfect to build a platform on top of it …
■ … which is probably NOT the core mission of
your company 😉
Have you
heard
about
14. Knative to the rescue
■ 3 main components
○ Build 🛠
○ Serving 🥂
○ Eventing ⛓
15. Knative to the rescue
■ 3 main components
○ Build 🛠
○ Serving 🥂
○ Eventing ⛓
16. Knative build
Brings a custom Build resource
The whole sequence of steps is run on the cluster,
in Builder images configured in a
(Cluster)BuildTemplate
Performs tasks such as:
■ Fetching code from repositories
■ Compiling
■ Publishing images
Current build template is based on
Buildpacks v3
apiVersion: build.knative.dev/v1alpha1
kind: BuildTemplate
metadata:
name: bazel
spec:
parameters:
- name: TARGET
description: The name of the Bazel "container_push"
target to run
steps:
- name: build-and-push
image: gcr.io/cloud-builders/bazel
args: ['run', '${TARGET}']
17. Buildpacks v3
■ Initially developed by Heroku & Pivotal
■ Build auto-detection (npm, Maven, Gradle…)
■ Eases the production upgrade process
■ defines its own builder and buildpacks
to detect, build and publish functions with
their corresponding invoker
18. Knative to the rescue
■ 3 main components
○ Build 🛠
○ Serving 🥂
○ Eventing ⛓
21. What is love ?
is the open-source serverless Function As A Service platform
■ based on Kubernetes (shorthand: K8s) ✓
■ easy to install (CNAB FTW)
■ easy to scale (via Knative serving built-in autoscaling, inc. scale-{to,from}-zero) ✓
■ with polyglot function support (build sources via Knative build and buildpacks v3) ✓
■ with emergent stateful streaming support
■ and an overall improved User eXperience in mind
22. Installation via riff CNAB
CNAB?
Cloud Native Application Bundle
■ Standard for packaging multi-component
applications
■ Target environment-agnostic
■ Invocation image can use Helm, KAB etc
■ Bundle can be thin or thick
cnab.io
23. Installation via riff CNAB
The bundle includes
■ Knative serving and build
■ Istio (Envoy) service mesh
■ riff custom resources and controllers
It does not include
■ A K8s cluster
26. What is love ?
is the open-source serverless Function As A Service platform
■ based on Kubernetes (shorthand: K8s) ✓
■ easy to install (CNAB FTW) ✓
■ easy to scale (via Knative serving built-in autoscaling, inc. scale-{to,from}-zero) ✓
■ with polyglot function support (build sources via Knative build and buildpacks v3) ✓
■ with emergent stateful streaming support
■ and an overall improved User eXperience in mind
27. Function deployment
Function?
■ A custom resource to describe the
(Repo URL)→Docker image
transformation on the cluster a.k.a. build
■ Orchestrated by the buildpack
builder
■ Invokable in:
○ Request-reply mode (handler)
○ Streaming fashion (processor)
const os = require('os');
const hostname = os.hostname();
module.exports = name => {
console.log(`received request to ${hostname} for ${name}`);
return `hello ${name} from ${hostname}`
};
29. Streaming function (pre-α)
Streaming
■ Heavy lifting done by Spring Cloud Fn
■ Streaming processor and gateway
(Liiklus) abstract the underlying msg
system
■ ⚠ Only Java supported at this point
(broader support soon)
Fn Invoker Processor
Gateway
1
Gateway
2
Kafka
topic1
Kinesis
topic2
30. What is love ?
is the open-source serverless Function As A Service platform
■ based on Kubernetes (shorthand: K8s) ✓
■ easy to install (CNAB FTW) ✓
■ easy to scale (via Knative serving built-in autoscaling, inc. scale-{to,from}-zero) ✓
■ with polyglot function support (build sources via Knative build and buildpacks v3) ✓
■ with emergent stateful streaming support ✓
■ and an overall improved User eXperience in mind ✓