A Real-World CI/CD Automation Project by Mahesh Shelke
🎯 Project Objective
This project demonstrates the **end-to-end automation of a Python Flask web application** using a complete **CI/CD (Continuous Integration & Continuous Deployment)** pipeline built with **Jenkins**, integrated with **GitHub** and deployed seamlessly on **AWS EC2**.
Once the code is pushed to GitHub, Jenkins automatically detects the update, pulls the latest version, deploys it to an EC2 instance, installs dependencies, and runs the Flask server — all without any manual command execution.
🌍 Real-World Relevance
- Used by companies to streamline application deployment and updates.
- Ensures zero downtime with automatic rollout of new builds.
- Shows how modern DevOps teams integrate development and cloud hosting seamlessly.
- Ideal for developers aiming to showcase real-time automation and deployment skills.
🧩 Tools, Technologies & Services Used
- Python Flask: Lightweight web framework to handle user authentication.
- HTML, CSS, JS: For creating responsive and animated Login/Signup UI.
- SQLite3: Local database for storing user data securely.
- Git & GitHub: Source control and remote repository hosting.
- Jenkins: CI/CD tool automating build, test, and deployment pipeline.
- AWS EC2: Cloud compute instance hosting the live Flask app.
- SSH Keys: Secure link between Jenkins and EC2 for file transfer and remote execution.
⚙️ Process Breakdown
- Development Phase: Created a Flask web app (`app.py`) combining backend + frontend (HTML/CSS/JS). Animated transitions for login/signup enhance UX.
- GitHub Integration: Project pushed to a GitHub repo for version control and collaboration.
- Jenkins Setup: Installed Jenkins on Ubuntu/EC2, added Git and SSH plugins, configured credentials (`jenkinskey`).
- Pipeline Configuration: Jenkinsfile created to automate fetching, deploying, and running the app remotely on EC2.
- Execution: Jenkins triggers automatically when a new commit is pushed to GitHub.
- Deployment: Flask app is transferred via SSH, dependencies installed, and the server launched live on EC2.
📄 Jenkinsfile Logic (Simplified)
agent any
stages {
stage('Clone Repo') { git 'GitHub URL' }
stage('Deploy') { SSH → EC2 → Copy Files → Install → Run }
}
}
Each Jenkins stage handles a key part of automation — from pulling source code to remote execution. This pipeline ensures a **fully automated release cycle** every time new code is committed.
🚧 Challenges Solved
- Manual deployment replaced with single-click automation.
- Eliminated SSH manual logins and human errors.
- Created reusable pipeline for any Python project.
- Integrated local Flask app directly with AWS cloud services.
📊 Results & Benefits
- ✅ 100% Automated Workflow: Code → Build → Deploy → Run.
- ⚡ Faster Delivery: Reduced deployment time from minutes to seconds.
- 🔒 Secure Process: Uses SSH authentication and AWS permissions.
- 🌐 Scalable Setup: Can be extended to Docker/Kubernetes for future CI/CD pipelines.
📸 Screenshots & Visuals
The project includes screenshots of every stage — from the Flask UI to Jenkins build success.
- Animated Login & Signup Interface
- VS Code Project Overview
- Jenkins Pipeline Configuration
- Successful Deployment on AWS EC2
🔍 Final Output
After every Git push, Jenkins instantly redeploys the new version of the app on AWS EC2. You can access it live using:
Example: http://13.233.9.29:5000
Result → A smooth, auto-updated web app with modern UI and full backend automation.
🏆 About the Author
Mahesh Shelke is a passionate AWS & DevOps Engineer with expertise in cloud automation, CI/CD pipelines, and web app deployment.
His goal is to simplify cloud automation and help developers deploy faster and smarter.
