Skip to content

SaptarsiRoy/MyWaysApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Status License


📝 Table of Contents


To create a simple web application for Candidate Portal which has some basic functionalities of - - Add the details of a new candidate - Delete the details of an existing Candidate - Search for the details of a candidate from the database

The portal has the provision to upload a unique candidate ID, their name and a short profile description.

The infrastructure has been deployed using relevant AWS services for frontend-backend integration and tweaked with an implemented CI/CD using proper automation tool.


The frontend comprises of the wesite pages coded exclusively in HTML, CSS and Javascript.

  1. Home page
    The main or home page, framed as index.html, provides the user a list of choices of action. For the functionality of searching a candidate's details, a search bar has been implemented styled with CSS. Simultaneously, adding or deleting of candidate details occurs via hyperlinked buttons, that redirects to the corresponding webpages.

  2. Page for adding details of a new candidate
    The add page, framed as add/add.html, is a simple form that has the fields to input Candidate Unique ID, Name, and Candidate description. Candidate Unique ID and Name are simple text inputs whereas Candidate Description is a text area of 5 rows and 162 columns. The form is concluded with a responsive Add button that forwards the add functionality.

  3. Page for deleting details of an existing candidate
    The delete page, framed as del/del.html, is again a form that inputs only the Unique ID of the candidate whose details needs to be deleted. The Delete button next to the ID input provides the delete functionality to the page.


Since the website has been made responsive, there exists a backend tier to the frontend site. The backend tier has been deployed with the help of AWS service, AWS Lambda. The Lambda contains respective functions that are invoked by respective API calls. The backend also contains a DynamoDB table as the database.

The launched EC2 instance has a configured Apache HTTPD webserver using Ansible and contains the webpages and the CGI scripts that integrate with the API and acts as a bridge between the frontend and the backend.

NOTE:
In order to deploy the frontend webpages, there is a much safer and higher availability option of using the object storage S3 service. But for a greater cause, EC2 is a better option here. This is so because -
1. Since here's an integration of CGI scripts with the API for bridging the frontend and backend, this approach would not have been implementable in case S3 was used, because S3 is a simple object storage service and does not allow CGI integration.
2. Using EC2 instead allows the developers to implement an internal loadbalancing service, in order to reduce any data loss or latency.


Pre Requisites

  1. AWS account
  2. IAM user in the AWS account with the following accesse:-
    • IAMFullAccess
    • IAMUserChangePassword
    • PowerUserAccess
  3. Git CLI, Terraform and Ansible installed in system
  4. Preferred OS - Linux

The following steps to be followed to view the website in own machine:-

  • Clone the repository using git cli.
git clone https://github.com/SaptarsiRoy/MyWaysApp.git
  • Change the profile name and region (your preferred region) in provider.tf file.
provider "aws" {
    region="YOUR PREFERRED REGION"
    profile="YOUR PROFILE"
}
  • Initialise the terraform providers.
terraform init
  • Apply the terraform code to setup the infrastructure (when propmted for approval, enter 'yes').
terraform apply

After successful deployment of the terraform code, three API's for three different functions need to be created. In order to create the API's and add the API endpoints into proper file for further use, please go through the following video.


Finally, its the turn of running the ansible playbook!

ansible-playbook play.yml


A video exhibiting the working prototype of the website is available here! Please have a look...


After testing of all the setup, in order to destroy the whole architecture, use the command -

terraform destry -auto-approve

Also, reach out to the API Gateway Portal in AWS console to delete the created API.



✍️ Author

Saptarsi Roy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published