GithubHelp home page GithubHelp logo

deploy-dc's Introduction

Steps to Deploy DeathStar using Go Script

This readme is meant to provide insight into setting up and running the media-microservices DeathStarBench on a Cloudlab instance with 3 nodes (1 master, 2 worker nodes)

It has also been tested with the social-network micrroservices application. The only change is in the namespace that you have to create (i.e. create namespace social-network)

Setup Steps:

  1. Install Docker and Kubernetes and Go
  2. Instantiate a K8s cluster
  3. Install python3-pip, asyncio, and aiohttp
  4. Install k8s client go libraries:
        go get k8s.io/api
        go get k8s.io/apimachinery
        go get k8s.io/client-go
    

Deploy Application without Go Script

  1. Change lines 55, 59, 63, and 67 in <path-to-repo>/DeathStarBench/mediaMicroservices/k8s-yaml/nginx-web-server.yaml which refers to the the installation directory location of DeathStarBench to the appropriate location
  2. On Master note, create namespace media-microsvc via: kubectl create namespace media-microsvc
  3. Deploy all pods via: kubectl apply -f <path-of-repo>/mediaMicroservices/k8s-yaml/
  4. Wait until kubectl -n media-microsvc get pod displays all Pods as running

Deploy Application with Go Script

  1. Change lines 55, 59, 63, and 67 in <path-to-repo>/DeathStarBench/mediaMicroservices/k8s-yaml/nginx-web-server.yaml which refers to the the installation directory location of DeathStarBench to the appropriate location
  2. On Master note, create namespace media-microsvc via: kubectl create namespace media-microsvc
  3. Deploy all pods via: go run main.go -f <path-to-app-def-json>
    • assure that the app-def JSON file has the correct filepath to the deployment application
  4. Wait until kubectl -n media-microsvc get pod displays all Pods as running

Register users and movie information

  1. Use kubectl -n media-microsvc get svc nginx-web-server to get its cluster-ip.
  2. Paste the cluster ip at <path-of-repo>/mediaMicroservices/scripts/write_movie_info.py:99 and <path-of-repo>/mediaMicroservices/scripts/register_users.sh:5 3.Update <path-of-repo>/mediaMicroservices/scripts/write_movie_info.py:95 & 97 to point to the installation path of the repo
  3. python3 <path-of-repo>/mediaMicroservices/scripts/write_movie_info.py && <path-of-repo>/mediaMicroservices/scripts/register_users.sh

Running HTTP workload generator

A sample workload can be to compose reviews - to do this, do:

  1. Paste the cluster ip at <path-of-repo>/mediaMicroservices/wrk2/scripts/media-microservices/compose-review.lua:1032
  2. cd <path-of-repo>/mediaMicroservices/wrk2
    ./wrk -D exp -t <num-threads> -c <num-conns> -d <duration> -L -s ./scripts/media-microservices/compose-review.lua http://<cluster-ip>:8080/wrk2-api/review/compose -R <reqs-per-sec>
    

deploy-dc's People

Contributors

prerito avatar

Watchers

 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.