application pipelines building serverlessserverless computing refers to the concept of building and...

30
Building Serverless Application Pipelines - Sebastien Goasguen

Upload: others

Post on 20-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Building Serverless Application Pipelines

- Sebastien Goasguen

Page 2: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

2017 Bitnami. Proprietary and confidential. 2

What do we do?

Package Deploy Maintain

Components Packages Platforms Updates

Page 3: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

2017 Bitnami. Proprietary and confidential. 3

Our Products

Application Catalog

• 150 applications & dev. runtimes• Multiple formats: cloud,

container, local VMs, native installers…

• Trusted, Maintained, Optimized

Stacksmith

• Enterprise cloud migration tool

• Productize Bitnami core technology

• Easily Re-platform applications for cloud

Kubernetes

• Defining packaging & deployment tools

• Key projects : Kubeapps, Kubeless, Helm

• Key partners: Microsoft, Deis, Heptio, SAP

Page 4: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Serverless

4

Page 5: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Serverless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled and billed on-demand in response to the exact demand needed at the moment.

5

Page 6: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

6

Page 7: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

AWS Lambda

7

Page 8: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

AWS CLI

$ aws lambda create-function \--region us-west-2 \--function-name CreateThumbnail \--zip-file fileb://file-path/CreateThumbnail.zip \--role role-arn \--handler CreateThumbnail.handler \--runtime runtime \--profile adminuser \--timeout 10 \--memory-size 1024

8

Page 9: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Concepts

• Function endpoints

• Triggers

• Events

9

Page 10: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Serverless and FaaS Solutions

10

Page 11: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

SAP is evaluating and planning to contribute to the open source Kubeless project

11

Page 12: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

BlackRock is using Kubeless to build search indices to enable data discovery for our portfolio managers and researchers. We continue to explore and evaluate the uses of this technology for other applications.

12

Page 13: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Kubernetes Native

Use the Kubernetes API serverUse Kubernetes API Objects• Deployments/Services• ConfigMaps• IngressHorizontal Pod AutoScalerUse CNCF monitoring - PrometheusUse Istio/Envoy for traffic encryption, distributed tracing and more

Extend Kubernetes

13

Page 14: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Architecture

14

Page 15: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Use Custom Resource Definitions

$ kubectl get customresourcedefinition

NAME AGE

functions.kubeless.io 11h

$ kubectl get functions

NAME AGE

hello 5h

$ kubectl get functions hello -o yaml

apiVersion: kubeless.io/v1beta1

kind: Function

metadata:

15

Page 16: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Controller Pattern

$ kubectl get pods -n kubeless

NAME READY STATUS RESTARTS AGE

kubeless-controller-586c9498f9-pstmv 1/1 Running 0 11h

https://github.com/GoogleCloudPlatform/kube-metacontroller

16

Page 17: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Monitoring

...

import prometheus_client as prom

...

func_hist = prom.Histogram('function_duration_seconds',

'Duration of user function in seconds',

['method'])

https://github.com/kubeless/kubeless/blob/master/docker/runtime/python-2.7/http-trigger/kubeless.py

17

Page 18: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Dashboard

18

Page 19: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Autoscaling with custom metrics

$ kubectl create -f custom-metrics.yaml

$ kubectl get po -n custom-metrics

NAME READY STATUS RESTARTS AGE

custom-metrics-apiserver-2956926076-wcgmw 1/1 Running 0 1h

https://github.com/kubeless/kubeless/tree/master/manifests/autoscaling

19

Page 20: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Serverless Pluginhttps://serverless.com/framework/docs/providers/kubeless/

20

Page 21: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

CloudEvents

21

Page 22: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Kubeless function interface

event: # Event data

data:

foo: bar # Parameter when calling the function with a JSON object

event-id: 123123

event-type: application/json

event-time: Tue Feb 20 2018 18:15:21 GMT+0000 (UTC)

event-namespace: kafka.kubeless.io

extensions: # Optional parameters, used to expose HTTP request properties

request: ...

context:

function-name: pubsub-nodejs

timeout: 180

runtime: nodejs6

memory-limit: 128M

22

Page 23: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Scaling Event Sources

23

Page 24: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

What is a serverless application ?

24

Page 25: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

What type of Apps ?

25

Page 26: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Data Streams and Processing

26

Page 27: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

How ?

Local service using a Chart (deployed on prem or in managed Kubernetes)

Remote Cloud service, instantiated via the service catalog with bindings loaded as k8s secrets

Business logic deployed as functions and triggered via events.

Combine Charts + Service Broker + Functions

27

Page 28: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Function Store at:https://github.com/kubeless/functions

Page 29: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Demo on Katacodahttps://katacoda.com/kubeless/scenarios/getting-started

29

Page 30: Application Pipelines Building ServerlessServerless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained

Thank You!@sebgoahttps://github.com/kubeless/kubelesshttp://kubeapps.com