All Projects → adhorn → aws-chaos-scripts

adhorn / aws-chaos-scripts

Licence: MIT license
DEPRECATED Collection of python scripts to run failure injection on AWS infrastructure

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to aws-chaos-scripts

Chaos Ssm Documents
Collection of AWS SSM Documents to perform Chaos Engineering experiments
Stars: ✭ 225 (+147.25%)
Mutual labels:  software-engineering, sre, amazon-web-services, chaos-engineering
aws-lambda-chaos-injection
Chaos Injection library for AWS Lambda
Stars: ✭ 82 (-9.89%)
Mutual labels:  chaos-monkey, sre, amazon-web-services, chaos-engineering
aws-fis-templates-cdk
Collection of AWS Fault Injection Simulator (FIS) experiment templates deploy-able via the AWS CDK
Stars: ✭ 43 (-52.75%)
Mutual labels:  sre, amazon-web-services, chaos-engineering
Howtheysre
A curated collection of publicly available resources on how technology and tech-savvy organizations around the world practice Site Reliability Engineering (SRE)
Stars: ✭ 6,962 (+7550.55%)
Mutual labels:  sre, chaos-engineering
xk6-chaos
xk6 extension for running chaos experiments with k6 💣
Stars: ✭ 18 (-80.22%)
Mutual labels:  sre, chaos-engineering
Wheel Of Misfortune
A role-playing game for incident management training
Stars: ✭ 57 (-37.36%)
Mutual labels:  sre, chaos-engineering
docker-simianarmy
Docker image of Netflix's Simian Army
Stars: ✭ 74 (-18.68%)
Mutual labels:  chaos-monkey, chaos-engineering
chaosmonkey
Go client to the Chaos Monkey REST API
Stars: ✭ 54 (-40.66%)
Mutual labels:  chaos-monkey, chaos-engineering
Howtheyaws
A curated collection of publicly available resources on how technology and tech-savvy organizations around the world use Amazon Web Services (AWS)
Stars: ✭ 389 (+327.47%)
Mutual labels:  sre, amazon-web-services
Pumba
Chaos testing, network emulation, and stress testing tool for containers
Stars: ✭ 2,136 (+2247.25%)
Mutual labels:  chaos-monkey, chaos-engineering
cli
Reliably CLI - Optimise your operations
Stars: ✭ 2 (-97.8%)
Mutual labels:  sre, chaos-engineering
Awesome Chaos Engineering
A curated list of Chaos Engineering resources.
Stars: ✭ 4,740 (+5108.79%)
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 (-79.12%)
Mutual labels:  chaos-monkey, chaos-engineering
Performance-Engineers-DevOps
This repository helps performance testers and engineers who wants to dive into DevOps and SRE world.
Stars: ✭ 35 (-61.54%)
Mutual labels:  sre, chaos-engineering
rocketnative-sublime-snippets
[DEPRECATED] Rocketseat React Native snippets for Sublime Text Editor
Stars: ✭ 16 (-82.42%)
Mutual labels:  deprecated
random-dose-of-knowledge
Using the latest Software Engineering practices to create a modern and simple app.
Stars: ✭ 26 (-71.43%)
Mutual labels:  software-engineering
ideas4
An Additional 100 Ideas for Computing https://samsquire.github.io/ideas4/
Stars: ✭ 26 (-71.43%)
Mutual labels:  software-engineering
havoc
ChaosMonkey style testing for the BEAM
Stars: ✭ 53 (-41.76%)
Mutual labels:  chaos-monkey
ecs-deplojo
Deployment tool for Amazon ECS
Stars: ✭ 19 (-79.12%)
Mutual labels:  amazon-web-services
plur
PLUR (Programming-Language Understanding and Repair) is a collection of source code datasets suitable for graph-based machine learning. We provide scripts for downloading, processing, and loading the datasets. This is done by offering a unified API and data structures for all datasets.
Stars: ✭ 67 (-26.37%)
Mutual labels:  software-engineering

DEPRECATED in favor of AWS Fault Injection Simulator (FIS)

https://docs.aws.amazon.com/fis/latest/userguide/fis-actions-reference.html#fis-actions-reference-fis

All scripts here have been ported to AWS FIS - See https://github.com/adhorn/aws-fis-templates-cdk

⚠️USE AT YOUR OWN RISK⚠️

Using these scripts may create an unreasonable risk. If you choose to use the scripts provided here in your own activities, you do so at your own risk. None of the authors or contributors, or anyone else connected with these scripts, in any way whatsoever, can be responsible for your use of the scripts contained in this repository. Use these scripts only if you understand what the code does

Collection of python scripts to inject failure in the AWS Infrastructure

  1. script-fail-az: simulate the lose of an Availability Zone (AZ) in a VPC.

       ❯ script-fail-az --help
       usage: script-fail-az   [-h] --region REGION --vpc-id VPC_ID --az-name AZ_NAME
                 [--duration DURATION] [--limit-asg] [--failover-rds]
                 [--failover-elasticache] [--log-level LOG_LEVEL]
    
        Simulate AZ failure: associate subnet(s) with a Chaos NACL that deny ALL
        Ingress and Egress traffic - blackhole
    
        optional arguments:
        -h, --help            show this help message and exit
        --region REGION       The AWS region of choice (default: None)
        --vpc-id VPC_ID       The VPC ID of choice (default: None)
        --az-name AZ_NAME     The name of the availability zone to blackout
                                (default: None)
        --duration DURATION   The duration, in seconds, of the blackout (default:
                                60)
        --limit-asg           Remove "failed" AZ from Auto Scaling Group (ASG)
                                (default: False)
        --failover-rds        Failover RDS if master in the blackout subnet
                                (default: False)
        --failover-elasticache
                             Failover Elasticache if primary in the blackout subnet
                                (default: False)
        --log-level LOG_LEVEL
                                Python log level. INFO, DEBUG, etc. (default: INFO)
  2. script-stop-instance: randomly kill an instance in a particular AZ if proper tags.

         ❯ script-stop-instance --help
         usage: script-stop-instance [-h] [--log-level LOG_LEVEL] --region REGION
                                 --az-name AZ_NAME [--tag TAG]
                                 [--duration DURATION]
    
         Script to randomly stop instance in AZ filtered by tag
    
         optional arguments:
         -h, --help            show this help message and exit
         --log-level LOG_LEVEL
                                 Python log level. INFO, DEBUG, etc. (default: INFO)
         --region REGION       The AWS region of choice (default: None)
         --az-name AZ_NAME     The name of the availability zone of choice (default:
                                 None)
         --tag TAG             Filter instances by tag name:value (default:
                                 SSMTag:chaos-ready)
         --duration DURATION   Duration (s) before restarting the instance (default:
                                 60)
  3. script-fail-rds: force RDS failover if master is in a particular AZ or if database ID provided.

         ❯ script-fail-rds --help
         script-fail-rds [-h] --region REGION --rds-id RDS_ID --vpc-id VPC_ID
                     --az-name AZ_NAME [--log-level LOG_LEVEL]
    
         Force RDS failover if master is in a particular AZ or if database ID provided
    
         optional arguments:
         -h, --help            show this help message and exit
         --region REGION       The AWS region of choice. (default: None)
         --rds-id RDS_ID       The Id of the RDS database to failover. (default:
                                 None)
         --vpc-id VPC_ID       The VPC ID of where the DB is. (default: None)
         --az-name AZ_NAME     The name of the AZ where the DB master is. (default:
                                 None)
         --log-level LOG_LEVEL
                                 Python log level. INFO, DEBUG, etc. (default: INFO)
  4. script-fail-elasticache: force elasticache failover if primary node is in a particular AZ or if cluster name provided.

        ❯ script-fail-elasticache --help
        usage: script-fail-elasticache  [-h] --region REGION --elasticache-cluster-name
                           ELASTICACHE_CLUSTER_NAME --vpc-id VPC_ID --az-name
                           AZ_NAME [--log-level LOG_LEVEL]
    
         Force ElastiCache failover if master is in a particular AZ or if master node
         ID provided
    
         optional arguments:
         -h, --help            show this help message and exit
         --region REGION       The AWS region of choice. (default: None)
         --elasticache-cluster-name ELASTICACHE_CLUSTER_NAME
                                 The cache cluster name to failover. (default: None)
         --vpc-id VPC_ID       The VPC ID where the primary node (master) is.
                                 (default: None)
         --az-name AZ_NAME     The AZ where the primary node (master) is. (default:
                                 None)
         --log-level LOG_LEVEL
                                 Python log level. INFO, DEBUG, etc. (default: INFO)

Install and build the scripts

You have two options. Choose one of the options below

  • Building and using for production using Python Wheel
  • Building and using for dev or test (does not require Python Wheel)

Building and using for production

  1. Build a wheel.

    pip install wheel
    python setup.py bdist_wheel
  2. The wheel file chaos_aws-1.0.0-py3-none-any.whl is in the the dist folder:

    cd dist
  3. Install the wheel with pip.

    pip install chaos_aws-1.0.0-py3-none-any.whl
  4. Run the script with its console script:

    script-fail-az --region eu-west-3 --vpc-id vpc-2719dc4e --az-name eu-west-3a --duration 60 --limit-asg --failover-rds --failover-elasticache
    script-stop-instance --region eu-west-3 --az-name eu-west-3a --tag "chaos:ready"
    script-fail-rds --region eu-west-3 --rds-id database-1
    script-fail-rds --region eu-west-3 --vpc-id vpc-2719dc4e --az-name eu-west-3c
    script-fail-elasticache --region eu-west-3 --vpc-id vpc-2719dc4e --az-name eu-west-3c
    script-fail-elasticache --region eu-west-3 --elasticache-cluster-name chaoscluster

Building and using for dev or test

  1. Install requirements

    pip install -r requirements.txt
  2. Run the script with its console script:

    python scripts/fail_az.py --region eu-west-3 --vpc-id vpc-2719dc4e --az-name eu-west-3c --duration 60 --limit-asg --failover-rds --failover-elasticache
    python scripts/stop_random_instance.py --region eu-west-3 --az-name eu-west-3a --tag "chaos:ready"
    python scripts/fail_rds.py --region eu-west-3 --rds-id database-1
    python scripts/fail_rds.py --region eu-west-3 --vpc-id vpc-2719dc4e --az-name eu-west-3c
    python scripts/fail_elasticache.py --region eu-west-3 --vpc-id vpc-2719dc4e --az-name eu-west-3c
    python scripts/fail_elasticache.py --region eu-west-3 --elasticache-cluster-name chaoscluster
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].