0% found this document useful (0 votes)
36 views14 pages

Cse441 - Industrial Internship Project: Guided By: Amandeep Kaur

This document describes a project to deploy multiple static websites on a single server using Nginx virtual hosting, Docker, Terraform, and Jenkins. It introduces each tool and explains how they can be used together to provide a scalable and automated solution for hosting multiple websites from a single server.

Uploaded by

Naruto Uzamaki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views14 pages

Cse441 - Industrial Internship Project: Guided By: Amandeep Kaur

This document describes a project to deploy multiple static websites on a single server using Nginx virtual hosting, Docker, Terraform, and Jenkins. It introduces each tool and explains how they can be used together to provide a scalable and automated solution for hosting multiple websites from a single server.

Uploaded by

Naruto Uzamaki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

CSE441 – INDUSTRIAL

INTERNSHIP PROJECT
guided by : Amandeep Kaur

N A M E : L . M A N O J VA R M A
R E G N O : 11 9 0 7 8 7 4
SECTION : K19CC
ROLL NO : 79
Setup Multiple static websites on single server
using Nginx Virtual host use Docker, Terraform
and Jenkins
Introduction to Project
1. The deployment of multiple static websites on a single server can be a complex
task, requiring configuration of various components and a significant amount of manual
work.

2. However, with the use of modern tools such as Nginx Virtual Host, Docker, Terraform,
and Jenkins, the process can be simplified and streamlined.

3. This project aims to demonstrate how these technologies can be used together to
deploy multiple static websites on a single server, providing a scalable and flexible
solution for hosting websites.

4. Nginx Virtual Host allows for the configuration of separate websites with their own root
directory and server name, providing easy management and separation of different sites.
Tools Used
• Ec2 instance
• Nginx
• Docker
• Terraform Code
• Jenkins
What is Ec2 instance

• Amazon Elastic Compute Cloud (EC2) is a web service that provides resizable compute
capacity in the cloud. EC2 allows users to rent virtual servers, known as instances, which
can be used to run applications.
• EC2 instances can be launched in various configurations, including different operating
systems, instance types, and storage options.
• EC2 also provides various features such as security groups, key pairs, and user data to help
manage and secure instances.
What is Nginx
1. Nginx is Pronounced as “Engine X” is a high performance web server.
2. Nginx is a web server that can also be used as a reverse proxy, load balancer, mail proxy
and HTTP cache.
3. Nginx is a free open source, high performance HTTP server and reverse proxy as well as an
stability , rich feature set , simple configuration, and low resource consumption.
What is Docker
• Docker is a software platform that allows you to build, test, and deploy applications quickly.
• Docker is a set of platform as a service products that use OS-level virtualization to deliver
software in packages called containers.
• The service has both free and premium tiers. The software that hosts the containers is called
Docker Engine.
What is Terraform
• Terraform allows users to define their entire infrastructure simply by using configuration
files and version control.
• Terraform is an infrastructure as code tool that lets you build, change, and version cloud and
on-prem resources safely and efficiently
• Terraform is a tool for building, changing and versioning infrastructure safely and
efficiently.
What is Jenkins
• Jenkins is an open source continuous integration (CI) server .
• Jenkins is an open source continuous integration/continuous delivery and deployment
(CI/CD) automation software DevOps tool written in the Java programming language. It is
used to implement CI/CD workflows, called pipelines.
• Jenkins is used to build and test your software projects continuously making it easier for
developers to integrate changes to the project, and making it easier for users to obtain a fresh
build.
The Implementation of Project
1. Set up the server:
• Launch a virtual machine or a physical server.
• • Install the operating system of your choice, and ensure that it is up to date.
• Install Nginx web server.

2. Configure Nginx Virtual Hosts:


Create a separate configuration file for each website you want to host.
• Define the root directory for each website and configure the server name.Save the configuration files in the Nginx
configuration directory.

3. Build Docker images for each website:


Create a Docker file for each website.•
Build a Docker image for each website. Publish the images to a Docker registry.
4. Use Terraform to create infrastructure :
• Define the infrastructure required to host the websites in Terraform code.
• Use Terraform to provision the infrastructure.
• Pass the required variables to Terraform, such as the Nginx configuration directory Docker
registry, and image names.
5. Set up Jenkins pipeline:
• Create a Jenkins file that defines the pipeline for deploying the websites.
Configure the Jenkins file to pull the Terraform code from a version control system
Set up the pipeline to execute the Terraform code, build the Docker images, and deploy the
websites.
Images of Implementation of project

Complete project available in my github link


https://github.com/Manojvarma2207/terraform.git
Conclusion
• Virtual Hosts, you can configure each website with its own root directory and server name,
allowing for easy management and separation of different sites.
• Terraform allows for infrastructure-as-code, allowing for the easy creation and management
of servers and other resources required to host the websites.
• By defining the infrastructure requirements in Terraform code, you can ensure consistency
across multiple environments and easily scale as needed.
• Finally, Jenkins pipeline, you can execute the Terraform code, build the Docker images, and
deploy the websites automatically, reducing the risk of human error and streamlining the
entire process.
THANK YOU

You might also like