Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Continuous Deployment in the Cloud

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
MG
April 01, 2019

Continuous Deployment in the Cloud

In this presentation, I'm showing what is Continous Integration, Continuous Delivery and Continous Deployment. As a context, I'm using cloud microservice architecture.

MG

April 01, 2019

Transcript

43 slides
  1. Michał Górski Lead Software Engineer Northmill AB After the work:

    • Football • Fantasy Books • Cats • Tea • Traveling [email protected] michal-gorski
  2. • Where is the current state? • How to build?

    • Is it really working? • Does it compile at least? • How to deploy? Mail microservice
  3. Continuous Integration • Integrate early and often • Run on

    every commit • Keep the build green at all time • Always remember about tests!
  4. Continuous Integration • Integrate early and often • Run on

    every commit -> On feature and hotfix branches too!! • Keep the build green at all time • Always remember about tests!
  5. Continuous Integration • Write tests as part of your stories

    • Write tests when fixing bugs • Refactoring is an opportunity to add tests • Use code coverage to find untested code
  6. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Integration
  7. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Integration
  8. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Integration
  9. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Integration
  10. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Integration
  11. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Integration
  12. Infrastructure as a code { "Description" : "A text description

    for the template usage", "Parameters": { // A set of inputs used to customize the template per deployment }, "Resources" : { // The set of AWS resources and relationships between them }, "Outputs" : { // A set of values to be made visible to the stack creator }, "AWSTemplateFormatVersion" : "2010-09-09" }
  13. "InsertEmail" : { "Type" : "AWS::Serverless::Function", "Properties" : { "Runtime":

    "dotnetcore2.1", "MemorySize": 1536, "Timeout": 300, "Description": { "Inserting email to the Queue" } "Handler" : "Northmill.Mail::Northmill.Mail.InsertEmailLambda::InsertEmailAsync", "CodeUri" : "bin/Release/netcoreapp2.1/publish", "Role" : {"Fn::GetAtt" : ["LambdaBaseRole", "Arn"]} "Environment" : { "Variables" : { "MailQueueUrl" : {"Ref" : "MailQueue"}, "ConfigBucket" : {"Ref" : "ConfigBucket"} } } }
  14. "LambdaBaseRole" : { "Type" : "AWS::IAM::Role", "Properties" : { "ManagedPolicyArns"

    : [ "arn:aws:iam::aws:policy/AmazonS3FullAccess", "arn:aws:iam::aws:policy/service-role/AWSLambdaRole", "arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess" ], "AssumeRolePolicyDocument" : { "Version" : "2012-10-17", "Statement" : [{ "Effect" : "Allow", "Action" : ["sts:AssumeRole"], "Principal" : {"Service" : ["lambda.amazonaws.com"]} }] } }
  15. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Delivery
  16. Questions: • Where is the current state? • How to

    build? • Is it really working? • Does it compile at least? • How to deploy? Continuous Delivery
  17. Continuous Deployment • Strong Continuous Integration • Good test coverage

    • Real-time monitoring • Post-deployment tests • CD culture in other departments(Product, Marketing, Analytics...) • Feature Toggles
  18. Continuous Deployment • Small changes • Automate everything • Smoke

    Testing • Contract Testing • Feature Toggles • Constant flow of new features • No “Release day” problems

More Decks by MG

Other Decks in Programming