Coder Social home page Coder Social logo

tiagosapo / a-representative-low-cost-and-easy-to-deploy-microservices-application-for-research-purposes Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 32.42 MB

Microservices-Based Application for Scientific Purposes

Java 4.02% C# 12.78% HTML 66.34% CSS 4.37% JavaScript 5.25% Dockerfile 0.03% TypeScript 4.00% Python 1.26% HCL 1.23% Shell 0.07% R 0.66%
amazon-aws cloud terraform

a-representative-low-cost-and-easy-to-deploy-microservices-application-for-research-purposes's Introduction

Publicitaki-Store-Bank-Systems (Amazon AWS)

Summary:

This project consists of three interconnected systems or applications that simulate real-life websites communicating with each other.

The project is structured around three subsystems:

  • 📈 Publicitaki, a price tracker website;
  • 🛍️ Store, an online platform for selling various types of products;
  • 🏦 Bank, a system that manages transactions made on both Publicitaki and Store.


Communication:

  • REST
  • gRPC
  • Publish/Subscribe pattern (banking transactions)


Database management systems used:

  • PostgreSQL
  • MySQL


Programming languages/frameworks used:

  • Java (Spring Boot and Quarkus)
  • C# (ASP.NET Core)
  • Python (Django)
  • JavaScript (NodeJS, React with Vite)

Deploy and Undeploy commands:

  • To Deploy(⬆️) run the following commands:
cd terraform-scripts
./deploy_to_aws.sh
  • To Undeploy(⬇️) run the following commands:
cd terraform-scripts
./undeploy_from_aws.sh

Environment Setup and Installation

Note: Windows 10 and Windows 11 🪟 users should use Windows Subsystem for Linux (WSL) and follow the Linux commands.

  • Step 1: Create a AWS account: (https://console.aws.amazon.com/console/home?nc2=h_ct&src=header-signin)
  • Step 2: Create a IAM account with the permissions "AdministratorAccess" and "AmazonS3FullAccess"
  • Step 3: Then in the IAM account select the "Security Credentials" tab and in "Access keys" select "Create access key"
  • Step 4: After the key's creation you should will have the aws credentials. IMPORTANT: do not forget to save the credentials because after you close the dialog you won't be able to see them again (if you forget them you can always delete them and creating a new one)
  • Step 5 Install software:
    • macOS : Install Homebrew running the following command:
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • Linux 🐧: Update apt and install curl:
      sudo apt update && sudo apt install -y curl
  • Step 6: Install the AWS CLI:
    • macOS : Install it on macOS, running the following command:
      brew install awscli
    • Linux 🐧: Install it on linux, running the following command:
      sudo apt install -y awscli
  • Step 7: Verify that the AWS CLI is installed by running the following command:
    aws --version
  • Step 8: Run the following command with the credentials given by AWS in step 4:
    aws configure
  • Step 9: Install Terraform:
    • macOS : Install it on macOS, running the following command:
      brew install terraform
    • Linux 🐧: Install it on linux, running the following command:
      sudo apt install -y terraform
  • Step 10: To verify that Terraform is installed run the following command:
    terraform --version
  • Step 11: (Optional) Compile each microservice for each system and put them in the corresponding directories:
//Make sure that you create the EXECUTABLES FOLDERS

/terraform-scripts/bank/executables
/terraform-scripts/publicitaki/executables
/terraform-scripts/store/executables
  • Step 12: Go to the terraform-scripts folder and run the deploy script:
cd terraform-scripts
./deploy_to_aws.sh


After 10 to 20 minutes, the deployment should be complete.

  • Step 13: After the deployment is complete, go to Elastic Beanstalk Environments and select the environment Store-Users and select Configuration on the left pane. Then in Instance traffic and scaling select Edit and add a new LISTENER on port 5000 (TCP). Click APPLY.
    After that, you should have a listener for both ports 80 and 5000.
  • After Step 13 the application is ready to be used. To UNDEPLOY run the following script:
    ./undeploy_from_aws.sh

Notes

Register PRODUCTS on Store and Publicitaki

(Optional) To add new products on the Store, you should go to the Store-Products microservice and do the following:

  • Add a category, for example, "Playstation", on this URL: <aws-endpoint-for-store-products>/categories;
  • Add a brand, for example "SONY", on this URL: <aws-endpoint-for-store-products>/brands;
  • Add a product, for example, "Resident Evil 4 Remake", on this URL: <aws-endpoint-for-store-products>/products.

(Optional) To add new products on Publicitaki, you should go to the frontend of the website Publicitaki Pub-Frontend and do the following:

  • Login as an Admin;
  • Go to Account and select the option to add a new product;

Application Architecture diagrams

The application C4 diagrams are in the "extras/application-c4-diagrams" folder.

Locust and Amazon AWS (CPU / Network-out) charts

The application's Locust and Amazon AWS charts are in the "extras/charts" folder.

a-representative-low-cost-and-easy-to-deploy-microservices-application-for-research-purposes's People

Contributors

medeirost avatar tiagosapo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.