chaosrat

package module
v0.0.0-...-208b0ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 7 Imported by: 0

README

Chaos Rat

Lightweight chaos experimentation for your cloud infrastructure

Why

While not as thorough, Chaos Rat is a easier to get running than Chaos Monkey. If you want to quickly test and experiment with the resiliency, availability, and fault tolerence of your systems Chaos Rat is for you. To get started jump to Usage below.

This tool does not yet follow the Principles of Chaos Engineering and only terminates compute instances to, per the principles of chaos in practice, "reflect real world events like servers that crash."

Support Roadmap (PRs Welcome)

Amazon Web Services
  • Elastic Compute Cloud Instances
  • Elastic Container Service Tasks
  • Elastic Kubernetes Service Pods
Google Cloud Platform
  • Compute Engine Instances
  • Google Kubernetes Engine Pods

Usage

Chew
$ chaosrat chew -h
NAME:
   main chew - Terminate compute instances

USAGE:
   chaosrat chew -a [Auto Scaling group id] -m [maximum termination count] -r [compute region]

DESCRIPTION:
   Terminate `m` number of instances within auto scaling group with ID `a` inside of region `r`.

OPTIONS:
   --auto-scaling-group value  The ID of your autoscaling group.
   --termination-max value     The maximum number of instances to terminate. (default: 18446744073709551615)
   --region value              The infrastructure region, containing your Auto Scaling group, that you would like to stress.
   --verbosity value           Logging level: 'trace', 'debug', 'info', 'warn', 'error', 'fatal', or 'panic'. (default: "info")
   --dry                       No terminations. Only a description of the would-be affected instances will be returned.
  • Elastic Compute Cloud (EC2) Instances
  1. You must be using an EC2 Auto Scaling Group. To test Chaos Rat you can deploy the AutoScalingMultiAZWithNotifications.template.yml using AWS CloudFormation and use the autoscaling group it provides. Click Launch Stack below to launch the template in the us-east-1 region (North Virginia).

launch-stack

  1. You can run Chaos Rat using the latest GitHub Package Registry image. Make sure to set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, YOUR_AUTO_SCALING_GROUP_ID, YOUR_REGION, and TERMINATION_COUNT:
$ docker run --rm \
	-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
	-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
	docker.pkg.github.com/swoldemi/chaosrat/chaosrat:1.0.0-rc.1 chew \
	-a $YOUR_AUTO_SCALING_GROUP_ID \
	-r $YOUR_REGION \
    -m $TERMINATION_COUNT

Resources

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProvisioning

func CreateProvisioning(c *config.Config) (providers.ChaosProvisioning, error)

CreateProvisioning creates a provisioning for the configured cloud provider and compute service. Currently, config.CloudProvider and config.ComputeService are restricuted to AWS and EC2, respectively.

func ExecuteChew

func ExecuteChew(c providers.ChaosProvisioning) error

ExecuteChew executes Chew on a provisioning.

Types

type CLI

type CLI struct {
	App *cli.App
}

CLI encapsulates the CLI application.

func New

func New() *CLI

New initializes an instance of the CLI application.

func (*CLI) AddCommand

func (c *CLI) AddCommand(command cli.Command)

AddCommand appends a commend to the CLI.

func (*CLI) Run

func (c *CLI) Run() error

Run runs the CLI application.

Directories

Path Synopsis
cmd
pkg
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL