Name: Divyansh Jha

Contact No: 9810739995

Mail id: [email protected]


Introduction:

In a development environment, managing the consistent and reliable deployment of code to production can be challenging. The project involves two virtual machines (VMs) hosted on Amazon Web Services (AWS): a development server and a production server. The development server (VM1) is used by the team to push new code via a version control system (VCS). This code needs to be automatically built and tested on VM1. Upon successful completion of tests, the software should be deployed to the production server (VM2) for final deployment and building.

The primary goal is to automate this process using Jenkins pipelines to ensure efficient, consistent, and error-free deployment from development to production. The solution should also leverage AWS’s networking and security features to create a robust, secure, and scalable deployment pipeline.


Flow Chart:

Untitled

Untitled


Architecture Overview:

Our AWS architecture leverages a VPC to provide an isolated network environment, encapsulating both development and production environments. Within the VPC, we have two subnets: the Development Subnet (VM1) for building and testing code, and the Production Subnet (VM2) for deploying and running the final application. An Internet Gateway ensures that instances in public subnets have internet access, while Route Tables direct traffic within the VPC and to/from the internet.

Security Groups protect our environments: the Development Security Group allows SSH (port 22), HTTP (port 80), and Jenkins-specific ports, while the Production Security Group permits necessary traffic for the production application. IAM Roles and Policies grant Jenkins permissions to interact with AWS resources (Jenkins Role) and enable EC2 instances to securely interact with other AWS services (Instance Roles).

The Development Server (VM1) hosts Jenkins and runs the CI/CD pipeline, fetching code from the GitHub repository, building and testing it, and deploying the final application to the Production Server (VM2). This architecture ensures a structured, secure, and efficient workflow, from code development to production deployment.

Untitled


Execution: