Slide 1

Slide 1 text

Understanding the Maturity of Infrastructure as Code

Slide 2

Slide 2 text

Bruno Russi Lautenschlager ● SRE @ iFood ● AWS Community Builder ● Creator @ Rocketseat ● Pai de pet ● YouTuber linktr.ee/bruno_russi

Slide 3

Slide 3 text

What is Infrastructure as Code ● Define your infrastructure as code instead of creating it manually ● Infrastructure can be easily reproduced

Slide 4

Slide 4 text

Types of IaC Not only infrastructure ● Network as Code ● Policy as Code ● Configuration as Code ● Security as Code

Slide 5

Slide 5 text

How usually people use IaC Not on a git repository ● Create and test locally infra files ● Execute from local machine

Slide 6

Slide 6 text

How usually people use IaC I have a repository but commit and push all on main/master No Review/Approval process ● No pull requests ● No code review ● No collaboration ● No automated tests

Slide 7

Slide 7 text

How usually people use IaC Apply the infrastructure locally ● Tooling version variations from one machine to another ● Many people have access to the infrastructure ● Difficulty tracking changes ○ Hard to know who performed it and when ○ No visibility of what is being applied and what has been applied

Slide 8

Slide 8 text

How usually people use IaC No defined environment ● No development/test environment for infra ● You will find the problems only after applying

Slide 9

Slide 9 text

Infra as code is very good and has many benefits, but often the process is 💩

Slide 10

Slide 10 text

GitOps: requirements Git repository ● Version controlled ● Team collaboration Pre-commit ● Lint Process ● Docs CI/CD ● Test Process

Slide 11

Slide 11 text

Why GitOps? 1. Visibility, RFC → Pull request 2. Conformance → CI/CD Pipelines a. Unit tests b. Lint 3. Review from team → Need the approval to apply 4. Less contact with credential → Atlantis

Slide 12

Slide 12 text

Choice of path 1. Build a platform 2. Use the market platform

Slide 13

Slide 13 text

Build a platform

Slide 14

Slide 14 text

Use the market platform

Slide 15

Slide 15 text

Why platforms are the future?

Slide 16

Slide 16 text

Use Cases

Slide 17

Slide 17 text

Benefits ● Automated process ○ No tolling version variation ○ No human failures ● More transparent ○ Team collaboration ○ More quality in code ○ Any person can send a PR and propose a change ● Greater security ○ Only the pipeline has access to infra ● Centralized ○ Git is the source of truth (everything that passes is applied) ○ Just revert a commit and open an MR for rollback ○ Infra reflect what's in git

Slide 18

Slide 18 text

Demo ⚡

Slide 19

Slide 19 text

󰢨 Questions? 󰢡

Slide 20

Slide 20 text

Thanks

Slide 21

Slide 21 text

youtube.com/brunorussi

Slide 22

Slide 22 text

Reference ● https://www.runatlantis.io ● https://hub.docker.com/r/runatlantis/atlantis ● https://github.com/terraform-aws-modules/terraform-aws-atlantis ● https://github.com/msfidelis/atlantis-aws ● https://youtu.be/f5EpcWp0THw

Slide 23

Slide 23 text

No content