Overview
========
This charm provides tooling for injecting errors, instrumenting degraded
conditions or causing outages, in a Juju environment. Once deployed this
charm can be put into a relation with any service. Juju actions are used
to start a single chaos operation or a series of operations, for a
specified time period. Chaos operations can be selected randomly by the
tooling or specific operations can be specified when the action is started.

Usage
=====
1. Deploy the charm into an existing Juju environment.

2. Add a relation between Chaos Monkey and the service to be affected.

3. Call the start action (e.g. juju action do <unit name> start [options])
   Run 'juju action defined --schema chaos-monkey' to see the full list of
   available actions and action parameters.

4. Use the show-monkey-ids action to list the identifiers for the Chaos
   Monkeys that have been run and the location of the logs.
   For example:
     'juju action do chaos-monkey/0  show-monkey-ids'
     Action queued with id: a7ee2b06-1d75-4a8c-8f4b-aeb27009ce59

     'juju action fetch a7ee2b06-1d75-4a8c-8f4b-aeb27009ce59'

5. Use the show-logs action to print the log of operations that were run.
     'juju action do chaos-monkey/0 show-logs monkey-id=<ID String>'

     'juju action fetch <Action ID>

Replay
======
Each time Chaos Monkey runs, a replay log is generated and saved in the
units log directory. This replay log can be used to reproduce the Chaos
operations. For example:
  /home/ubuntu/chaos-monkey/chaos_monkey.<ID String>/logs/chaos_run_list.log

Currently the replay needs to be run from a root shell on the unit itself.
  1. 'juju ssh chaos-monkey/0'
  2. 'mkdir /home/ubuntu/chaos-monkey/replay_space'
  3. python /home/ubuntu/chaos-monkey/chaos_monkey.<ID String>/chaos-monkey/runner.py --replay /home/ubuntu/chaos-monkey/chaos_monkey.<ID String>/log/chaos_run_list.log /home/ubuntu/chaos-monkey/replay_space
