by: Shivansh Goel

image

Introduction

How does EC2 AWS Work?

EC2 (Elastic Compute Cloud) is a web service provided by AWS that allows customers to rent virtual machines (VMs) in the cloud to run their applications. EC2 instances can be launched from a variety of pre-configured Amazon Machine Images (AMIs) or custom images uploaded by the user.

When a user launches an EC2 instance, they can choose the type of instance they want based on the amount of CPU, memory, and storage required. They can also choose the region where the instance will be located and the type of operating system and software that will be installed on it.

Once an EC2 instance is launched, the user has full control over it, just as they would with a physical server. They can install their own software and applications, configure the network settings, and manage the storage.

Why is EC2 AWS useful for projects?

EC2 AWS is useful because once an EC2 instance is launched, then the user can do whattever they need to do with it just like if it were their own computer.

This allows a lot of scalibilty, Flexibility(EC2 provides users with a wide range of instance types, operating systems, and software options to choose from.

This allows users to select the resources that are best suited to their specific project requirements, and to easily switch between different configurations as needed), and Reability(EC2 is designed to be highly reliable, with built-in redundancy and failover mechanisms to ensure that applications remain available even in the event of hardware or software failures).

AWS Devolpment

Setting up the Server and Cloning the Project

Deployment Process:

Update and Upgrade the System

Clone and Change Directory to project location

Clone your gitserver into a directory of your choosing

Making sure that the Web Service can Run

To make sure that the Web Service to running properly

Make sure that there is a Dockerfile or that it is up to Date

image

Make sure that the docker-compose.yml is up to dagte

Start Running Docker

Make sure to Verify that the Web Application is working with Docker

Make sure you find the application that matches the application name and ports. If you can’t find them that means that you did something wrong and that you should go back to finish other steps. image

Testing Localpoint

To make sure that all the previous steps are running correctly and the everything is going on the right path. You should run these commands to see if there is a success or a failure.

Test preparation for Docker Web Application using IP for Internet Access

First make sure to install Nginx

image

Make sure to edit the server_name (IP Adress), the proxy pass POrt, and the docker-compose

Activate the NGINX Configuration

Last Steps before the Last Steps

The Last Steps

The last Steps involve setting up the DNS Server

Video

Live Demo:

Hacks Time

FRQ Question Hacks (Answer with more than 2-3 full complete sentneces):

Diagram

To Truly understand Nginx and why we are using it, it is important to compare it to other web servers? Compare NGINX with lighttpd in a Venn Diagram, and place the image below: