Skip to content

"Hybrid" Cloud Webserver created during the Cloud Computing module @ Insper.

Notifications You must be signed in to change notification settings

IagoMendes/CloudComputing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudComputing

This repository was created during Cloud Computing study @ Insper (www.insper.edu.br). It contains the main individual project and some of the APS (Practical Supervisionised Activities) of this module.

Project: "Hybrid" Cloud Webserver

The project's original purpose was to create a HC with a private database, but as it wasn't possible, the database part of the project was created in another AWS region.

Structure

It's structure is basically as represented bellow. In 'us-east-1' (North Virginia), there is a Load Balancer, connected to an AutoScaling Group and a redirect instance that connects to 'us-east-2' (Ohio), where there's a webserver and an instance with MongoDB. The connection between Ohio's instances is locked and those can't be accessed by any other IP than North Virginia's instances (those weren't locked to the Load Balancer only because that wasn't the project's main focus).

The AutoScaling and redirect instances are only used for redirecting because (again) the main purpose of this project wasn't to build a complete application, but it's Cloud infrastructure only.
Screenshot

How to use

Having Python 3 installed, run this command to install AWS Command Line Interface and boto3 (AWS SDK for Python):

$ pip3 install awscli --upgrade --user
$ pip3 install boto3

Then configure your AWS Credentials:

$ aws configure

And run the script that is in the Project folder with:

$ python3 main.py

Note

Database script: APS1/main2.py

Redirect script: Project/redirect.py

APS 1: REST service using FastAPI

In this activity, I created a simple RESTful webserver with 6 endpoints:

  • /task - GET: lists all tasks;
  • /task - POST: adds a new tasks;
  • /task/ - GET: lists task with certain id;
  • /task/ - PUT: updates task with certain id;
  • /task/ - DELETE: deletes task with certain id;
  • /healthcheck: status 200 without text;

How to run:

 $ uvicorn main:app --reload

All tests were made with Postman and FastAPI's interface.

APS 2: Creating a Client

Using the webserver created in APS1, created a python script for a client with the same endpoints as previously. The commands are the following:

  $ ./task list
  $ ./task search <id>
  $ ./task add <name> <description>
  $ ./task update <id> <name> <description>
  $ ./task delete <id>
```Cloud infrastructure only

About

"Hybrid" Cloud Webserver created during the Cloud Computing module @ Insper.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages