Code Monkey home page Code Monkey logo

twsre's Introduction

Storage SRE Coding Challenge

Description

This project emulates 1000 servers that returns the Cache, Webapp or Database status through the server.py API. Client.py connects to server API a 1000 times to emulate 1000 servers, collects data and generates 2 reports one human readable and another in JSON format.

Versions

Server Version: 1.0

Client Version: 1.0

Python: 3.9

Installation

IMPORTANT: You will need to install docker in to your workstation. Follow instructions under https://docs.docker.com/engine/install/ once docker is installed continue with below steps.

1 - Download and run image from dockerhub.com

docker pull viaramb/twsre:latest
docker run --name sre -p 5000:5000 -d viaramb/twsre

2 - Connect to containter

docker exec -it sre /bin/bash

3 - Execute code to print report on screen

python src/client/run.py

4 - If you would like to see report in JSON format

cat client/data/output.json

Unittest

Server side testing

Under /app/src folder run:

python -m unittest server/test/test_* 

Client side testing

python -m unittest server/test/test_*

API testing

cd src/server/
python -m unittest test_server.py

twsre's People

Contributors

viaramb 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.