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

Deploy AWS applications with PipeCD

6667ced26238a690300f9f9ff94eecb0?s=47 Khanh Tran
October 29, 2021

Deploy AWS applications with PipeCD

My talk at JAWSUG-container Connpass event #20. Content includes an overview of PipeCD - a Gitops based continuous delivery tool and a detailed example of using PipeCD to deploy services to AWS ECS.

6667ced26238a690300f9f9ff94eecb0?s=128

Khanh Tran

October 29, 2021
Tweet

Transcript

  1. PipeCD ❤ AWS Control your AWS applications deployment in GitOps

    style with PipeCD. khanhtc1202 Developer Productivity Div, CyberAgent, Inc. Presents
  2. About me 2 @khanhtc1202 @khanhtc1202

  3. Agenda • What and why we need • PipeCD •

    Progressive deployment for AWS ECS applications • PipeCD’s enterprise features • Roadmap • ... 3
  4. 4 What/why we need

  5. What & why we need - An end-to-end solution -

    Progressive delivery: Canary, Blue/Green, Rollout - Automated analysis: metrics, log, smoke test - A unified solution cross cloudplatform and application kind - Decrease onboarding costs - Improve developer experience - One delivery infrastructure for multiple deployment targets (Kubernetes, Terraform, AWS ECS, AWS Lambda, …) And we need a CD tool, not the CI tool which does the CICD tasks
  6. Importance of CD Commit Changes Build Test Staging Production Continuous

    Integration and Delivery(CI/CD) Continuous Delivery(CD) Commit Changes Build Test Staging Production Continuous Integration(CI) Artifacts
  7. 7

  8. PipeCD

  9. PipeCD ❤ OSS

  10. PipeCD overview ref: https://pipecd.dev/docs/operator-manual/ platform team product team

  11. PipeCD overview - platform team ref: https://pipecd.dev/docs/operator-manual/control-plane/installation/ Controlplane main components

    - All stateless components (servers, cache, ops) - Managed services: Datastore (RDS,...) and Filestore (S3) => Low maintenance cost - Easy to get start with just Helm - Optional: components for monitoring (prometheus, grafana) - monitoring both controlpane and pipeds
  12. PipeCD overview - product team ref: https://pipecd.dev/docs/operator-manual/piped/installation/ Platform team space

    Support all possible places • k8s pod • ECS Fargate task • CloudRun • ... - All credentials stored in product team cluster (controlplane stores nothing related to the product) - Only outbound requests (no expose ports required)
  13. PipeCD overview - product team

  14. PipeCD overview - product team - Simple UI - Stage

    logs - Clear workflow
  15. 15 Progressive Deployment for ECS

  16. How do we do progressively ref: AWS Blog: Blue Green

    Deployment What do we need to prepare?? - ALB (Listener, Targetgroup) - Cluster - TaskDefinition - Service & tons of scripts to register/create above entities...
  17. AWS ECS deployment with Codedeploy ref: Codedeploy tutorial - Customizable

    stage 👍 - Simple UI 👍 - External stage (such as deployment based on analysis) ?
  18. AWS ECS deployment with Jenkins ref: AWS Blog: Blue Green

    Deployment Human approval? Auto rollback? Error rate based deploy? ...
  19. 19 Progressive Deployment for ECS with PipeCD

  20. Piped - an agent to deploy applications ref: PipeCD user

    guide Register a piped agent from the console
  21. Piped - an agent to deploy applications ref: Piped configuration

    Require a simple configuration which contains: - Piped credentials - Registered controlplane - Gitops credentials (ssh key, repositories) - Cloudprovider
  22. PipeCD application ref: PipeCD user guide Application can be one

    of: - Kubernetes - AWS ECS - AWS Lambda - Terraform - Cloudrun (gcp)
  23. Deployment configuration ref: Configure ECS deployment Require a simple configuration

    which define the PipeD behavior: - Kind (ECSApp for instance) - Input: contains ECS required configuration: task definition, service definition, targetGroup - Pipeline: contains deployment flow Note: - all configurations stored in Git - can reuse task definition and service definition as it is - no changes or PipeCD specified syntax required
  24. Deployment configuration 24 The UI visualizes the state of the

    application in real time and clearly shows what happened at what timing
  25. Bonus - LambdaApp 25 AWS Lambda Find more examples at

    pipecd/examples
  26. Bonus - LambdaApp 26 AWS Lambda Find more examples at

    pipecd/examples
  27. Bonus - KubernetesApp 27 AWS EKS Find more examples at

    pipecd/examples
  28. Bonus - KubernetesApp Application detail view: show state of currently

    running resources Find more examples at pipecd/examples
  29. 29 PipeCD’s enterprise features

  30. PipeCD’s enterprise features - Event wacher 30 Continuous Delivery(CD) Commit

    Changes Build Test Staging Production Continuous Integration(CI) Artifacts Event watcher Define how Piped handle an event and trigger the event from CI => Piped will update the configuration by itself via PR => trigger deployment ref: PipeCD eventwatcher We also use pipecd to deploy our pipecd development controlplane 😉
  31. PipeCD’s enterprise features - Plan preview 31 ref: PipeCD plan-preview

    Enable to preview what will be applied/changed in your cluster at the pull request review step (the CD is not yet triggered - no deployment yet)
  32. PipeCD’s enterprise features 32 Automated Deployment Analysis (ADA) Configuration Drift

    Detection
  33. PipeCD’s enterprise features - Insights 33

  34. 34 PipeCD’s roadmap

  35. Roadmap - Deployment chains 35

  36. 36 Continuous Delivery Solution for any application on any platform

  37. pipe-cd/pipe @pipecd_dev 37 https://pipecd.dev/

  38. 38 Thank you! PipeCD OSSのBackendとFrontendのフルタイム・副業(時間の制限なし)を募集しています ご興味がある方、TwitterのDMなどご連絡ください