# mbergarap/cloud architecture

> Architecture diagram of the GitHub repository mbergarap/cloud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mbergarap/cloud
- Repository: https://github.com/mbergarap/cloud

## Overview

El repositorio automatiza el despliegue y operación de Online Boutique en AWS: un operador ejecuta Terraform, que configura la infraestructura y finaliza Kubernetes; el tráfico llega por el ALB a la aplicación. Las ramas principales cubren red y cómputo resiliente, almacenamiento y respaldos, y observabilidad. Las relaciones se basan en el README; no se inspeccionó el código Terraform ni los manifiestos, así que se omiten detalles de llamadas internas no documentados allí.

Main entry points: [`terraform`](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform) (Terraform raíz), [`terraform/modules/compute`](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/compute) (Nodos K3s y ALB), [`terraform/automatizacion.tf`](https://github.com/mbergarap/cloud/blob/isc-obligatorio/terraform/automatizacion.tf) (Finalización Kubernetes), [`kubernetes/app.yaml`](https://github.com/mbergarap/cloud/blob/isc-obligatorio/kubernetes/app.yaml) (Online Boutique)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provisioning["Despliegue"]
  node_terraform["Terraform raíz"]
  node_automation["Finalización Kubernetes<br/>[automatizacion.tf]"]
end

subgraph group_platform["Plataforma AWS"]
  node_network["Red VPC"]
  node_security["Grupos de seguridad"]
  node_compute["Nodos K3s y ALB"]
end

subgraph group_workload["Aplicación"]
  node_kubernetes["Manifiestos y escalado<br/>[app.yaml]"]
  node_boutique["Online Boutique<br/>[app.yaml]"]
end

subgraph group_state["Datos y respaldo"]
  node_redis[("Redis carrito<br/>[app.yaml]")]
  node_efs[("EFS persistente")]
  node_backup["AWS Backup"]
  node_etcdbackup["Snapshots etcd<br/>[automatizacion.tf]"]
  node_snapshotbucket[("Bucket de snapshots")]
end

subgraph group_operations["Observabilidad"]
  node_logging["Logs centralizados"]
  node_monitoring["Alarmas y dashboard"]
end

node_operator(("Operador"))
node_aws{{"Servicios AWS"}}
node_visitor(("Usuario web"))

node_operator -->|"ejecuta apply"| node_terraform
node_terraform -->|"configura red"| node_network
node_terraform -->|"configura seguridad"| node_security
node_terraform -->|"configura cómputo"| node_compute
node_terraform -->|"configura almacenamiento"| node_efs
node_terraform -->|"configura respaldos"| node_backup
node_terraform -->|"configura logs"| node_logging
node_terraform -->|"configura monitoreo"| node_monitoring
node_terraform -->|"invoca finalización"| node_automation
node_automation -->|"crea bucket"| node_etcdbackup
node_automation -->|"aplica manifiestos"| node_kubernetes
node_network -->|"provisiona recursos"| node_aws
node_security -->|"aplica reglas"| node_aws
node_compute -->|"provisiona EC2 y ALB"| node_aws
node_kubernetes -->|"despliega"| node_boutique
node_visitor -->|"envía HTTP"| node_compute
node_compute -->|"dirige tráfico"| node_boutique
node_boutique -->|"usa carrito"| node_redis
node_redis -->|"persiste AOF"| node_efs
node_backup -->|"respalda diario"| node_efs
node_etcdbackup -->|"copia snapshots"| node_snapshotbucket
node_logging -->|"envía a CloudWatch"| node_aws
node_monitoring -->|"usa CloudWatch y SNS"| node_aws

click node_terraform "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform"
click node_automation "https://github.com/mbergarap/cloud/blob/isc-obligatorio/terraform/automatizacion.tf"
click node_network "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/network"
click node_security "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/security"
click node_compute "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/compute"
click node_kubernetes "https://github.com/mbergarap/cloud/blob/isc-obligatorio/kubernetes/app.yaml"
click node_boutique "https://github.com/mbergarap/cloud/blob/isc-obligatorio/kubernetes/app.yaml"
click node_redis "https://github.com/mbergarap/cloud/blob/isc-obligatorio/kubernetes/app.yaml"
click node_efs "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/storage"
click node_backup "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/storage"
click node_etcdbackup "https://github.com/mbergarap/cloud/blob/isc-obligatorio/terraform/automatizacion.tf"
click node_snapshotbucket "https://github.com/mbergarap/cloud/blob/isc-obligatorio/terraform/scripts/crear-bucket-etcd.ps1"
click node_logging "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/logging"
click node_monitoring "https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/monitoring"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_terraform,node_automation toneBlue
class node_network,node_security,node_compute toneAmber
class node_kubernetes,node_boutique toneMint
class node_redis,node_efs,node_backup,node_etcdbackup,node_snapshotbucket toneRose
class node_logging,node_monitoring,node_operator,node_aws,node_visitor toneIndigo
```

## Components

### Despliegue

- [Terraform raíz](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform): `terraform`
- [Finalización Kubernetes](https://github.com/mbergarap/cloud/blob/isc-obligatorio/terraform/automatizacion.tf): `terraform/automatizacion.tf`

### Plataforma AWS

- [Red VPC](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/network): `terraform/modules/network`
- [Grupos de seguridad](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/security): `terraform/modules/security`
- [Nodos K3s y ALB](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/compute): `terraform/modules/compute`

### Aplicación

- [Manifiestos y escalado](https://github.com/mbergarap/cloud/blob/isc-obligatorio/kubernetes/app.yaml): `kubernetes/app.yaml`
- [Online Boutique](https://github.com/mbergarap/cloud/blob/isc-obligatorio/kubernetes/app.yaml): `kubernetes/app.yaml`

### Datos y respaldo

- [Redis carrito](https://github.com/mbergarap/cloud/blob/isc-obligatorio/kubernetes/app.yaml): `kubernetes/app.yaml`
- [EFS persistente](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/storage): `terraform/modules/storage`
- [AWS Backup](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/storage): `terraform/modules/storage`
- [Snapshots etcd](https://github.com/mbergarap/cloud/blob/isc-obligatorio/terraform/automatizacion.tf): `terraform/automatizacion.tf`
- [Bucket de snapshots](https://github.com/mbergarap/cloud/blob/isc-obligatorio/terraform/scripts/crear-bucket-etcd.ps1): `terraform/scripts/crear-bucket-etcd.ps1`

### Observabilidad

- [Logs centralizados](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/logging): `terraform/modules/logging`
- [Alarmas y dashboard](https://github.com/mbergarap/cloud/tree/isc-obligatorio/terraform/modules/monitoring): `terraform/modules/monitoring`

### Other components

- **Operador**
- **Servicios AWS**
- **Usuario web**

## Connections

- Operador → Terraform raíz: ejecuta apply (evidence: `README.md`)
- Terraform raíz → Red VPC: configura red (evidence: `README.md`)
- Terraform raíz → Grupos de seguridad: configura seguridad (evidence: `README.md`)
- Terraform raíz → Nodos K3s y ALB: configura cómputo (evidence: `README.md`)
- Terraform raíz → EFS persistente: configura almacenamiento (evidence: `README.md`)
- Terraform raíz → AWS Backup: configura respaldos (evidence: `README.md`)
- Terraform raíz → Logs centralizados: configura logs (evidence: `README.md`)
- Terraform raíz → Alarmas y dashboard: configura monitoreo (evidence: `README.md`)
- Terraform raíz → Finalización Kubernetes: invoca finalización (evidence: `README.md`)
- Finalización Kubernetes → Snapshots etcd: crea bucket (evidence: `README.md`)
- Finalización Kubernetes → Manifiestos y escalado: aplica manifiestos (evidence: `README.md`)
- Red VPC → Servicios AWS: provisiona recursos (evidence: `README.md`)
- Grupos de seguridad → Servicios AWS: aplica reglas (evidence: `README.md`)
- Nodos K3s y ALB → Servicios AWS: provisiona EC2 y ALB (evidence: `README.md`)
- Manifiestos y escalado → Online Boutique: despliega (evidence: `README.md`)
- Usuario web → Nodos K3s y ALB: envía HTTP (evidence: `README.md`)
- Nodos K3s y ALB → Online Boutique: dirige tráfico (evidence: `README.md`)
- Online Boutique → Redis carrito: usa carrito (evidence: `README.md`)
- Redis carrito → EFS persistente: persiste AOF (evidence: `README.md`)
- AWS Backup → EFS persistente: respalda diario (evidence: `README.md`)
- Snapshots etcd → Bucket de snapshots: copia snapshots (evidence: `README.md`)
- Logs centralizados → Servicios AWS: envía a CloudWatch (evidence: `README.md`)
- Alarmas y dashboard → Servicios AWS: usa CloudWatch y SNS (evidence: `README.md`)
