Coder Social home page Coder Social logo

arkatufus / docker-splitter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petabridge/docker-splitter

0.0 0.0 0.0 45 KB

CLI tool for creating network splits in Docker networks in order to test fault-tolerance.

License: Apache License 2.0

Shell 6.29% C# 84.97% PowerShell 8.17% Batchfile 0.57%

docker-splitter's Introduction

docker-split

docker-split - Induce a split-brain condition in a cluster created using docker-compose

SYNOPSIS

docker-split CLUSTER NETWORK COMMAND

DESCRIPTION

Create a split-brain condition in the CLUSTER docker cluster inside the NETWORK docker network.

This tool assumes that the docker container names would be in the form of "{CLUSTER}-{NUMBER}"

COMMAND is a string in the form of

<int> [<int>]...] [FROM <int> [<int>]...]
  • <int> is the docker container name NUMBER in the "{CLUSTER}-{NUMBER}" pattern.
  • If FROM is not omitted, then the listed node(s) will be split from the list of nodes in the FROM section.
  • If FROM is omitted, then the listed node(s) will be split from the rest of the nodes in the cluster.

You can chain multiple COMMAND by using AND, example:

1 3 FROM 2 AND 2 FROM 4 AND 3

EXAMPLE

ClusterSplitter cluster docker_default "3"

Splits the node cluster-3 from the rest of the nodes

ClusterSplitter cluster docker_default "3 4 5"

Splits node cluster-3, cluster-4, and cluster-5 from the rest of the nodes, forming their own island of nodes.

ClusterSplitter cluster docker_default "3 FROM 4 5"

Splits the node cluster-3 from cluster-4 and cluster-5

ClusterSplitter cluster docker_default "3 AND 10 FROM 4 5"

Splits the node cluster-3 from the rest of the nodes AND splits the node cluster-10 from node cluster-4 and cluster-5

NOTE

The cluster service WILL NEED to have NET_ADMIN capability enabled inside the docker-compose.yaml file. Example docker-compose.yaml file:

version: '3'

services:
  cluster:
    image: azure.stresstest:0.2.4
    cap_add:
      - NET_ADMIN

docker-splitter's People

Contributors

aaronontheweb avatar arkatufus 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.