Slide 1

Slide 1 text

Building a Serverless CI/CD Pipeline Photo by Ricardo Gomez Angel on Unsplash @anubhavm 

Slide 2

Slide 2 text

Building a Serverless Continuous Integration and Delivery Pipeline Photo by Ricardo Gomez Angel on Unsplash @anubhavm 

Slide 3

Slide 3 text

@anubhavm Anubhav Mishra Developer Advocate, HashiCorp

Slide 4

Slide 4 text

@anubhavm Anubhav Mishra Developer Advocate, HashiCorp Atlan&s

Slide 5

Slide 5 text

@anubhavm Anubhav Mishra Developer Advocate, HashiCorp Atlan&s

Slide 6

Slide 6 text

@anubhavm Anubhav Mishra Developer Advocate, HashiCorp Atlan&s Gopher Artwork by Ashley McNamara

Slide 7

Slide 7 text

@anubhavm Anubhav Mishra Developer Advocate, HashiCorp Atlan&s Gopher Artwork by Ashley McNamara

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Building a CI/CD Pipeline for Serverless Applications Photo by Ricardo Gomez Angel on Unsplash @anubhavm 

Slide 10

Slide 10 text

Building a CI/CD Pipeline for Serverless Applications Photo by Ricardo Gomez Angel on Unsplash @anubhavm 

Slide 11

Slide 11 text

@anubhavm  Agenda Software Delivery using CI/CD “Serverless” - The Term “Serverless” for CI/CD Live Demos!

Slide 12

Slide 12 text

Software Delivery Pipelines Photo by Simon Rae on Unsplash

Slide 13

Slide 13 text

@anubhavm  Software Delivery Pipeline

Slide 14

Slide 14 text

@anubhavm  Software Delivery Pipeline Source/Code

Slide 15

Slide 15 text

@anubhavm  Software Delivery Pipeline Source/Code Build

Slide 16

Slide 16 text

@anubhavm  Software Delivery Pipeline Source/Code Build Test

Slide 17

Slide 17 text

@anubhavm  Software Delivery Pipeline Source/Code Build Test Deploy (Production)

Slide 18

Slide 18 text

@anubhavm  Software Delivery Pipeline Source/Code Build Test Deploy (Production) Continuous Integration (CI)

Slide 19

Slide 19 text

@anubhavm  Software Delivery Pipeline Source/Code Build Test Deploy (Production) Continuous Integration (CI) Continuous Delivery (CD)

Slide 20

Slide 20 text

@anubhavm  Software Delivery Pipeline Source/Code Build Test Deploy (Production) Continuous Integration (CI) Continuous Delivery (CD)

Slide 21

Slide 21 text

@anubhavm  Software Delivery Pipeline Source/Code Build Test Deploy (Production) Continuous Integration (CI) Continuous Delivery (CD)

Slide 22

Slide 22 text

@anubhavm  CI/CD Code stored in VCS (Git, SVN) Using automation systems (Jenkins, CircleCI, TravisCI) Unit tests and integration tests Deploy to dev, staging, and production Canary deployments $ go test

Slide 23

Slide 23 text

@anubhavm  CI/CD Build Test Deploy (Production) Developer $ git push Trigger Webhook

Slide 24

Slide 24 text

@anubhavm  CI/CD Build Test Deploy (Production) Developer $ git push Trigger Webhook Compute (Servers)

Slide 25

Slide 25 text

@anubhavm  CI/CD Build Test Deploy (Production) Developer $ git push Trigger Webhook Compute (Servers)

Slide 26

Slide 26 text

@anubhavm  CI/CD Developer $ git push Build Test Deploy (Production) Trigger Webhook Compute (Servers)

Slide 27

Slide 27 text

@anubhavm  CI/CD Developer $ git push Build Test Deploy (Production) Trigger Webhook

Slide 28

Slide 28 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook

Slide 29

Slide 29 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook

Slide 30

Slide 30 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook

Slide 31

Slide 31 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master

Slide 32

Slide 32 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master Slaves Clients

Slide 33

Slide 33 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master Slaves Clients

Slide 34

Slide 34 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master Slaves Clients

Slide 35

Slide 35 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master Slaves Clients

Slide 36

Slide 36 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master Slaves Clients

Slide 37

Slide 37 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master Slaves Clients

Slide 38

Slide 38 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook Master Slaves Clients

Slide 39

Slide 39 text

@anubhavm 

Slide 40

Slide 40 text

@anubhavm  Drawbacks Cost of Infrastructure (on-prem or hosted) Cost of Idle Time Long Term Maintenance Reduced Agility Longer Delivery Times

Slide 41

Slide 41 text

@anubhavm  CI/CD Build Test Deploy (Production) Developer $ git push Trigger Webhook Compute (Servers)

Slide 42

Slide 42 text

@anubhavm  CI/CD Developer $ git push Trigger Webhook

Slide 43

Slide 43 text

“Serverless” - The Term Photo by Yu Kato on Unsplash

Slide 44

Slide 44 text

@anubhavm 

Slide 45

Slide 45 text

@anubhavm 

Slide 46

Slide 46 text

@anubhavm  https://twitter.com/anubhavm/status/1016454479548506112

Slide 47

Slide 47 text

@anubhavm  “Serverless” Google Cloud defines Serverless “Serverless is a new paradigm of computing that abstracts away the complexity associated with managing servers for mobile and API backends, ETL, data processing jobs, databases, and more.” AWS defines Serverless “Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don't require you to provision, scale, and manage any servers.” Microsoft (Azure) defines Serverless “Serverless computing is the abstraction of servers, infrastructure, and operating systems.”

Slide 48

Slide 48 text

@anubhavm  “Serverless” Google Cloud defines Serverless “Serverless is a new paradigm of computing that abstracts away the complexity associated with managing servers for mobile and API backends, ETL, data processing jobs, databases, and more.” AWS defines Serverless “Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don't require you to provision, scale, and manage any servers.” Microsoft (Azure) defines Serverless “Serverless computing is the abstraction of servers, infrastructure, and operating systems.”

Slide 49

Slide 49 text

@anubhavm 

Slide 50

Slide 50 text

@anubhavm  “Serverless” “Serverless is a technology pattern that provides services and concepts to minimize operational overhead that comes with managing servers. It is a powerful abstraction when used can result in an increased focus on business value.” - Anubhav Mishra OSCON 2018, Portland

Slide 51

Slide 51 text

@anubhavm  “Serverless” “Serverless is a technology pattern that provides services and concepts to minimize operational overhead that comes with managing servers. It is a powerful abstraction when used can result in an increased focus on business value.” - Anubhav Mishra OSCON 2018, Portland FaaS = Functions as a Service BaaS = Backend as a Service

Slide 52

Slide 52 text

@anubhavm 

Slide 53

Slide 53 text

@anubhavm 

Slide 54

Slide 54 text

@anubhavm 

Slide 55

Slide 55 text

@anubhavm 

Slide 56

Slide 56 text

@anubhavm  Benefits / Advantages Reduced Operational/Infrastructure Cost Pay for What You Use Faster Development Cycles Increased Elasticity / Scaling

Slide 57

Slide 57 text

@anubhavm  Benefits / Advantages Reduced Operational/Infrastructure Cost Pay for What You Use Faster Development Cycles Increased Elasticity / Scaling

Slide 58

Slide 58 text

@anubhavm  “Serverless” CI/CD Developer Trigger Webhook $ git push

Slide 59

Slide 59 text

@anubhavm  “Serverless” CI/CD Developer Trigger Webhook $ git push

Slide 60

Slide 60 text

@anubhavm  “Serverless” CI/CD Developer Trigger Webhook $ git push

Slide 61

Slide 61 text

@anubhavm  “Serverless” CI/CD Developer Trigger Webhook $ git push

Slide 62

Slide 62 text

@anubhavm  Let’s build stuff

Slide 63

Slide 63 text

@anubhavm  Let’s build stuff

Slide 64

Slide 64 text

@anubhavm  Live Demos

Slide 65

Slide 65 text

@anubhavm  Live Demos

Slide 66

Slide 66 text

@anubhavm  Extending Jenkins using Serverless Build Test Deploy (Production) $ git push Trigger Webhook

Slide 67

Slide 67 text

@anubhavm  Extending Jenkins using Serverless $ git push Trigger Webhook

Slide 68

Slide 68 text

@anubhavm  Extending Jenkins using Serverless $ git push Trigger Webhook Master Slaves Clients

Slide 69

Slide 69 text

@anubhavm  No Nodes/Servers to Manage Launch 10,000+ Builds/Containers in Seconds No Cost for Idle Time Cost Summary (1 vCPU, 2GB memory): • With Jenkins on Fargate: 100 builds * 5 mins = $0.633/month • With Jenkins on EC2 Instances: ~ $50/month Advantages of Using CaaS for Jenkins

Slide 70

Slide 70 text

@anubhavm  Cold Starts - Slower Boot Times for Clients Large Container Images (~1G) No Root Access Ephemeral Storage (Default) Drawbacks of Using CaaS for Jenkins

Slide 71

Slide 71 text

@anubhavm  [1] Released ~2015-2016 (Blog Post) 3000+ Github Stars Written in Node.js Supports AWS Lambda OSS “Serverless” CI/CD Projects LambCI Serverless continuous integration [1] Michael Hart’s blog post on LambCI - a serverless build system https://medium.com/@hichaelmart/lambci-4c3e29d6599b

Slide 72

Slide 72 text

@anubhavm  Continuous Integration using LambCI $ git push Trigger Webhook LambCI +

Slide 73

Slide 73 text

@anubhavm  1000+ Concurrent Builds No Maintenance of Servers No Cost for Idle Time Flexible Billing (100 Concurrent Builds of 10 secs vs 10 Individual 5 Minute Builds) Cost Summary (1GB Memory): • With AWS Lambda Free Tier: 1000 builds * 5 mins = $0.00/month • With AWS Lambda Paid: 1000 builds * 5 mins = $5.00/month Advantages of using FaaS for CI/CD

Slide 74

Slide 74 text

@anubhavm  Limited Runtime Support (Node.js, Python, Golang) Limited Support for Plugins No Root Access ~5 Minutes Maximum Build Time Drawbacks of Using FaaS for CI/CD

Slide 75

Slide 75 text

@anubhavm  https://twitter.com/kelseyhightower/status/902525728725405697?lang=en

Slide 76

Slide 76 text

The Future Photo by Pierre Châtel-Innocenti on Unsplash

Slide 77

Slide 77 text

www.hashicorp.com FOR EVERYONE, EVERYWHERE Thank You! I have stickers! Ask me anything. @anubhavm Anubhav Mishra