0% found this document useful (0 votes)
58 views19 pages

CC Report2

The document summarizes a student project to develop a dynamic blogging website using Node.js, Express, MongoDB, and AWS EC2. A team of students created an online platform that allows users to write, read, and engage with blog posts. They designed intuitive interfaces, implemented RESTful APIs, and deployed the application to an AWS EC2 instance to ensure scalability. The project aimed to address challenges in existing blogging platforms around content creation workflows and community engagement.

Uploaded by

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

CC Report2

The document summarizes a student project to develop a dynamic blogging website using Node.js, Express, MongoDB, and AWS EC2. A team of students created an online platform that allows users to write, read, and engage with blog posts. They designed intuitive interfaces, implemented RESTful APIs, and deployed the application to an AWS EC2 instance to ensure scalability. The project aimed to address challenges in existing blogging platforms around content creation workflows and community engagement.

Uploaded by

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

Cloud Computing Additional Activity Report

on

“BLOG POST”

By

Bharadwaj Pandith(1SI21CS028)
Darshan S (1SI21CS036)
Preethish Jain TR(1SI21CS077)
Tushar M sugur(1SI21CS111)

Department of Computer Science and Engineering

Siddaganga Institute of Technology,


Tumakuru - 572103

2023 - 2024
SIDDAGANGA INSTITUTE OF TECHNOLOGY, TUMAKURU-3

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE
This is to certify that Subject Seminar Activity on “Blog Post - Deployment of full-stack
application to the cloud Amazon EC2” is a bonafide work carried out by Bharadwaj Pandith
(1SI21CS038),Darshan S(1SI21CS036), Preethish Jain TR(1SI21CS077) , Tushar M
Sugur(1SI21CS120) of V semester Bachelor of Engineering in Computer Science and
Engineering of the SIDDAGANGA INSTITUTE OF TECHNOLOGY (An Autonomous
Institution, affiliated to VTU, Belagavi & Recognized by AICTE and Accredited by NBA, New
Delhi) during the academic year 2023-2024.

Name of the Teacher Signature with Date


Dr. Sumalatha Aradhya

2
Table of Content

S.No Content Page No

1 Abstrac t 4

2 Introductio n 5

3 Problem Statement 6

4 Tools and Technologies 7

5 Design, Implementation and Deployment Logic 8

6 Conclusion 16

7 References 17

3
Abstract

In this blog post, we delve into the key findings of our latest report, providing a comprehensive
analysis of the current trends and future predictions in our field. We highlight the significant insights
and data-driven conclusions drawn from our extensive research. This post aims to provide readers
with a concise overview of the report’s content, emphasizing its relevance and potential impact. Join
us as we explore these findings and discuss their implications for our industry.

Our team developed a dynamic blogging website using Node.js, Express, MongoDB, and AWS EC2.
The website allows users to create, read, update, and delete blog posts. Leveraging modern
technologies, we designed an intuitive user interface with responsive web pages using HTML and
CSS. Our codebase was hosted on GitHub, enabling seamless collaboration among team members.
For deployment, we utilized an AWS EC2 instance, ensuring scalability and reliability.

4
Introduction

In today’s digital landscape, blogs serve as powerful platforms for expression, knowledge sharing,
and community building. Our project aims to create a dynamic blogging website that not only
facilitates content creation but also fosters meaningful interactions among users. Whether you’re a
seasoned writer or a novice penning your first blog post, our platform provides a space to amplify
your voice. We’ve designed an intuitive interface that allows writers to focus on their content
without technical hurdles.

Node.js forms the backbone of our backend. Its non-blocking, event-driven architecture allows us
to handle concurrent requests efficiently. We use it to build robust APIs, manage user
authentication, and handle data flow. Express, a minimalist web application framework for Node.js,
simplifies routing, middleware handling, and API creation. It provides a solid foundation for our
RESTful endpoints, ensuring smooth communication between the frontend and backend.

Our choice of MongoDB as the database system brings flexibility and scalability. As a NoSQL
database, it stores data in JSON-like documents, allowing us to adapt to evolving requirements
without rigid schemas. We store user blog posts in MongoDB collections. Its efficient querying
capabilities and seamless integration with Node.js make it an ideal choice for our dynamic content.

The frontend, built using HTML and CSS, ensures an intuitive user experience. Our responsive
web pages adapt seamlessly to various devices—desktops, tablets, and smartphones. HTML
structures the content, while CSS styles it. We prioritize readability, aesthetics, and accessibility,
creating an inviting environment for both readers and writers.

Our codebase resides on GitHub, enabling efficient collaboration among team members. Version
control ensures that changes are tracked, reviewed, and merged seamlessly. Whether it’s bug fixes,
feature enhancements, or code refactoring, GitHub streamlines our development workflow.
To deploy our website, we rely on an Amazon EC2 instance. This cloud-based server guarantees
uptime, scalability, and reliability. As traffic grows, our EC2 instance dynamically adjusts
resources, ensuring a seamless experience for users. We manage security, backups, and monitoring
within the AWS ecosystem. As we refine and expand, we invite you to join us on this journey. Let’s
celebrate the art of storytelling—one blog post at a time.

5
Problem Statement

In the ever-evolving digital landscape, aspiring writers, seasoned bloggers, and curious minds seek
a platform that transcends mere content creation. Our project aims to address several critical
challenges faced by both writers and readers in the blogging ecosystem.

Existing platforms often lack a seamless content creation workflow. Writers grapple with complex
interfaces, distracting features, and technical barriers. The process of drafting, editing, and
publishing should be intuitive and distraction-free. Our solution is based around streamlining
content creation. By providing a user-friendly interface powered by Node.js and Express, we
empower writers to focus solely on their ideas. Whether it’s a personal reflection, a travelogue, or
a technical tutorial, the platform should facilitate smooth content generation.

Readers crave more than passive consumption—they seek engagement. Traditional blogs often
lack interactive features beyond comments. Readers want to connect with authors, express
appreciation, and participate in discussions. Our dynamic blogging website emphasizes community
interaction. Through features like comments, likes, and shares, readers can actively engage with
content. Authors receive real-time feedback, bridging the gap between writers and their audience.
By curating relevant content and encouraging dialogue, we create an environment where readers
feel connected and valued.

As blogs gain traction, scalability becomes crucial. Hosting solutions must ensure uptime, handle
traffic spikes, and maintain data integrity. Traditional self-hosting setups may lack reliability.
Leveraging AWS EC2, we address scalability and reliability. Our cloud-based server dynamically
adjusts resources, ensuring a seamless experience even during peak traffic. By managing security,
backups, and monitoring, we guarantee a dependable platform for both writers and readers. The
challenge lies in striking the right balance between resource allocation and cost-effectiveness while
maintaining a robust system.

6
Tools and Technologies

Node.js: Node.js is an open-source, cross-platform JavaScript runtime environment that enables


developers to build server-side and networking applications. It utilizes an event-driven,
nonblocking I/O model, making it lightweight and efficient for handling concurrent requests. In
this blood bank management system, Node.js serves as the foundation for the application's
backend, facilitating the handling of HTTP requests, database operations, and business logic.

Express.js: Express.js is a minimal and flexible Node.js web application framework that provides
a robust set of features for building web and mobile applications. It simplifies the process of
creating RESTful APIs, handling routing, and managing middleware, allowing developers to focus
on building the core functionality of their applications. In this project, Express.js serves as the web
framework for developing the backend of the blood bank management system, enabling efficient
routing, request handling, and middleware integration.

NPM (Node Package Manager): NPM is the default package manager for Node.js, allowing
developers to discover, install, and manage dependencies for their projects. It hosts a vast repository
of reusable code modules, known as packages, which can be easily integrated into Node.js
applications. Within this project, NPM is utilized to install and manage various third-party
packages and libraries, enhancing the functionality and efficiency of the blood bank management
system.

AWS EC2(Elastic Compute Cloud): Amazon EC2 is Amazon Elastic Cloud Computing. This is a
service where Amazon provides us a server where we can deploy our application for absolute
minimum cost and it takes a very little time to do so. By providing the service of AWS EC2 amazon
is giving us a easy way to launch our application without worrying about the bare metal hardware
stuff and the networking part.

Linux AMI: An Amazon Machine Image (AMI) is a pre-configured virtual machine image,
available in the Amazon Web Services (AWS) ecosystem, that is used to launch an instance. A
Linux AMI comes pre-installed with a Linux operating system. Some of the most popular Linux
distributions available AMIs on AWS are Ubuntu, Amazon Linux.

7
Design, Implementation and Deployment Logic

Design:

In the dynamic world of blogging, creating distinct webpages serves essential purposes. These
pages cater to user expectations, enhance functionality, and provide a comprehensive experience.
From the homepage welcoming visitors to the View page introducing the blog’s creators, each
webpage plays a vital role in shaping the reader’s journey.

The approach for this was to split the website into multiple pages. The pages are:

 Home Page
 Add New Post Page
 View Post Page
 Edit Page

Alongside this, the project also implements a backend functionality to fetch stored blogs from the
mongo database.

Home Page:

8
Add New Post:

View Post Page:

9
Edit page:

10
Implementation And Deployment:

Steps to Lauch EC2 instance:

1. Login into your AWS Account and open EC2-Dashboard:


When you are in the EC2 Dashboard you see there is 0 running instances, for creating a new instance
click on “Launch Instance”.

2. Type name of your desirable instance:


Give the name of the instance you have created.

3. Choose AMI:
Here you see multiple AMI options for selection. AMI stands for Amazon Machine Image, which is
basically the software and the operating system that you want to launch on the server.

4. Select instance type:


Here you can select the type of machine, number of vCPUs and memory that you want to have. Select
the free tier eligible option and move to next step (create new key pair).

5. Create new key pair:


This key pair will allow you to access using SSH into the machine you just created. Create the key pair
and download it, make sure to keep it safe as you will not be able to download it again.

6. Configure network setting:


Here you change vpc, subnet and security group and other configuration. I will leave this to default .

7. Configure storage:
Select the amount of storage you want your instance to have, for free tier you can choose up to 30 GB
of EBS. I’ll leave this to default and Click on “Launch Instance”.

8. Access your instance :


Select instance then click on connect button.

9. Install Apache:
You can now install Apache, so run below command
 sudo apt update
 Sudo apt install apache2

To start the service and make sure it remains enable, run below commands
 sudo systemctl start apache2
 sudo systemctl enable apache2

11
Steps to add the Inbound Rules in Security Group:

We need to add TCP, HTTP and HTTPS protocols to get to our instance. Hence, we add the TCP
request on port 3000, and other protocols to there default port numbers from source.

1. Sign in to the AWS Management Console:

o Log in to your AWS account via the AWS Management Console.

o Navigate to the EC2 service.

2. Locate Your EC2 Instance:

o In the EC2 dashboard, find the specific instance for which you want to configure
inbound rules.
o Note down its public IP address or public DNS name.

3. Access Security Groups:

o Security groups act as virtual firewalls for your EC2 instances.

o Click on the Security Groups link in the left navigation pane.

4. Select the Relevant Security Group:

o Identify the security group associated with your EC2 instance.


o Click on the security group name to view its details.

5. Edit Inbound Rules:

o In the Inbound rules tab, click Edit inbound rules.

o Here, you can add, modify, or delete rules.

6. Add a New Rule:

o Click Add rule.


o Specify the following details:

12
 Type: Choose the protocol (e.g., SSH, HTTP, HTTPS, etc.).

13
 Port Range: Specify the port number(s) relevant to the chosen protocol.
 Source: Define the source of incoming traffic. Options include:
 My IP: Allows traffic from your current IP address.
 Custom IP range: Specify a specific IP range (CIDR notation).
 Security group: Allows traffic from instances associated with a specific
security group.
 Anywhere (0.0.0.0/0): Allows traffic from any IP address (use with
caution).
7. Save Changes:
o Click Save rules to apply the new inbound rule.
o The changes take effect immediately.
8. Verify Connectivity:
o Test connectivity to your EC2 instance using the configured rules.
o For example, if you added an SSH rule, try connecting via SSH to ensure it works as
expected

Steps to create a MongoDB database in MongoDB Atlas:

1. Sign Up or Log In:


o Visit MongoDB Atlas
o Create an account if you don’t have one, or log in if you already do.
2. Create a New Project:
o Choose “New Project” and give it a suitable name.
o Click “Next.”
3. Build a Cluster:
o Click “Build a Cluster.”
o Select the free or paid option based on your needs. For testing purposes, the free tier
should suffice.
4. Configure Network Access and Create a Cluster User:
o Add your IP address to the IP access list for your Atlas project.
o Ensure you have a database user for the MongoDB cluster you want to use.
5. Connect to the Cluster:
o If using MongoDB Atlas, open a terminal emulator, run the mongosh command, and
log in to the MongoDB Atlas cluster.
14
o If running a self-managed cluster, make sure the MongoDB cluster is installed and
running, and then connect using the MongoDB Shell.
Steps to launch the Blog website on EC2 instance:

Step 1: Install NodeJS and NPM using nvm

i. Install node version manager (nvm) by typing the following at the command line.
sudo su -
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
ii. Activate nvm by typing the following at the command line.
. ~/.nvm/nvm.sh
iii. Use nvm to install the latest version of Node.js by typing the following at the command
line.
nvm install node
iv. Test that node and npm are installed and running correctly by typing the following at the
terminal:
node -
v npm
-v

Step 2: Install Git and clone repository from GitHub

i. To install git, run below commands in the terminal window:


sudo yum update -y
sudo yum install git -y
ii. Just to verify if system has git installed or not, please run below command in terminal:
git — version
This command will print the git version in the terminal.
iii. Run below command to clone the code repository from Github:
git clone https://github.com/RishitKumar086/Blog-website.git
iv. Get inside the directory and Install Packages
cd Blog-website
npm install
v. Start the application to start the application, run the below command in the terminal:
15
npm start

16
MongoDB Database:

17
Conclusion

In our journey of creating a dynamic blogging website, we’ve explored the intricate interplay of
technology, design, and community engagement. Our user-friendly interface, powered by Node.js
and Express, empowers writers to focus solely on their content without technical distractions.
Whether sharing personal stories, industry insights, or creative pieces, our platform provides a
canvas for their voices.

Beyond passive reading, our community thrives on interaction. Comments, likes, and shares
connect readers with authors, bridging the gap between writers and their audience. By curating
relevant content and encouraging dialogue, we’ve fostered a space where ideas flow freely.

Leveraging AWS EC2, we’ve built a robust hosting solution. Our cloud-based server dynamically
adapts to traffic spikes, ensuring a seamless experience even during peak traffic. Security,
backups, and monitoring are our pillars of reliability. As we continue refining and expanding, we
invite everyone to join—a community of bloggers, thought leaders, and curious minds. Let your
voice resonate across the digital landscape.

18
References

 Windows Copilot

 https://github.com/yeshwanthlm/nodejs-on-ec2

 https://youtu.be/Islmm-LMu38?si=q3cQtG7EpOxd0JWU

 https://youtu.be/_U0pTlpyMGg?si=FSXlndoGLnQPyj-y

 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html?icmpid=doc
s_ec2_console

 https://stackoverflow.com/

19

You might also like