More Related Content Similar to Infraestructura como Codigo para Developers (20) Infraestructura como Codigo para Developers1. © 2022, Amazon Web Services, Inc. or its Affiliates.
AWS Security
Community
LATAM
Mario Inga Cahuana
Senior DevOps Engineer
@mario21ic
IaC para Developers
con Pulumi en AWS
2. © 2022, Amazon Web Services, Inc. or its Affiliates.
En el 2016, cambio de trabajo y rol.
Engineer Manager -> DevOps Engineer.
Migrar App Monolítica -> AWS
Pequeña historia
3. © 2022, Amazon Web Services, Inc. or its Affiliates.
Ecuador
Martin Fowler
XConf 2017
4. © 2022, Amazon Web Services, Inc. or its Affiliates.
1. Deploys a Prod. Se cayó!!
2. Arquitectura de Infra??
3. Terraform / HCL era chino!!
Qué pasó?
5. © 2022, Amazon Web Services, Inc. or its Affiliates.
1. Conocer la Arquitectura de
Infraestructura
Lecciones aprendidas
6. © 2022, Amazon Web Services, Inc. or its Affiliates.
1. Application
2. Compute (cpu, ram)
3. Network
4. Security
5. Storage
Lecciones aprendidas
7. © 2022, Amazon Web Services, Inc. or its Affiliates.
Qué es Infraestructura?
Compute Network Storage
Application
Software as a Service
(ej: Confluent kafka, Datadog, etc)
Platform as a Service
(ej: Beanstalk, Kubernetes, Heroku, etc)
Infrastructure as a Service
(ej: Aws, GCP, Azure)
Infraestructura
8. © 2022, Amazon Web Services, Inc. or its Affiliates.
Dev == Prod ?
?
9. © 2022, Amazon Web Services, Inc. or its Affiliates.
1. Evitar ClickOps en Prod.
Lecciones aprendidas
10. © 2022, Amazon Web Services, Inc. or its Affiliates.
Lecciones aprendidas
“If a human operator needs to touch your system
during normal operations, you have a bug.”
Carla Geisser, Google SRE.
Mas info https://sre.google/sre-book/eliminating-toil/
11. © 2022, Amazon Web Services, Inc. or its Affiliates.
1. .
2. DevOps team Silo == Antipatron
Lecciones aprendidas
Mas info https://web.devopstopologies.com/
12. © 2022, Amazon Web Services, Inc. or its Affiliates.
Cómo romper los Silos?
1. Fomentar la comunicación y “colaboración”
2. Crear equipos multidisciplinarios
3. Compartir responsabilidades y objetivos
4. Automatizar procesos
5. Capacitación y el aprendizaje cruzado
6. Medir y mejorar
7. Liderazgo y apoyo de la dirección
13. © 2022, Amazon Web Services, Inc. or its Affiliates.
Colaboración en CI/CD
14. © 2022, Amazon Web Services, Inc. or its Affiliates.
Colaboración en Infra(?)
Aws Cloudformation
?
15. © 2022, Amazon Web Services, Inc. or its Affiliates.
Infrastructure as Code
Best practice para gestionar el ciclo
de la Infraestructura a través del
código, en lugar de hacerlo mediante
procesos manuales.
QA
Prod
16. © 2022, Amazon Web Services, Inc. or its Affiliates.
Colaboración en Infra(?)
17. © 2022, Amazon Web Services, Inc. or its Affiliates.
● Open source
● Tiene plataforma web para gestión de proyectos
https://app.pulumi.com/
● Multiple lenguajes:
○ Python
○ Javascript
○ Typescript
○ Java
○ Go
○ C#
○ Yaml
Pulumi
18. © 2022, Amazon Web Services, Inc. or its Affiliates.
Pulumi: conceptos
● Project
● Resource
○ Input
○ Outputs
● Stack
19. © 2022, Amazon Web Services, Inc. or its Affiliates.
Pulumi: conceptos
21. © 2022, Amazon Web Services, Inc. or its Affiliates.
1. Instalar Pulumi y login:
$ curl -fsSL https://get.pulumi.com | sh
1. Instalar Python tools:
$ sudo apt install python3-venv python3-pip
1. Conectar a AWS:
$ export AWS_ACCESS_KEY_ID=****
$ export AWS_ACCESS_KEY_SECRET=****
Prerequisitos
22. © 2022, Amazon Web Services, Inc. or its Affiliates.
1. Crear proyecto:
$ pulumi new aws-python
1. Guardar estados en https://app.pulumi.com
$ pulumi login
1. Levantar Infra:
$ pulumi up
Workshop: desde cero
23. © 2022, Amazon Web Services, Inc. or its Affiliates.
Workshop: método rápido
1. Clonar repo:
$ git clone https://github.com/mario21ic/iac-workshop-aws
1. Probar:
$ cd iac-workshop-aws/basic/
$ pulumi up
24. © 2022, Amazon Web Services, Inc. or its Affiliates.
Workshop: stacks
1. Crear nuevo:
$ pulumi stack init qa
1. Seleccionar:
$ pulumi stack select dev
1. Destroy
$ pulumi destroy
25. © 2022, Amazon Web Services, Inc. or its Affiliates.
Q&A
Mario Inga Cahuana
26. © 2022, Amazon Web Services, Inc. or its Affiliates.
¡ Gracias !
@mario21ic