Code Monkey home page Code Monkey logo

ansible-chaosmonkey's Introduction

Ansible playbook for Chaos Monkey

What is Chaos Monkey and Why we need to use it.

Chaos Monkey is a software tool that was developed by Netflix engineers to test the resiliency and recoverability of their Amazon Web Services (AWS).

The software simulates failures of instances of services running within Auto Scaling Groups (ASG) by shutting down one or more of the virtual machines. According to the developers, Chaos Monkey was named for the way it wreaks havoc like a wild and armed monkey set loose in a data center.

Chaos Monkey works on the principle that the best way to avoid major failures is to fail constantly. However, unlike unexpected failures, which seem to occur at the worst possible times, the software is opt-out by default. It can also be configured for opt-in.

Chaos Monkey has a configurable schedule that allows simulated failures to occur at times when they can be closely monitored. In this way, it’s possible to prepare for major unexpected errors rather than just waiting for catastrophe to strike and seeing how well you can manage.

Before running the playbook, you need to set the values for the below ones


Edit file:-  hosts.ini and give your hosts ipaddress

Edit file:-  awsconfig in the aws role

aws_access_key_id      --> your AWS Access Key
aws_secret_access_key  --> your AWS Secret Key
region                 --> your AWS Region

[For Refering Client-Settings!] (https://github.com/Netflix/SimianArmy/wiki/Client-Settings)

Edit file:-  client.properties in the chaos role 

simianarmy.client.aws.accountKey  --->  your AWS Access Key
simianarmy.client.aws.secretKey   --->  your AWS Secret Key
simianarmy.client.aws.region      --->  your AWS Region

[For Refering Chaos-Settings!] (https://github.com/Netflix/SimianArmy/wiki/Chaos-Settings)

Edit file:-  chaos.properties in the chaos role

I already have an Autoscaling group named "autoscale-1" and I am adding it in here.
Right now In this playbook, I dint add the feature to create its own Auto scaling group and launch configs. 
Will do it in the coming days.

So you need to add your Autoscaling group in here:

simianarmy.chaos.ASG.autoscale-1.enabled = true
simianarmy.chaos.ASG.autoscale-1.probability = 3.0

simianarmy.chaos.notification.sourceEmail --->  Set the source email that sends the termination notification
simianarmy.chaos.notification.global.receiverEmail ---> Set the destination email the termination notification is sent to for all instance groups

#you can run this playbook by the below command

$ ansible-playbook -i hosts.ini -s chaosmonkey.yml

If you are using AWS SES verified email address, then you will get notifications like below.

ansible-chaosmonkey's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

linguowu

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.