Automating the deployment of a web app and monitoring it with Prometheus.
An EKS cluster is build using Terraform to deploy the application and monitoring solution,
Application is build using Python and Flask.
- Dockerfile for packaging the application as a container.
- Metrics of the HTTP endpoint /hello monitored.
- Metrics implementation is done using prometheus-flask-exporter plugin.
Application and Prometheus is deployed on to the EKS cluster in different namespaces. ALB ingress is used to configure the public endpoints. Endpoints:
GitHub Actions is used as the continous deployment solution. Application orchestration is managed with helm chart. Two workflows are used to automate the deployment,
- Build|Push is triggered on changes to app directory with workflow
- Deployment is triggered to EKS after every image push or every change to app helm chart with workflow
Prometheus is deployed using stable helm chart, with custom values for ALB ingress configuration.
Query that graphs the rate of requests.
rate(flask_http_request_total[5m])