Serverless Architecture meets Continous Delivery

Similar documents
Serverless Architecture meets Continuous Delivery. Andreas

Building Serverless applications with Python. Andrii Soldatenko 8 April 2017 Italy,

Nailing Serverless Application Development

How to go serverless with AWS Lambda

Serverless Architecture Hochskalierbare Anwendungen ohne Server. Sascha Möllering, Solutions Architect

A Glance Over the Serverless Framework

From Your Keyboard to Your Customers without a Server to Manage In-between

AWS Lambda. 1.1 What is AWS Lambda?

Immersion Day. Getting Started with AWS Lambda. August Rev

Deep Dive on AWS CodeStar

DevOps Anti-Patterns. Have the Ops team deal with it. Time to fire the Ops team! Let s hire a DevOps unit! COPYRIGHT 2019 MANICODE SECURITY

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Containers or Serverless? Mike Gillespie Solutions Architect, AWS Solutions Architecture

DevOps Agility in the Evolving Cloud Services Landscape

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

Microservices without the Servers: AWS Lambda in Action

Introduction to Serverless PHP

TM DevOps Use Case TechMinfy All Rights Reserved

Companion Guide to Practical Tools for Serverless Computing UCC 2017

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Serverless The Future of the Cloud?!

Deep Dive on Serverless Application Development

Continuous Delivery for Cloud Native Applications

Experiences with Serverless Big Data

Continuous Delivery at Liferay A fast lane for your software updates. Rubén Eduardo

DevOps on AWS Deep Dive on Continuous Delivery and the AWS Developer Tools

At Course Completion Prepares you as per certification requirements for AWS Developer Associate.

Diving into AWS Lambda

Orchestrating the Continuous Delivery Process

CONTINUOUS INTEGRATION; TIPS & TRICKS

Taming your heterogeneous cloud with Red Hat OpenShift Container Platform.

PROCE55 Mobile: Web API App. Web API.

AWS Lambda + nodejs Hands-On Training

Containers & Microservices For Realists. Karthik

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Pontoon An Enterprise grade serverless framework using Kubernetes Kumar Gaurav, Director R&D, VMware Mageshwaran R, Staff Engineer R&D, VMware

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

FROM VSTS TO AZURE DEVOPS

Accenture Cloud Platform Serverless Journey

Przyspiesz tworzenie aplikacji przy pomocy Openshift Container Platform. Jarosław Stakuń Senior Solution Architect/Red Hat CEE

Strengthen and Scale security using DevSecOps

I keep hearing about DevOps What is it?

Emulating Lambda to speed up development. Kevin Epstein CTO CorpInfo AWS Premier Partner

Serverless Predictions at Scale

Developing Kubernetes Services

AWS Lambda: Event-driven Code in the Cloud

Hedge The New Serverless Framework By Janne Kujanpää

Catalyst. Uber s Serverless Platform. Shawn Burke - Staff Engineer Uber Seattle

Handel-CodePipeline Documentation

Cloud Computing design patterns blueprints

DevOps and Continuous Delivery USE CASE

Testing in AWS. Let s go back to the lambda function(sample-hello) you made before. - AWS Lambda - Select Simple-Hello

Zombie Apocalypse Workshop

Sunil Shah SECURE, FLEXIBLE CONTINUOUS DELIVERY PIPELINES WITH GITLAB AND DC/OS Mesosphere, Inc. All Rights Reserved.

This document (including, without limitation, any product roadmap or statement of direction data) illustrates the planned testing, release and

Serverless in the Java ecosystem

Serverless and Java in the Real

Diabolical Developer s Intro to FaaS for Java Developers

Build & Launch Tools (BLT) Automating best practices for enterprise sites

Serverless Computing and the Apache OpenWhisk Project

InterSystems Cloud Manager & Containers for InterSystems Technologies. Luca Ravazzolo Product Manager

Securing Serverless Architectures

Building Microservices with the 12 Factor App Pattern

Deploy Early, Deploy Often, Deploy Safely Andy Lowe

Serverless Architectures with AWS Lambda. David Brais & Udayan Das

A DEVOPS STATE OF MIND. Chris Van Tuin Chief Technologist, West

OpenShift Roadmap Enterprise Kubernetes for Developers. Clayton Coleman, Architect, OpenShift

Companion Guide to Distributed Service Prototyping with Cloud Functions ICDCS 2018

Getting Started With Serverless: Key Use Cases & Design Patterns

Serverless Microservices Are The New Black. Lorna Mitchell, IBM

Think Small: API Architecture For The Enterprise

Microservices on AWS. Matthias Jung, Solutions Architect AWS

Con$nuous Deployment with Docker Andrew Aslinger. Oct

A DEVOPS STATE OF MIND WITH DOCKER AND KUBERNETES. Chris Van Tuin Chief Technologist, West

A Hands on Introduction to Docker

Java Architectures A New Hope. Eberhard Wolff

DevOps Tooling from AWS

DevNet Workshop-Hands-on with CloudCenter and Jenkins

Programming Functions. Debugging and testing

Serverless Computing. Redefining the Cloud. Roger S. Barga, Ph.D. General Manager Amazon Web Services

Going Serverless. Building Production Applications Without Managing Infrastructure

Agility on Steroids with a Docker-based CI/CD pipeline on AWS. Jon Christensen July 19, 2018

Building a Microservices Platform, Patterns and Best Practices

From development to production

Blow up the monolith? Serverless computing, nanofunctions, & Amazon Lambda

Improving the Yocto Project Developer Experience. How New Tools Will Enable a Better Workflow October 2016 Henry Bruce

What I ll be talking about. About me & bol.com The CI/CD bol.com Current setup. The future in the cloud

Serverless Computing: Design, Implementation, and Performance. Garrett McGrath and Paul R. Brenner

Build planetary scale applications with compartmentalization

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

How the Cloud is Enabling the Disruption of the Construction Industry. AWS Case Study Construction Industry. Abstract

SAMPLE CHAPTER. Event-driven serverless applications. Danilo Poccia. FOREWORD BY James Governor MANNING

DevOps in the Cloud A pipeline to heaven?! Robert Cowham BCS CMSG Vice Chair

Enterprise Node.js Support

MONITORING SERVERLESS ARCHITECTURES

Flask-Cors Documentation

Serverless Website Publishing with AWS Code* Services. Steffen Grunwald Solutions Architect, AWS October 27, 2016

12 Factors to Cloud Success. Rafael Benevides

Creating pipelines that build, test and deploy containerized artifacts Slides: Tom Adams

App Studio 4.1 Deployment Guide

Transcription:

Serverless Architecture meets Continous Delivery Alex Krause alex.krause@cosee.biz @alex0ptr Andreas Mohrhard andreas.mohrhard@cosee.biz @amohrhard

https://twitter.com/jeffbarr/status/805175000906928128

$

$

Ops

Ops Scale

Ops Scale High Availability

Ops Scale High Availability Saturation

Ops Scale High Availability Saturation

Serverless Architecture

AWS Lambda Function as a Service (FaaS) cost estimates: serverlesscalc.com

Ops Scale High Availability Saturation

CI keep team in sync and get fast feedback CD be confident and get code to production Commit stage Compile Unit test Analysis Build Installers Automated acceptance testing Automated capacity testing Manual Testing Showcases Exploratory testing Release ( )

Configuration Serverless Build Unit Tests Integration Tests Events / Triggers Complex Infrastructure Deployment Stress Testing Versioning Rollback Limits

Unit Tests?

@Override public LambdaProxyResponse handlerequest(lambdaproxyrequest request, Context context) { val query = request.getquerystringparameters(); List<User> results; if (query!= null && query.containskey("usernames")) { val idasstring = Splitter.on(",").splitToList(query.get("usernames")); val usersforquery = idasstring.stream().map(s -> User.builder().username(s).build()).collect(Collectors.toList()); val usertablekeysandattributes = new TableKeysAndAttributes(dynamodbAdapter.userTableName); usersforquery.foreach( u -> usertablekeysandattributes.addhashonlyprimarykey(dynamodbadapter.usertable.username, u.getusername())); } results = dynamodbadapter.dynamodb.batchgetitem(usertablekeysandattributes).gettableitems().get(dynamodbadapter.usertablename).stream().map(dynamodbadapter::itemtouser).collect(tolist()); } else { [...] } return wrapinresponse(results);

@Override public LambdaProxyResponse handlerequest(lambdaproxyrequest request, Context c) { val query = request.getquerystringparameters(); List<User> results; if (query!= null && query.containskey("usernames")) { List<User> usersforquery = extractusernamesfromquery(query); results = userservice.retrieveusers(usersforquery); } else { results = userservice.retrieveusers(); } } return wrapinresponse(results);

Unit Tests? focus on application code no, keep your

Integration Tests? disposable environments Serverless invoke local LambCI LocalStack SAM Local $ docker run -v "$PWD":/var/task lambci/lambda \ index.myhandler '{"some": "event"}'

Complex Infrastructure? Infrastructure as Code

A lot of configuration, deploy scripts? Serverless, AWS SAM, Chalice, Sparta

service: serverless-peer-reward provider: name: aws runtime: java8 memorysize: 512 timeout: 10 stage: dev region: eu-central-1 environment: TBL_PREFIX: ${self:provider.stage}-rewards iamrolestatements: - Effect: "Allow" Action: - "dynamodb:*" Resource: arn:aws table/* package: artifact: target/peer-rewards.jar functions: users: handler: biz.cosee UserHandler events: - http: path: users method: get cors: true rewards: handler: biz.cosee RewardHandler events: - http: path: rewards method: any cors: true generate: handler: biz.cosee RandomRewardHandler events: - schedule: rate: rate(1 minute) enabled: false

serverless language agnostic multi-cloud install via npm plugins service: serverless-peer-reward provider: name: aws runtime: java8 memorysize: 512 timeout: 10 stage: dev region: eu-central-1 environment: TBL_PREFIX: ${self:provider.stage}-rewards iamrolestatements: - Effect: "Allow" Action: - "dynamodb:*" Resource: "*" package: artifact: target/peer-rewards.jar

chalice python $ pip install chalice $ chalice new-project helloworld && cd helloworld $ cat app.py from chalice import Chalice app = Chalice(app_name="helloworld") micro framework focus on AWS @app.route("/") def index(): return {"hello": "world"} $ chalice deploy... https://endpoint/dev $ curl https://endpoint/api {"hello": "world"}

Serverless Application Model based on Cloud- Formation cli available, AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Outputs the time Resources: TimeFunction: Type: AWS::Serverless::Function Properties: Handler: index.handler Runtime: nodejs6.10 CodeUri:./ Events: MyTimeApi: Type: Api Properties: Path: /TimeResource Method: GET not needed AWS only SAM local $ sam local validate $ sam local start-api $ sam local generate-event api > event.json $ sam local invoke "ExampleFunction" -e event.json $ sam package [ ] $ sam deploy [ ]

sparta config and app in go fast startup func hello(event *json.rawmessage, context *sparta.lambdacontext, w http.responsewriter, logger *logrus.logger) { logger.info("hello World: ", string(*event)) fmt.fprint(w, string(*event)) } func main() { var functions []*sparta.lambdaawsinfo lambdafn := sparta.newlambda(sparta.iamroledefinition{}, hello, nil) lambdafunctions = append(functions, lambdafn) alternative to supported languages } // Deploy it sparta.main("spartahelloworld", Simple Sparta Example", lambdafunctions, nil, nil)

How to do versioning?

λ lambda config deployment #latest deployment deployment #dev

How to do versioning? Lambda built-in Labels and Versioning API Gateway Stages (dev/prod)

What if I want to roll back? switching lambda labels (#blue <> #green) e.g. Serverless, built-in functionality

Pipeline, where to run? CircleCI, Travis, Code{Star,Pipeline,Build} need comprehensive rights for AWS

Pipeline

What s the catch? 50MB per function 75GB per region careful with dependencies, try minification automate cleanups / just overwrite monitoring artifacts in pipeline

Interesting things to share goad, artillery Lambda for CI/CD tasks chromeless Serverless By Design

The Big Picture

Keep your manners. Know your tools. Don t be afraid.

> blog.cosee.biz > jobs.cosee.biz > talks.cosee.biz

Verlosung und Panel 17h35 Humboldtsaal