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

Deploy AWS applications with PipeCD

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.

Khanh Tran

October 29, 2021
Tweet

Other Decks in Technology

Transcript

  1. PipeCD ❤ AWS
    Control your AWS applications deployment in
    GitOps style with PipeCD.
    khanhtc1202
    Developer Productivity Div, CyberAgent, Inc. Presents

    View full-size slide

  2. About me
    2
    @khanhtc1202
    @khanhtc1202

    View full-size slide

  3. Agenda
    ● What and why we need
    ● PipeCD
    ● Progressive deployment for AWS ECS applications
    ● PipeCD’s enterprise features
    ● Roadmap
    ● ...
    3

    View full-size slide

  4. 4
    What/why we need

    View full-size slide

  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

    View full-size slide

  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

    View full-size slide

  7. PipeCD ❤ OSS

    View full-size slide

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

    View full-size slide

  9. 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

    View full-size slide

  10. 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)

    View full-size slide

  11. PipeCD overview - product team

    View full-size slide

  12. PipeCD overview - product team
    - Simple UI
    - Stage logs
    - Clear workflow

    View full-size slide

  13. 15
    Progressive
    Deployment
    for ECS

    View full-size slide

  14. 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...

    View full-size slide

  15. AWS ECS deployment with Codedeploy
    ref: Codedeploy tutorial
    - Customizable stage 👍
    - Simple UI 👍
    - External stage (such as
    deployment based on
    analysis) ?

    View full-size slide

  16. AWS ECS deployment with Jenkins
    ref: AWS Blog: Blue Green Deployment
    Human approval?
    Auto rollback?
    Error rate based deploy?
    ...

    View full-size slide

  17. 19
    Progressive
    Deployment
    for ECS
    with PipeCD

    View full-size slide

  18. Piped - an agent to deploy applications
    ref: PipeCD user guide
    Register a piped agent from
    the console

    View full-size slide

  19. 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

    View full-size slide

  20. PipeCD application
    ref: PipeCD user guide
    Application can be one of:
    - Kubernetes
    - AWS ECS
    - AWS Lambda
    - Terraform
    - Cloudrun (gcp)

    View full-size slide

  21. 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

    View full-size slide

  22. Deployment configuration
    24
    The UI visualizes the state of the application in real time and clearly shows what
    happened at what timing

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  26. Bonus - KubernetesApp
    Application detail
    view:
    show state of
    currently running
    resources
    Find more examples at pipecd/examples

    View full-size slide

  27. 29
    PipeCD’s
    enterprise
    features

    View full-size slide

  28. 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 😉

    View full-size slide

  29. 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)

    View full-size slide

  30. PipeCD’s enterprise features
    32
    Automated Deployment Analysis
    (ADA)
    Configuration Drift Detection

    View full-size slide

  31. PipeCD’s enterprise features - Insights
    33

    View full-size slide

  32. 34
    PipeCD’s
    roadmap

    View full-size slide

  33. Roadmap - Deployment chains
    35

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide