All Projects → mlafeldt → chaosmonkey

mlafeldt / chaosmonkey

Licence: MPL-2.0 License
Go client to the Chaos Monkey REST API

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to chaosmonkey

docker-simianarmy
Docker image of Netflix's Simian Army
Stars: ✭ 74 (+37.04%)
Mutual labels:  chaos-monkey, chaos-testing, chaos-engineering
Pumba
Chaos testing, network emulation, and stress testing tool for containers
Stars: ✭ 2,136 (+3855.56%)
Mutual labels:  chaos-monkey, chaos-testing, chaos-engineering
Awesome Chaos Engineering
A curated list of Chaos Engineering resources.
Stars: ✭ 4,740 (+8677.78%)
Mutual labels:  chaos-monkey, chaos-testing, chaos-engineering
Litmus
Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
Stars: ✭ 2,377 (+4301.85%)
Mutual labels:  chaos-testing, chaos-engineering
aws-chaos-scripts
DEPRECATED Collection of python scripts to run failure injection on AWS infrastructure
Stars: ✭ 91 (+68.52%)
Mutual labels:  chaos-monkey, chaos-engineering
aws-fis-templates-cdk
Collection of AWS Fault Injection Simulator (FIS) experiment templates deploy-able via the AWS CDK
Stars: ✭ 43 (-20.37%)
Mutual labels:  chaos-testing, chaos-engineering
Chaosblade
An easy to use and powerful chaos engineering experiment toolkit.(阿里巴巴开源的一款简单易用、功能强大的混沌实验注入工具)
Stars: ✭ 4,343 (+7942.59%)
Mutual labels:  chaos-testing, chaos-engineering
Chaos Mesh
A Chaos Engineering Platform for Kubernetes.
Stars: ✭ 4,265 (+7798.15%)
Mutual labels:  chaos-testing, chaos-engineering
aws-lambda-chaos-injection
Chaos Injection library for AWS Lambda
Stars: ✭ 82 (+51.85%)
Mutual labels:  chaos-monkey, chaos-engineering
sample-spring-chaosmonkey
sample applications illustrating usage of codecentric's chaos monkey library for microservices created using spring boot and spring cloud
Stars: ✭ 19 (-64.81%)
Mutual labels:  chaos-monkey, chaos-engineering
kraken
Chaos and resiliency testing tool for Kubernetes and OpenShift
Stars: ✭ 161 (+198.15%)
Mutual labels:  chaos-engineering
CloudRaider
A resiliency tool that automates Failure mode effect analysis tests, simplifying complex testing with a behavior-driven development and testing approach. Provides a programmatic way to execute controlled failures in AWS and a BDD way to write test cases, allowing test plans themselves to become test cases that can be executed as is.
Stars: ✭ 26 (-51.85%)
Mutual labels:  chaos-engineering
bounded-disturbances
A k6/.NET red/green load testing workshop
Stars: ✭ 39 (-27.78%)
Mutual labels:  chaos-engineering
Performance-Engineers-DevOps
This repository helps performance testers and engineers who wants to dive into DevOps and SRE world.
Stars: ✭ 35 (-35.19%)
Mutual labels:  chaos-engineering
frisbee
A Kubernetes Framework for Cloud-Native Application Testing
Stars: ✭ 39 (-27.78%)
Mutual labels:  chaos-testing
chaoshub-archive
[ARCHIVED] ChaosHub - Your Chaos Engineering Control Plane
Stars: ✭ 16 (-70.37%)
Mutual labels:  chaos-engineering
awesome-chaos-engineering
Awesome chaos engineering page
Stars: ✭ 18 (-66.67%)
Mutual labels:  chaos-engineering
NodeWrecker
Simple pod to run in kubernetes to stress test your nodes
Stars: ✭ 27 (-50%)
Mutual labels:  chaos-testing
openchaos
Open Chaos Initiative
Stars: ✭ 28 (-48.15%)
Mutual labels:  chaos-engineering
litmus-on-okteto
Use Litmus and Okteto Cloud to show you how to start Chaos testing your Kubernetes applications.
Stars: ✭ 32 (-40.74%)
Mutual labels:  chaos-engineering

chaosmonkey

CI GoDoc

Go client to the Chaos Monkey REST API that can be used to trigger and retrieve chaos events.

This project was started for the purpose of controlled failure injection during GameDay events.

Prerequisites

First of all, you need a running Simian Army that exposes its REST API via HTTP.

In order to trigger chaos events via the API, Chaos Monkey must be unleashed and on-demand termination must be enabled via these configuration properties:

simianarmy.chaos.leashed = false
simianarmy.chaos.terminateOndemand.enabled = true

If you plan to use the REST API only, you should also disable all scheduled terminations:

simianarmy.chaos.asg.enabled = false

CLI

Installation

If you're on Mac OS X, the easiest way to get the chaosmonkey command-line tool is via Homebrew:

brew tap mlafeldt/formulas
brew install chaosmonkey

You can also build the tool from source, provided you have Go installed:

go get -u github.com/mlafeldt/chaosmonkey

Usage

Use the tool to:

  • Trigger a new chaos event:

    chaosmonkey -endpoint http://example.com:8080 \
        -group ExampleAutoScalingGroup -strategy ShutdownInstance
  • Trigger the same event 5 times at intervals of 10 seconds, with a probability of 20% per event:

    chaosmonkey -endpoint http://example.com:8080 \
        -group ExampleAutoScalingGroup -strategy ShutdownInstance \
        -count 5 -interval 10s -probability 0.2

    This is useful to terminate more than one EC2 instance of an auto scaling group.

  • Get a list of past chaos events:

    chaosmonkey -endpoint http://example.com:8080
  • List available chaos strategies, which you may pass to -strategy:

    chaosmonkey -list-strategies
  • List all auto scaling groups for a given AWS account, which you may then pass to -group:

    export AWS_ACCESS_KEY_ID=...
    export AWS_SECRET_ACCESS_KEY=...
    export AWS_REGION=...
    export AWS_ROLE=...
    chaosmonkey -list-groups
  • Wipe state of Chaos Monkey by deleting its SimpleDB domain (named SIMIAN_ARMY by default):

    export AWS_ACCESS_KEY_ID=...
    export AWS_SECRET_ACCESS_KEY=...
    export AWS_REGION=...
    export AWS_ROLE=...
    chaosmonkey -wipe-state SIMIAN_ARMY

    Warning: Requires a restart of Chaos Monkey.

As always, invoke chaosmonkey -h for a list of all available options.

In addition to command-line options, the tool also understands these environment variables:

  • CHAOSMONKEY_ENDPOINT - the same as -endpoint
  • CHAOSMONKEY_USERNAME - the same as -username
  • CHAOSMONKEY_PASSWORD - the same as -password

Use with Docker

This Docker image allows you to deploy Chaos Monkey with a single command:

docker run -it --rm -p 8080:8080 \
    -e SIMIANARMY_CLIENT_AWS_ACCOUNTKEY=$AWS_ACCESS_KEY_ID \
    -e SIMIANARMY_CLIENT_AWS_SECRETKEY=$AWS_SECRET_ACCESS_KEY \
    -e SIMIANARMY_CLIENT_AWS_REGION=$AWS_REGION \
    -e SIMIANARMY_CHAOS_LEASHED=false \
    -e SIMIANARMY_CHAOS_ASG_ENABLED=false \
    -e SIMIANARMY_CHAOS_TERMINATEONDEMAND_ENABLED=true \
    mlafeldt/simianarmy

Afterwards, you can use chaosmonkey to talk to the dockerized Chaos Monkey:

chaosmonkey -endpoint http://$DOCKER_HOST_IP:8080 ...

Go library

In addition to the CLI tool, the project also provides the chaosmonkey Go library for use in other Go projects. To install it from source:

go get -u github.com/mlafeldt/chaosmonkey/lib

For usage and examples, see the Godoc documentation.

Further resources

Author

This project is being developed by Mathias Lafeldt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].