Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 

Repository files navigation

AWS EC2 Static Website Deployment with Jenkins CI/CD

This project demonstrates how to deploy a static website on an AWS EC2 instance and automate the deployment process using Jenkins.

It includes both:

  • Manual Deployment using Apache
  • Automated Deployment using Jenkins (CI/CD)

Project Overview

In this project, I deployed a static website on an AWS EC2 instance to understand real-world hosting and infrastructure.

Further, I automated the deployment using Jenkins, simulating a basic CI/CD pipeline where changes made in the code are automatically reflected on the live server.


πŸ› οΈ Tech Stack

  • AWS EC2 (Ubuntu)
  • Apache Web Server
  • Jenkins (CI/CD)
  • Git & GitHub
  • Linux (CLI)
  • SSH (MobaXterm)

βš™οΈ Architecture

GitHub β†’ Jenkins β†’ EC2 β†’ Apache β†’ Live Website


Manual Deployment Steps

1. Launch EC2 Instance

  • Ubuntu Server

  • Configure Security Groups:

    • Port 22 (SSH)
    • Port 80 (HTTP)

2. Connect via SSH

ssh -i key.pem ubuntu@<your-public-ip>

3. Install Apache

sudo apt update
sudo apt install apache2 -y

4. Clone Repository

git clone https://github.com/bs-bhadauria/kamera_website.git
cd kamera_website

5. Deploy Website

sudo cp -r * /var/www/html/

6. Access Website

Open browser and visit:

http://


πŸ” CI/CD Automation using Jenkins

βœ”οΈ Implementation

  • Created Jenkins Pipeline Job
  • Integrated GitHub repository with Jenkins
  • Automated deployment process

πŸ”„ Workflow

Code Change β†’ GitHub β†’ Jenkins Build β†’ Deploy to /var/www/html β†’ Live Website Updated


Example

  • Modified HTML file in project
  • Triggered Jenkins build
  • Website updated automatically without manual file copying

πŸ“‚ Project Structure

kamera_website/
│── index.html
│── style.css
│── photo.jpg
│── README.md
│── screenshots/

πŸ“· Screenshots

Add screenshots here:

  • EC2 Instance Setup
  • SSH Terminal Commands
  • Jenkins Pipeline Execution
  • Website Output (Browser)

Key Learnings

  • Understanding cloud infrastructure using AWS EC2
  • Difference between local and production environments
  • Role of Apache Web Server in hosting
  • Networking basics (ports, public IP, security groups)
  • CI/CD fundamentals using Jenkins
  • Automating deployments using pipelines

Future Improvements

  • Dockerize the application
  • Push Docker image to Docker Hub
  • Implement Jenkins + Docker CI/CD pipeline
  • Deploy using Kubernetes
  • Setup Webhook for automatic trigger

πŸ‘¨β€πŸ’» Author

Bhoopendra Singh Bhadauria DevOps & Backend Enthusiast


⭐ Support

If you found this project helpful, consider giving it a star ⭐ on GitHub and connecting with me on LinkedIn.

About

Deployed a static website on AWS EC2 and automated deployment using Jenkins CI/CD pipeline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors