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

DevOps in practice for beginners

DevOps in practice for beginners

Learn about the principles, methodologies, and tools that can help you build & operate your applications. Throughout demos, learn about case studies & industry best practices. Discover the importance of Infrastructure as Code, CI/CD, Continuous Configuration, and Observability and Monitoring

This session is designed as a journey. We will start with real world example of building serverless APIs. Then, we will continue to implement IaC and CI/CD for multiple environments using Continous Delivery with manual approval. We will also walkthrough how you can implement feature flags by using Continous Configuration. Lastly, we will review how to implement Observability and Monitoring to understood what’s happening under the hood of the application.

DevOpsDays Singapore

December 14, 2024
Tweet

More Decks by DevOpsDays Singapore

Other Decks in Technology

Transcript

  1. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. DevOps in Practice for Beginners Donnie Prakoso Principal Developer Advocate Amazon Web Services go.donnie.id/youtube donnieprakoso @donnieprakoso donnieprakoso
  2. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Teams that adopt modern software practices are more agile and higher performing Source: 2019 DORA State of DevOps report Teams who automate software delivery with continuous delivery: DEPLOYMENT FREQUENCY Weekly–mo nthly Hourly–dail y CHANGE LEAD TIME 1–6 months 1–7 days CHANGE FAILURE RATE 46–60% 0%–15%
  3. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. So why hasn’t everyone already moved to DevOps? Too difficult to get started Need to glue together too many services 1 2 3 4 Not enough centralized oversight Sift through all the vendors Lack internal expertise 3
  4. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Today, We Are Going to Discuss... CI/CD Infrastructur e as Code Continuous Configuration
  5. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Infrastructure as 🡪 is code
  6. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Treat Infrastructure The Same Way Developers Treat Codes
  7. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Infrastructure as 🡪 is Code 1. Make infrastructure changes repeatable and predictable 2. Release infrastructure changes using the same tools as code changes 3. Replicate production environment in a staging environment to enable continuous testing
  8. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Let’s start with a simple task Build Serverless APIs Build a set of serverless APIs to process string operations from text input. We also need to save the request data into a database.
  9. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon EC2 Amazon S3 AWS Transit Gateway Amazon Kinesis Amazon Kendra Hundreds of AWS and third-party resources AWS Proton AWS Amplify AWS Service Catalog AWS CloudFormation AWS CloudFormation resource registry AWS Cloud Control API AWS CDK & AWS SAM Platform operations and deployment AWS IaC portfolio at a glance
  10. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “Which tools should I use?”
  11. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. The most practical answer... Declarative High-level programming languages AWS CDK AWS CloudFormation
  12. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS Cloud Development Kit (CDK) A multi-language software development framework for modeling cloud infrastructure as reusable components Familiar Your language – just code Tool support Autocomplete – inline documentation Abstraction Sane defaults – reusable classes Java
  13. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Development Workflow CDK CLI AWS CloudFormation Stacks & Constructs Source Code Templates + Assets Cloud Assembly Cloud Resources execute synthesize deploy provision 📙 cdk init 🛠 npm run build 🧬 cdk synth 🔎 cdk diff 🚀 cdk deploy // create new project // build project // create templates and assets // check what will change // push changes to your account
  14. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. But, we need to build multiple app environments Configure multiple environments for previous serverless APIs. Deploy the same stack for environments: Maintain dev/prod parity.
  15. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “But, I use Terraform.”
  16. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. CDK for Terraform (cdktf) Synthesize Terraform JSON configuration
  17. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Converting existing resources into IaC AWS CLOUDFORMATION IAC GENERATOR The IaC generation process consists of several steps: 1. Start a scan of your account. 2. Create a template 3. Add scanned resources 4. Import the resources to be managed by CloudFormation as a stack or migrate them into an AWS CDK app. AWS CloudFormation AWS Resource s IaC Generator Template s Deploy
  18. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Importing existing resources into AWS CDK AWS CLOUDFORMATION IAC GENERATOR What to migrate? • Resources created outside of IaC • A deployed CloudFormation Stack cdk migrate • Migrate one or many resources into a new CDK application cdk import • Reuse existing CDK application and import one or many resources that were created outside of the CDK AWS Resource s AWS Resource s Existing CDK app cdk deploy New CDK app cdk import cdk migrate
  19. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Decoupling Configurations from Applications Build Process Application Source Code Config Releas e Artifact
  20. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Release process stages Source Build Test Deployment Continuous integration Continuous deployment Continuous delivery
  21. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. CDK Pipelines A construct library for painless Continuous Delivery of CDK applications. • Extends Stack ability to implement CI/CD • Deployment for multiple environments • Define Stage 🡪 Pipeline 🡪 Deploy • Self-mutating • Support multiple deployment engines
  22. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Implement CI/CD with CDK Pipelines Building Release Pipeline Automate deployment when a new code is pushed and self-mutating infrastructure in an application environment
  23. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Continuous Delivery for Multi-Envs CI/CD for Multi-Envs Create a release pipeline that self-mutates and triggered when a new code is pushed. Implement continuous deployment in the staging environment and continuous delivery (with manual approval) for production.
  24. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. What’s next? Unlock developer velocity with a self-service infrastructure ECS Cluster 2 Migrate to modern best practices faster by configuring AWS Proton for seamless infrastructure deployments and updates Platform engineers create infrastructure templates and environments 1 Developers select versioned service templates to deploy and maintain their application 2 3 Platform engineers have centralized visibility and version management ECS Cluster 1 AWS Proton 30
  25. © 2024, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Thank you! Donnie Prakoso Principal Developer Advocate AWS 31 go.donnie.id/youtube donnieprakoso @donnieprakoso donnieprakoso