Giter Club home page Giter Club logo

compose's Introduction

Compose Monkey

Resiliency testing tool for docker-compose

asciicast

##Quick Install

Go to your existing application containing fig.yml config. And then:

$ pip install compose-monkey
$ docker-compose --monkey up

Note : -m / --monkey is the flag to activate ComposeMonkey and without that flag, docker-compose will run as usual.

If everything goes fine, a UI server gets started at the port 2020 (configurable) exposed on the host machine.

##What is Compose Monkey Compose Monkey is a resiliency testing tool for applications running through docker-compose. It is a fork of compose which adds an opt-in feature to test the scenarios where the downstream services become flaky/down/slow.

It also provides a UI port to control the behavior of all the downstream services in real time. On start, all the downstream services behave as normal i.e. the proxy exhibits dummy behvaior.

Compose Monkey :

  • Smartly suggests port and TCP protocol for the destination link
  • Option to skip proxy creation for any link
  • UI controller to change the behvaior of the link in real time.

##How it works Internally, it uses a package Vaurien which provides TCP proxy and behavior simulation. For every link, ComposeMonkey injects a Vaurien container between the source and the destination service. To start a Vaurien container, it needs the TCP protocol and the port needed to talk to the destination. ComposeMonkey makes a best effort strategy to find those and shows them to the user as defaults.

Destination Port is found by searching for exposed port of the destination, if any. Protocol is suggested naively by checking the downstream service name. User has the option to provide port/protocol of their choice if not satisfied with the defaults.

      +------------+           +-------------+            
      |            |           |             |            
      |    WEB     +----------->    REDIS    |            
      |            |           |             |            
      +------------+           +-------------+            
                                                          
                     Without --monkey                     
                                                          
                                                           

|                                                               |
|---------------------------------------------------------------|
|                                                               |

                                                          
+------------+        +------------+        +------------+
|            |        |            |        |            |
|    WEB     +--------> COMPOSMNKY +-------->    REDIS   |
|            |        |            |        |            |
+------------+        +-----^------+        +------------+
                            |                             
                            |                             
                            |                             
                      +-----+------+                      
                      |            |                      
                      |     UI     |                      
                      |            |                      
                      +------------+                      
                                                          
                                                          
                       With --monkey                      

##Future Work

ComposeMonkey can also be built and packaged outside of docker-compose. This can be implemented by creating a temporary fig.yml from the original config yaml file which has a vaurien container entry for each downstream link and single UI container which links all the proxy containers. This work is still in development.

compose's People

Contributors

aanand avatar albers avatar anchal-agrawal avatar bfirsh avatar cameronmaske avatar chanezon avatar chernjie avatar d11wtq avatar dano avatar dnephin avatar drewkett avatar elemecca avatar entequak avatar funkyfuture avatar ggtools avatar josephpage avatar kvz avatar lamdor avatar madwire avatar marksteve avatar mchasal avatar mrchrisadams avatar prat0318 avatar ryanbrainard avatar salehe avatar sdurrheimer avatar svendowideit avatar thieman avatar tomstuart avatar vdemeester 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.