Giter Club home page Giter Club logo

term-project-coders's Introduction

SFU CMPT 756 main project directory

This is project repo for making an additional micro-service on the Distributed System's course repo.

Follow the steps to appropriately use the project code.

Things to know:

  • the project is for deploying 3 microservices on the cloud, the course kindly provided Makefile scripts to streamline that manual works. That Makefile is k8s.mak. However, k8s.mak has to be obtained by run $ ./tools/process-templates.sh or $ make -f k8s-tpl.mak templates on k8s-tpl.mak (details below).

  • The project use Github Container Registry (ghcr.io) for saving the three microservice images, so you need to provide credentials to access your GitHub. You need to figure out how to connect to your GitHub Container Registry before deploying.

  • Beside Github Container Registry, you need to connect to your cloud with crendentials. The project defaultly use AWS, so we fill AWS credentials in ~/.kube/config


Steps

1. Instantiate the template files

Fill in the required values in the template variable file

Copy the file cluster/tpl-vars-blank.txt to cluster/tpl-vars.txt and fill in all the required values in tpl-vars.txt. These include things like your AWS keys, your GitHub signon, and other identifying information. See the comments in that file for details. Note that you will need to have installed Gatling (https://gatling.io/open-source/start-testing/) first, because you will be entering its path in tpl-vars.txt.

Instantiate the templates

Once you have filled in all the details, run

$ make -f k8s-tpl.mak templates

This will check that all the programs you will need have been installed and are in the search path. If any program is missing, install it before proceeding.

The script will then generate makefiles personalized to the data that you entered in clusters/tpl-vars.txt.

Note: This is the only time you will call k8s-tpl.mak directly. This creates all the non-templated files, such as k8s.mak. You will use the non-templated makefiles in all the remaining steps.

2. To build and push images of the three microservices

$make -f k8s.mak cri

3. To deploy onto the cloud

$make -f eks.mak start
$make -f k8s.mak provision
$make -f k8s.mak deploy
$make -f k8s.mak loader #make sure all template are initialized with your crendentials

The loader will load initial data to the database, so we have entries for querying.

4. Use Gatling to simulate Networking load of light to heavy load on different microservice

$./gatling-user.sh 10 #meaning number of user =10 (light wight nework load)
$./gatling-book.sh 100 #heavy network load

Namely, ./gatling-(user | music | book).sh for each of user/music/book microservice.

5. Inspect the loading effect with Grafana and network flow with Kiali

$make -f k8s.mak grafana-url 
$make -f k8s.mak kiali-url

The generated url is the user interface on brower of the applications of Grafana and Kiali.


Ensure AWS DynamoDB is accessible/running

Regardless of where your cluster will run, it uses AWS DynamoDB for its backend database. Check that you have the necessary tables installed by running

$ aws dynamodb list-tables

The resulting output should include tables User and Music.


Final Demo Video

The Final Demo video is available below:

Click Here to Video Demo Video on Youtube

term-project-coders's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

percyjia95

term-project-coders's Issues

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.