Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building CI/CD Pipelines for Serverless Applications

98 views

Published on

#ServerlessTO meetup about ins and outs of creating #CICD pipelines for #Serverless apps, and comparison of the major providers: #AWS #CodePipeline & #CodeBuild, #Travis CI, #CircleCI and #Seed. Event recording can be found at https://youtu.be/bUmR6jBRLiY

MEETUP SPONSORS

Big thanks to https://twitter.com/ManningBooks and https://twitter.com/Myplanet for continuing to be our Knowledge and Venue sponsors!

And our Catering sponsor https://twitter.com/twilio, shared a 50%-off Coupon Code for their November 7th Superclass in Toronto (https://twilioengage.com/toronto). Enjoy it: Super50 :)

Published in: Software
  • Be the first to comment

  • Be the first to like this

Building CI/CD Pipelines for Serverless Applications

  1. 1. Tuesday, Oct 15, 2019 1. Intro & Activity Update 2. Community Open Mic 3. Frank Wang & Jay V: “Building CI/CD pipelines for Serverless apps on AWS” 4. Networking 1 ServerlessToronto.org Meetup Agenda
  2. 2. Why we do what we do? 2 Serverless is New Agile Serverless Dev (gluing other people’s APIs and managed services) We're obsessed by creating business value (meaningful MVPs, products) and helping Startups We build bridges between Serverless Community (“Dev leg”), and Front-end & Voice- First folks (“UX leg”), and empower UX developers Achieve agility NOT by “sprinting” faster (like in Scrum), but by working smarter (by using bigger building blocks and less Ops)
  3. 3. #ServerlessTO Sponsors 3
  4. 4. Catering Sponsor 4 Communication APIs for SMS, Voice, Video and Authentication
  5. 5. Venue Sponsor 5 As Certified B Corporation, Myplanet is purpose-driven and creates benefit for all stakeholders, not just shareholders!
  6. 6. Manning Publications 2019 giveaways Three eBooks and one Video course left: 1. www.manning.com/books/http2-in-action 2. www.manning.com/books/the-design-of- everyday-apis 3. www.manning.com/books/voice-applications-for- alexa-and-google-assistant 4. www.manning.com/livevideo/graphql-in-motion 6
  7. 7. Future Talks 2019 7
  8. 8. Upcoming Serverless Toronto Meetups 8 1. November 14, 2019: Joint meetup with JAMstack TORONTO – Phill Hawksworth from Netlify 2. Nov/Dec 2019: Serverless Heroes (authors of “Serverless Applications with Node.js”) Slobodan Stojanović & Aleksandar Simović should be visiting us. If they cannot make it from Serbia, we’ll just host a panel with local experts to answer your architectural & design questions. 3. Dec 2019/Jan 2020: re:Invent recap – Jonathan Dion, Senior Technical Evangelist at AWS
  9. 9. Community Open Mic 9 10 seconds of freedom to pitch yourself, or your company About You – because without you, there would be no meetups!
  10. 10. Feature Talk October 2019 10
  11. 11. SEEDwww.seed.run Building CI/CD Pipelines for Serverless Applications
  12. 12. www.seed.runSEED What we’ll be covering Real-world Serverless apps CI/CD best practices CodeBuild + CodePipeline Travis CI, CircleCI, and Seed
  13. 13. www.seed.runSEED Frank Jay 💎 @fanjiewang @jayair
  14. 14. Serverless-Stack.com
  15. 15. www.seed.run
  16. 16. www.seed.runSEED Let’s get started!
  17. 17. www.seed.runSEED Serverless Architectural Patterns & Best Practices Mike Apted Startup Solutions Architect at AWS by
  18. 18. www.seed.runSEED Real-world Serverless apps Dozens of services Multiple Git repos With many environments Pull request based workflow
  19. 19. www.seed.runSEED Apps vs Services App: collection of services Service: has a serverless.yml
  20. 20. www.seed.runSEED Organizing services Microservice architecture Organized by business units Split by the 200 resource limit
  21. 21. www.seed.runSEED Organizing repos Repo for infrastructure Repo with all APIs + Lambdas
  22. 22. www.seed.runSEED Multiple environments Environments are cheap Long lived vs ephemeral Split by multiple AWS accounts
  23. 23. www.seed.runSEED dev prod dev prod feature-X Infrastructure API Services
  24. 24. www.seed.runSEED Development workflow 1. Work in a new feature branch 2. Create a PR when ready 3. Review & merge PR to master 4. Promote to Production
  25. 25. www.seed.runSEED CI/CD in the Serverless world
  26. 26. www.seed.runSEED Continuous Integration Git push triggers build Run linting & other checks Run unit tests Generate build artifacts
  27. 27. www.seed.runSEED Continuous Deployment
  28. 28. www.seed.runSEED Deploying services Dozens of services Each takes a few mins Deploy them concurrently
  29. 29. www.seed.runSEED Inter-service dependencies CloudFormation exports Order of deployments Deploy in phases
  30. 30. www.seed.runSEED Review infrastructure changes Infrastructure as code Easy to make mistakes Review change sets
  31. 31. www.seed.runSEED Ephemeral environments Many short-lived environments Branches + PRs environments Auto setup & teardown
  32. 32. www.seed.runSEED Efficient deployments Slow deployments Most common complaint Deploy only updated services Check Git log & artifact hash
  33. 33. www.seed.runSEED CodeBuild + CodePipeline
  34. 34. www.seed.runSEED CodeBuild CI service Serverless build containers Like CircleCI and Travis CI
  35. 35. www.seed.runSEED CodePipeline Manage pipelines Create multiple steps CodeBuild is one of the steps
  36. 36. www.seed.runSEED Pipeline setup www.seed.run/blog/how-to-build-a-cicd- pipeline-for-serverless-apps-with- codepipeline-and-codebuild
  37. 37. www.seed.runSEED version: 0.2 phases: install: runtime-versions: nodejs: 10 commands: - npm install -g serverless - npm install - cd $SERVICE_PATH && npm install && cd - build: commands: - cd $SERVICE_PATH && serverless deploy -s $STAGE && cd - cache: paths: - node_modules - $SERVICE_PATH/node_modules
  38. 38. www.seed.runSEED Pros Completely AWS native Runs in your account Very customizable And cheap!
  39. 39. www.seed.runSEED Cons Very complicated Lots of AWS knowledge Needs branch + PR workflow
  40. 40. www.seed.runSEED Others
  41. 41. www.seed.runSEED Travis CI Good Git workflow support Popular with OS projects Pay for concurrency CD needs manual setup
  42. 42. www.seed.runSEED CircleCI Very flexible Lots of scripting Pay for concurrency CD needs manual setup
  43. 43. SEED www.seed.run contact@seed.run twitter.com/seed_run
  44. 44. Join www.ServerlessToronto.org Home of “Less IT Mess”

×