Slide 1

Slide 1 text

KUBERNETES KUBERNETES SERVERLESS SERVERLESS FRAMEWORKS FRAMEWORKS Adrian Kosmaczewski

Slide 2

Slide 2 text

"Serverless" "FaaS"

Slide 3

Slide 3 text

Martin Fowler — martinfowler.com/articles/serverless.html FaaS is about running backend code without managing your own server systems or your own long-lived server applications.

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

HOW DOES IT WORK? HOW DOES IT WORK?

Slide 6

Slide 6 text

Bernd Erk @gethash How #serverless actually works. #devopsdays 236 1:35 PM - Oct 29, 2019 94 people are talking about this

Slide 7

Slide 7 text

AGENDA AGENDA 1. OpenFaaS 2. Fn Project 3. Fission 4. OpenWhisk 5. Kubeless 6. TriggerMesh

Slide 8

Slide 8 text

AGENDA AGENDA 1. Project details 2. Demos (three, on minikube) 3. Available triggers 4. Supported programming languages

Slide 9

Slide 9 text

1. OPENFAAS 1. OPENFAAS

Slide 10

Slide 10 text

OPENFAAS OPENFAAS Written in Go ~16000 stars ~120 contributors Latest version 0.18.2 (October 15th, 2019) Independent project through donations (Patreon, OpenCollective, PayPal) www.openfaas.com @openfaas github.com/openfaas/faas

Slide 11

Slide 11 text

OPENFAAS CHARACTERISTICS OPENFAAS CHARACTERISTICS Based on Docker Functions packaged in containers Requires Docker in the local machine Manages Docker les on behalf of developer Template "store" CLI: faas-cli API with Swagger Serverless Framework plugin

Slide 12

Slide 12 text

1 provider: 2 name: openfaas 3 gateway: http://192.168.99.100:31112 4 functions: 5 hello: 6 lang: python3 7 handler: ./hello 8 image: hello:latest - 149 UU-: hello.yml

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

OPENFAAS TRIGGERS OPENFAAS TRIGGERS HTTP Event Connectors: Kafka, Amazon SNS, Minio, CloudEvents, IFTTT, Redis, RabbitMQ…

Slide 15

Slide 15 text

OPENFAAS LANGUAGES OPENFAAS LANGUAGES C#, F== (.NET Core) Go JavaScript (Node.js) Java (JVM) 8 & 12 PHP 7 Python / Python 3 Ruby github.com/openfaas/templates

Slide 16

Slide 16 text

2. FN PROJECT 2. FN PROJECT

Slide 17

Slide 17 text

FN PROJECT FN PROJECT Written in Go ~4300 stars ~80 contributors Latest version 0.3.739 (October 18th, 2019) Funded by Oracle (Oracle Functions is a fork) fnproject.io @fnproject github.com/fnproject/fn

Slide 18

Slide 18 text

FN PROJECT FN PROJECT CHARACTERISTICS CHARACTERISTICS

Slide 19

Slide 19 text

FN PROJECT TRIGGERS FN PROJECT TRIGGERS HTTP

Slide 20

Slide 20 text

FN PROJECT LANGUAGES FN PROJECT LANGUAGES Go JavaScript (Node.js) Java (JVM) Python Ruby C== (community supported) "Supports all languages"

Slide 21

Slide 21 text

3. FISSION 3. FISSION

Slide 22

Slide 22 text

FISSION FISSION Written in Go ~4700 stars ~90 contributors Latest version 1.6.0 (October 10th, 2019) Maintained by ssion.io @ ssionio github.com/ ssion/ ssion Platform9

Slide 23

Slide 23 text

FISSION CHARACTERISTICS FISSION CHARACTERISTICS Functions are injected into "Environments" Pool of containers with language runtimes Functions loaded and launched on demand CLI: fission Serverless Framework plugin

Slide 24

Slide 24 text

asciinema $ cat samples/fission.js module.exports = async function(context) { return { status: 200, body: "Hello VSHN from Fission!\n" }; } asciinema $ fission env create --name nodejs --image fission/node-env environment 'nodejs' created asciinema $ fission function create --name vshn --env nodejs --code samples/fission.js Package 'fission-js-i0nl' created function 'vshn' created asciinema $ fission function test 00:00

Slide 25

Slide 25 text

FISSION TRIGGERS FISSION TRIGGERS HTTP Time Message Queue Kubernetes Watch

Slide 26

Slide 26 text

FISSION LANGUAGES FISSION LANGUAGES Go Python JavaScript (Node.js) Java (JVM)

Slide 27

Slide 27 text

4. OPENWHISK 4. OPENWHISK

Slide 28

Slide 28 text

OPENWHISK OPENWHISK Written in Scala ~4300 stars ~160 contributors Latest version 0.9.0 (October 31st, 2018) Started by IBM, maintained by the Apache Foundation openwhisk.apache.org @openwhisk github.com/apache/openwhisk

Slide 29

Slide 29 text

OPENWHISK OPENWHISK CHARACTERISTICS CHARACTERISTICS Very "corporate" in design and functionality Secure by default Forked by Adobe and other big corporations CLI: wsk Serverless Framework plugin

Slide 30

Slide 30 text

OPENWHISK TRIGGERS OPENWHISK TRIGGERS Message Queues Databases Document Stores Website or Web Apps Service APIs IoT Frameworks… Couchbase

Slide 31

Slide 31 text

OPENWHISK LANGUAGES OPENWHISK LANGUAGES C#, F== (.NET Core) JavaScript (Node.js) Swift Java, Scala (JVM) Go Python, PHP, Ruby Ballerina Through Docker Actions: Rust, Haskell…

Slide 32

Slide 32 text

5. KUBELESS 5. KUBELESS

Slide 33

Slide 33 text

KUBELESS KUBELESS Written in Go ~5100 stars ~80 contributors Latest version 1.0.5 (October 16th, 2019) Maintained by kubeless.io github.com/kubeless/kubeless Bitnami

Slide 34

Slide 34 text

KUBELESS CHARACTERISTICS KUBELESS CHARACTERISTICS Simplest to install and use Aims to similarity with AWS Lambda CLI compliant with AWS Lambda CLI Prometheus monitoring of functions calls and latency CLI: kubeless Serverless Framework plugin

Slide 35

Slide 35 text

asciinema $ cat kubeless.py def hello(event, context): print event return "Hello CNC from " + event['data'] asciinema $ kubeless function deploy hello --runtime python2.7 --from-file kubeless.py --handler kubeless.hello INFO[0000] Deploying function... INFO[0000] Function hello submitted for deployment INFO[0000] Check the deployment status executing 'kubeless function ls hello' asciinema $ kubectl get functions NAME AGE hello 6s asciinema $ 00:00

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

KUBELESS TRIGGERS KUBELESS TRIGGERS HTTP Cronjob PubSub mechanisms Kafka NATS messaging Data stream events AWS Kinesis

Slide 38

Slide 38 text

KUBELESS LANGUAGES KUBELESS LANGUAGES Go Python JavaScript (Node.js) Java (JVM) Ruby C#, F== (.NET Core) Ballerina Custom runtimes possible

Slide 39

Slide 39 text

6. TRIGGERMESH 6. TRIGGERMESH

Slide 40

Slide 40 text

TRIGGERMESH TRIGGERMESH Founded ex-Kubeless engineers Based upon Kubernetes & Knative triggermesh.com @triggermesh

Slide 41

Slide 41 text

TRIGGERMESH TRIGGERMESH CHARACTERISTICS CHARACTERISTICS Based on Kubernetes & Knative CLI: tm Not yet open source "Early Access Program" TriggerMesh Operator for OpenShift 4.0 CI/CD of functions

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

TRIGGERMESH TRIGGERS TRIGGERMESH TRIGGERS Cross-cloud triggers from AWS & Azure to functions on Knative Code Commit Cognito DynamoDB Kinesis S3 SNS SQS…

Slide 44

Slide 44 text

TRIGGERMESH LANGUAGES TRIGGERMESH LANGUAGES Go JavaScript (Node.js) Python Ruby

Slide 45

Slide 45 text

COMPARISON COMPARISON Local Local Docker Docker Image Image Repo Repo Base Base Image Image OpenFaaS OpenFaaS Required Required Required Fn Project Fn Project Required Required Required Fission Fission None None Required OpenWhisk OpenWhisk None None None Kubeless Kubeless None None None

Slide 46

Slide 46 text

OTHER PLAYERS OTHER PLAYERS More: , , , , , … Amazon Firecracker AppScale Azure Functions on Kubernetes Dispatch Gestalt Dapr IronFunctions LunchBadger Nuclio OpenLambda Ri

Slide 47

Slide 47 text

WHAT ABOUT KNATIVE? WHAT ABOUT KNATIVE?

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

We will say it again… packaging code into containers should be considered a FaaS anti-pattern!

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

THANKS! THANKS! Adrian Kosmaczewski – [email protected]