|
1 | 1 | # Demo DevOps Python Application
|
2 | 2 |
|
3 |
| -Este repositorio contiene una simple aplicación Django que demuestra varias prácticas de DevOps. La aplicación se despliega en un clúster de Kubernetes utilizando Helm y GitHub Actions para los pipelines de CI/CD. |
| 3 | +This repository contains a simple Django application that demonstrates various DevOps practices. The application is deployed on a Kubernetes cluster using Helm and GitHub Actions for CI/CD pipelines. |
4 | 4 |
|
5 | 5 | ## Table of Contents
|
6 |
| -- [Arquitectura](#arquitectura) |
7 |
| -- [Instrucciones de Configuración](#instrucciones-de-configuración) |
8 |
| -- [Pipelines de CI/CD](#pipelines-de-ci-cd) |
9 |
| -- [Despliegue en Kubernetes](#despliegue-en-kubernetes) |
10 |
| -- [Infraestructura como Código](#infraestructura-como-código) |
11 |
| -- [Monitoreo y Logging](#monitoreo-y-logging) |
12 |
| -- [Contribuyendo](#contribuyendo) |
13 |
| -- [Licencia](#licencia) |
| 6 | +- [Architecture](#architecture) |
| 7 | +- [Setup Instructions](#setup-instructions) |
| 8 | +- [CI/CD Pipelines](#ci-cd-pipelines) |
| 9 | +- [Kubernetes Deployment](#kubernetes-deployment) |
| 10 | +- [Infrastructure as Code](#infrastructure-as-code) |
| 11 | +- [Monitoring and Logging](#monitoring-and-logging) |
| 12 | +- [Contributing](#contributing) |
| 13 | +- [License](#license) |
14 | 14 |
|
15 |
| -## Arquitectura |
| 15 | +## Architecture |
16 | 16 |
|
17 |
| -La API de Django se despliega en un clúster de Kubernetes con los siguientes componentes: |
18 |
| -- **Deployment**: La API se despliega con 2 réplicas, gestionadas por un Horizontal Pod Autoscaler (HPA) que puede escalar hasta 3 réplicas. |
19 |
| -- **Service Account**: Se utiliza una cuenta de servicio básica para seguir los estándares de seguridad. |
20 |
| -- **LoadBalancer**: Expone la API al mundo, accesible a través del dominio `https://api.algova.dev`. |
21 |
| -- **DNS y SSL**: Gestionados utilizando Route53 y Let's Encrypt. El dominio `api.algova.dev` apunta al LoadBalancer con renovación automática de certificados SSL. |
22 |
| -- **Archivos Estáticos**: Servidos desde un bucket de S3 con configuraciones ACL adecuadas. |
| 17 | +The Django API is deployed on a Kubernetes cluster with the following components: |
| 18 | +- **Deployment**: The API is deployed with 2 replicas, managed by a Horizontal Pod Autoscaler (HPA) that can scale up to 3 replicas. |
| 19 | +- **Service Account**: A basic service account is used to follow security standards. |
| 20 | +- **LoadBalancer**: Exposes the API to the world, accessible via the domain `https://api.algova.dev`. |
| 21 | +- **DNS and SSL**: Managed using Route53 and Let's Encrypt. The domain `api.algova.dev` points to the LoadBalancer with automatic SSL certificate renewal. |
| 22 | +- **Static Files**: Served from an S3 bucket with proper ACL configurations. |
23 | 23 |
|
24 |
| - |
| 24 | + |
25 | 25 |
|
26 |
| -## Instrucciones de Configuración |
| 26 | +## Setup Instructions |
27 | 27 |
|
28 |
| -1. **Clonar el Repositorio**: |
| 28 | +1. **Clone the Repository**: |
29 | 29 | ```bash
|
30 | 30 | git clone https://github.com/Adriana618/devops-deemo.git
|
31 | 31 | cd devops-deemo
|
32 | 32 | ```
|
33 | 33 |
|
34 |
| -2. **Instalar Dependencias**: |
| 34 | +2. **Install Dependencies**: |
35 | 35 | ```bash
|
36 | 36 | sudo apt-get update
|
37 | 37 | sudo apt-get install -y python3 python3-pip docker.io kubectl minikube
|
38 | 38 | pip3 install -r requirements.txt
|
39 | 39 | ```
|
40 | 40 |
|
41 |
| -3. **Dockerizar la Aplicación**: |
42 |
| - - Dockerfile ubicado en [`docker-conf/Dockerfile-django-api`](https://github.com/Adriana618/devops-deemo/blob/master/docker-conf/Dockerfile-django-api){:target="_blank"} |
| 41 | +3. **Dockerize the Application**: |
| 42 | + - Dockerfile located at <a href="https://github.com/Adriana618/devops-deemo/blob/master/docker-conf/Dockerfile-django-api" target="_blank">docker-conf/Dockerfile-django-api</a> |
43 | 43 |
|
44 |
| -## Pipelines de CI/CD |
| 44 | +## CI/CD Pipelines |
45 | 45 |
|
46 | 46 | ### Deploy API
|
47 |
| -Este GitHub Action despliega los commits mergeados en la rama `master` a un clúster de Kubernetes en DigitalOcean. |
| 47 | +This GitHub Action deploys commits merged into the `master` branch to a Kubernetes cluster on DigitalOcean. |
48 | 48 |
|
49 |
| -Ver el archivo [`.github/workflows/deploy.yml`](https://github.com/Adriana618/devops-deemo/blob/master/.github/workflows/deploy.yml){:target="_blank"} |
| 49 | +See the file <a href="https://github.com/Adriana618/devops-deemo/blob/master/.github/workflows/deploy.yml" target="_blank">.github/workflows/deploy.yml</a> |
50 | 50 |
|
51 | 51 | ### Test PR
|
52 |
| -Este GitHub Action prueba las pull requests ejecutando análisis de código estático, cobertura de código y análisis de vulnerabilidades. |
| 52 | +This GitHub Action tests pull requests by running static code analysis, code coverage, and vulnerability scans. |
53 | 53 |
|
54 |
| -Ver el archivo [`.github/workflows/test-pr.yml`](https://github.com/Adriana618/devops-deemo/blob/master/.github/workflows/test-pr.yml){:target="_blank"} |
| 54 | +See the file <a href="https://github.com/Adriana618/devops-deemo/blob/master/.github/workflows/test-pr.yml" target="_blank">.github/workflows/test-pr.yml</a> |
55 | 55 |
|
56 |
| -## Despliegue en Kubernetes |
| 56 | +## Kubernetes Deployment |
57 | 57 |
|
58 |
| -### Configuración del Deployment |
59 |
| -Ver el archivo [`k8s/deployment.yaml`](https://github.com/Adriana618/devops-deemo/blob/master/k8s/deployment.yaml){:target="_blank"} |
| 58 | +### Deployment Configuration |
| 59 | +See the file <a href="https://github.com/Adriana618/devops-deemo/blob/master/k8s/deployment.yaml" target="_blank">k8s/deployment.yaml</a> |
60 | 60 |
|
61 |
| -### Configuración del Service |
62 |
| -Ver el archivo [`k8s/service.yaml`](https://github.com/Adriana618/devops-deemo/blob/master/k8s/service.yaml){:target="_blank"} |
| 61 | +### Service Configuration |
| 62 | +See the file <a href="https://github.com/Adriana618/devops-deemo/blob/master/k8s/service.yaml" target="_blank">k8s/service.yaml</a> |
63 | 63 |
|
64 |
| -### ConfigMap y Secrets |
65 |
| -Ver los archivos [`k8s/configmap.yaml`](https://github.com/Adriana618/devops-deemo/blob/master/k8s/configmap.yaml){:target="_blank") y [`k8s/secret.yaml`](https://github.com/Adriana618/devops-deemo/blob/master/k8s/secret.yaml){:target="_blank"} |
| 64 | +### ConfigMap and Secrets |
| 65 | +See the files <a href="https://github.com/Adriana618/devops-deemo/blob/master/k8s/configmap.yaml" target="_blank">k8s/configmap.yaml</a> and <a href="https://github.com/Adriana618/devops-deemo/blob/master/k8s/secret.yaml" target="_blank">k8s/secret.yaml</a> |
66 | 66 |
|
67 |
| -### Configuración de Ingress |
68 |
| -Ver el archivo [`k8s/ingress.yaml`](https://github.com/Adriana618/devops-deemo/blob/master/k8s/ingress.yaml){:target="_blank"} |
| 67 | +### Ingress Configuration |
| 68 | +See the file <a href="https://github.com/Adriana618/devops-deemo/blob/master/k8s/ingress.yaml" target="_blank">k8s/ingress.yaml</a> |
69 | 69 |
|
70 |
| -## Infraestructura como Código |
| 70 | +## Infrastructure as Code |
71 | 71 |
|
72 |
| -Usando Terraform, la infraestructura se provisiona en AWS: |
| 72 | +Using Terraform, the infrastructure is provisioned on AWS: |
73 | 73 |
|
74 |
| -Ver el archivo [`terraform/main.tf`](https://github.com/Adriana618/devops-deemo/blob/master/terraform/main.tf){:target="_blank"} |
| 74 | +See the file <a href="https://github.com/Adriana618/devops-deemo/blob/master/terraform/main.tf" target="_blank">terraform/main.tf</a> |
75 | 75 |
|
76 |
| -## Monitoreo y Logging |
| 76 | +## Monitoring and Logging |
77 | 77 |
|
78 |
| -La aplicación se monitorea usando Prometheus y Grafana, con logs centralizados en el stack ELK. |
| 78 | +The application is monitored using Prometheus and Grafana, with logs centralized in the ELK stack. |
79 | 79 |
|
80 |
| -## Contribuyendo |
| 80 | +## Contributing |
81 | 81 |
|
82 |
| -Por favor, sigue las [directrices de contribución](CONTRIBUTING.md) para proponer mejoras o reportar problemas. |
| 82 | +Please follow the <a href="https://github.com/Adriana618/devops-deemo/blob/master/CONTRIBUTING.md" target="_blank">contribution guidelines</a> to propose improvements or report issues. |
83 | 83 |
|
84 |
| -## Licencia |
| 84 | +## License |
85 | 85 |
|
86 |
| -Este proyecto está licenciado bajo la Licencia MIT - ver el archivo [LICENSE](https://github.com/Adriana618/devops-deemo/blob/master/LICENSE){:target="_blank"} para más detalles. |
| 86 | +This project is licensed under the MIT License - see the <a href="https://github.com/Adriana618/devops-deemo/blob/master/LICENSE" target="_blank">LICENSE</a> file for details. |
0 commit comments