Slide 1

Slide 1 text

©2020 Avanade Inc. All Rights Reserved. 1 Infrastructure as Code – GitOps Avanade Presentation – 13/10/2023 SAISON #1 Episode #2

Slide 2

Slide 2 text

©2022 Avanade Inc. All Rights Reserved. Agenda IaC : Rappel GitOps Conclusion & What’s next ? Michel Hubert Sr Dir, SA Offering Lead MAPS Loops & CI/CD

Slide 3

Slide 3 text

©2022 Avanade Inc. All Rights Reserved. * As Code « Every is software »

Slide 4

Slide 4 text

©2022 Avanade Inc. All Rights Reserved. 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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

©2022 Avanade Inc. All Rights Reserved. 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

Slide 8

Slide 8 text

©2022 Avanade Inc. All Rights Reserved. 8 Infrastructure as Code Describing Infrastructure - Manual and Inefficient Process Breaking Infrastructure Breaking App Environment

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

©2022 Avanade Inc. All Rights Reserved. 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.”

Slide 11

Slide 11 text

©2022 Avanade Inc. All Rights Reserved. “Treat Infrastructure as Code the same as Application Code” GitOps 11 Application Infrastructure

Slide 12

Slide 12 text

©2022 Avanade Inc. All Rights Reserved. GitOps = Git + IaC + MR + CI/CD 12

Slide 13

Slide 13 text

©2022 Avanade Inc. All Rights Reserved. Developer Cycles Code Compile Debug Commit Inner Loop

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

©2022 Avanade Inc. All Rights Reserved. Build Tests Security Scan Package Deploy Monitor Developer Cycles Code Compile Debug Commit Inner Loop Outer Loop Purchase Device Setup Environment Setup Onboarding Phase

Slide 16

Slide 16 text

©2022 Avanade Inc. All Rights Reserved. GitOps uses merge requests (MRs) as the change mechanism for all infrastructure updates GitOps – Pull / Merge Request 16

Slide 17

Slide 17 text

©2022 Avanade Inc. All Rights Reserved. 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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

©2022 Avanade Inc. All Rights Reserved. Deployments are completely automated In case of issue, it’s easy to rollback to previous stable commit/version GitOps – CD Pipeline 19

Slide 20

Slide 20 text

©2022 Avanade Inc. All Rights Reserved. 1. Automated process (Golden Path) 2. More Transparent 3. Quality IaC (secure) 4. Collaboration Benefits of GitOps 20

Slide 21

Slide 21 text

©2022 Avanade Inc. All Rights Reserved. GitOps – Push vs Pull deployment 21 Environment Push

Slide 22

Slide 22 text

©2022 Avanade Inc. All Rights Reserved. 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

Slide 23

Slide 23 text

©2022 Avanade Inc. All Rights Reserved. CD Sample 23

Slide 24

Slide 24 text

Conclusion What’s next ?

Slide 25

Slide 25 text

©2022 Avanade Inc. All Rights Reserved. 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