Skip to content

GOODDAYDAY/saasi-experiment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartVM Prototype Experiments

This repository contains the code and configuration of the SmartVM prototype components and evaluation applications.

Associated Publication

T. Zheng, X. Zheng, Y. Zhang, Y. Deng, E. Dong, R. Zhang and X. Liu, SmartVM: an SLA-aware Microservice Deployment Framework, accepted into World Wide Web Journal, 2018.

Folder structure

  • src All the code of SmartVM components and evaluation applications
    • autoscaler The Autoscaler
    • docker-swarm-exporter Prometheus exporter for Docker Swarm
    • BusinessMicroservice (Deprecated) Java implementation of the monolithic application
    • Saasi.Microservices Evaluation application implemented as microservices
    • Saasi.Monolithic.BusinessWeb Evaluation application implemented as a monolithic application
    • Saasi.Shared Shared application logic of Saasi.Microservices and Saasi.Monolithic.BusinessWeb
  • automation Automation code
  • environments
    • eval1 Configuration files and scripts for Evaluation 1 (Monolithic)
    • eval2 Configuration files and scripts for Evaluation 2 (Uniform microservices)
    • eval3 Configuration files and scripts for Evaluation 3 (SmartVM)
  • results Previous experimental data. New data is located at saasi/saasi-data
  • docs (Deprecated) Documentation

Experiment Setup

Requirements

The sample setup consist of 14 VMs, running in the same Local Area Network. They can be divided into the following roles:

  • Docker Registry Server & Load Generator.
  • Manager Nodes
  • Worker Nodes

Each VM should be configure with the hostname listed in the table below, and every VM must be reachable by its hostname.

Type hostname Additional Setup
Registry Server & Load Generator regserv - Docker Registry running on port:5000
- pip install fabric
Managers manager-01 - manager-03 - Join Docker Swarm and promote to manager node.
- Trust registry regserv:5000.
Workers worker-01 - worker-10 - Join Docker Swarm.
- Trust registry regserv:5000.

Every VM should also have the following programs installed:

  • Git
  • Docker 17.09-ce
  • Docker Compose 1.18
  • Python

Generate SSH key pair on regserv and upload the public key to all other VMs.

Running the experiments

  1. Clone this repository on manager-01 to manager-03 and regserv.

    cd /root
    git clone https://github.com/saasi/saasi-experiment
    
  2. Edit automation/fabfile.py on regserv to change the paths and other configuration.

  3. Now we can run the experiments. Experiments will be initiated on regserv, which in this sample setup also serve as the load generator and deployer.

    All steps of the experiment is implemented in automation/fabfile.py, here are some the essential ones:

    • fab clean_stack Clears the running containers on all Managers and Workers
    • fab restart_cluster Restarts all VMs
    • fab build_stack_eval<number> Builds the components for Evaluation <number>
    • fab run_eval<number>:<c>,<r> Run Evaluation <number>, generate load to simulate <c> concurrent users and <r> requests each.

    For example, the run Evaluation 2 (Uniform microservices) with two test cases {Users = 10, Requests = 300} and {Users = 25, Requests = 750}, run:

    cd saasi-experiment/automation
    fab clean_stack
    fab build_stack_eval2
    fab run_eval2:10,300
    fab run_eval2:25,750
    fab restart_cluster
    

    The data will be automatically collected and downloaded. Modify fabfile.py to change where to save the data.

    It is recommended to restart the VMs after each experiment, to ensure consistent results.

    During the experiments, you can visit http://manager-01:3000 to view the monitoring dashboard, and http://manager-01/ to see a visualisation of containers running on each VM.

About

sustc微服务实验

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 30.7%
  • C# 27.8%
  • HTML 19.3%
  • Shell 13.4%
  • Java 5.8%
  • Dockerfile 3.0%