This repository documents the end-to-end DevOps pipeline and infrastructure configuration for a full-stack web application, deployed and maintained on an Azure Virtual Machine. The setup supports continuous integration, deployment, monitoring, reverse proxying, secure secret management, and access via custom domain and HTTPS.
- Provisioned a VM on Microsoft Azure with resources tailored to the project’s scope.
- Enabled Azure Monitor and configured custom firewall alerts for basic internal visibility.
- Integrated Jenkins with a multibranch pipeline triggered via GitHub webhooks.
- Separated CI/CD logic into individual
Jenkinsfiles for frontend and backend repositories:
- Sets up the environment.
- Linting and unit testing.
- Builds the React application.
- Deploys the static files.
-
Environment setup and Docker image build.
-
Development Branch:
- Runs the image in a temporary container.
- Performs health checks to validate container behavior.
- Removes the container after testing.
-
Main Branch:
- Pushes the image to DockerHub as
latest. - Pulls and deploys the container on the VM.
- Runs production-level health checks.
- Pushes the image to DockerHub as
-
Configured Nginx to:
- Serve frontend static files.
- Route API traffic to the backend container.
- Proxy requests to the HashiCorp Vault service.
- Enforce HTTP to HTTPS redirection for secure access.
-
Purchased a domain and configured DNS records for:
- Frontend
- Backend API
- Vault service
-
Generated and installed SSL certificates for encrypted HTTPS access on all services.
- Deployed Prometheus and Node Exporter to track system metrics (CPU, memory, disk).
- Visualized metrics through a Grafana dashboard.
- Implemented Alertmanager to email alerts to the DevOps leader and team lead when thresholds are exceeded.
-
Set up UptimeRobot to monitor availability of:
- Frontend
- Backend API
- Vault service
-
Configured email alerts for downtime or unreachability.
-
Installed and configured the open-source version of HashiCorp Vault on the Azure VM.
-
Vault is accessible via a secure subdomain with HTTPS enabled via Nginx reverse proxy.
-
Configured custom policies to enforce principle of least privilege:
- Example: A Jenkins-specific policy that allows access to only required secret paths for pipeline operations.
- Restricted access to more sensitive secrets for non-privileged applications or services.
-
Enabled AppRole authentication to allow services like Jenkins to authenticate securely and programmatically.
/infrastructure
├── nginx/
├── jenkins/
├── monitoring/
└── vault/
- DevOps Lead: \Marwan Emam
This project is licensed for academic and personal use.
- Azure Virtual Machine
- Jenkins
- Docker & DockerHub
- Prometheus & Grafana
- Node Exporter
- Alertmanager
- Nginx
- UptimeRobot
- HashiCorp Vault
- GitHub Webhooks