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

Infrastructure as Code - GitOps

Infrastructure as Code - GitOps

GitOps for Infrastructure, what does that mean ?
A must to have to do Modern Infrastructure.

Michel Hubert

October 16, 2023
Tweet

More Decks by Michel Hubert

Other Decks in Technology

Transcript

  1. ©2020 Avanade Inc. All Rights Reserved. <Highly Confidential> 1 Infrastructure

    as Code – GitOps Avanade Presentation – 13/10/2023 SAISON #1 Episode #2
  2. ©2022 Avanade Inc. All Rights Reserved. <Confidential> Agenda IaC :

    Rappel GitOps Conclusion & What’s next ? Michel Hubert Sr Dir, SA Offering Lead MAPS Loops & CI/CD
  3. ©2022 Avanade Inc. All Rights Reserved. <Confidential> 4 Why use

    Infrastructure as Code ? • Increase speed of deployment • Reduce Human errors • Enables DevOps teams to test applications in production-like environments • Optimize Costs, it’s easy to destroy non-production environment
  4. ©2022 Avanade Inc. All Rights Reserved. <Confidential> 5 X as

    Code X as Code Infrastructure as Code Network as Code Configuration as Code Security as Code Policy as Code
  5. ©2022 Avanade Inc. All Rights Reserved. <Confidential> 6 Infrastructure as

    Code the wrong way - Create & Test Locally - Execute from Local Machine NOT using Git
  6. ©2022 Avanade Inc. All Rights Reserved. <Confidential> 7 Infrastructure as

    Code the wrong way Stores Files in Repo - Version control for IaC files - Stored Centrally, where everyone can access to it No Review/Approval Process No Pull request (Merge Requests) No Code review No Collaboration No Automated tests
  7. ©2022 Avanade Inc. All Rights Reserved. <Confidential> 8 Infrastructure as

    Code Describing Infrastructure - Manual and Inefficient Process Breaking Infrastructure Breaking App Environment
  8. ©2023 Avanade Inc. All Rights Reserved. 9 GitOps ? L'approche

    GitOps repose sur l'utilisation de référentiels Git comme unique source de vérité pour distribuer l'infrastructure en tant que code.
  9. ©2022 Avanade Inc. All Rights Reserved. <Confidential> GitOps : definition

    “GitOps is an operating model pattern for cloud native applications & Kubernetes storing application & declarative infrastructure as code in Git as the source of truth used for automated continuous delivery.”
  10. ©2022 Avanade Inc. All Rights Reserved. <Confidential> “Treat Infrastructure as

    Code the same as Application Code” GitOps 11 Application Infrastructure
  11. ©2022 Avanade Inc. All Rights Reserved. <Confidential> Build Tests Security

    Scan Package Deploy Monitor Developer Cycles Code Compile Debug Commit Inner Loop Outer Loop
  12. ©2022 Avanade Inc. All Rights Reserved. <Confidential> Build Tests Security

    Scan Package Deploy Monitor Developer Cycles Code Compile Debug Commit Inner Loop Outer Loop Purchase Device Setup Environment Setup Onboarding Phase
  13. ©2022 Avanade Inc. All Rights Reserved. <Confidential> GitOps uses merge

    requests (MRs) as the change mechanism for all infrastructure updates GitOps – Pull / Merge Request 16
  14. ©2022 Avanade Inc. All Rights Reserved. <Confidential> Trunk Based Development

    Single Branch Feature Branch One Branch per feature Forking Strategy Forking repositories Release Branching One branch per release Git Flow Branches, branches, … Environment Branching GitOps – Branches strategy 17
  15. ©2022 Avanade Inc. All Rights Reserved. <Confidential> • CI Pipeline

    validates the codes/configuration files • Executes automated tests • Generate output ready to deploy GitOps – CI Pipeline 18
  16. ©2022 Avanade Inc. All Rights Reserved. <Confidential> Deployments are completely

    automated In case of issue, it’s easy to rollback to previous stable commit/version GitOps – CD Pipeline 19
  17. ©2022 Avanade Inc. All Rights Reserved. <Confidential> 1. Automated process

    (Golden Path) 2. More Transparent 3. Quality IaC (secure) 4. Collaboration Benefits of GitOps 20
  18. ©2022 Avanade Inc. All Rights Reserved. <Confidential> GitOps – Push

    vs Pull deployment 22 Environment Push Pull Environment Agent Agent is installed in the environment Monitors and compares desired state with actual state
  19. ©2022 Avanade Inc. All Rights Reserved. <Confidential> It is a

    game changer Managing infrastructure has long been treated differently from the applications they run. There is a common division of labor between infrastructure and applications. Updates to applications are more frequent and often get more attention from CI/CD. The underlying infrastructure is often left in a set once and forget model. Automating infrastructure in a fully-GitOps compliant way is difficult so it is left behind and treated differently than the application layer. Infrastructure-as-Apps