github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/acceptancetests/repository/charms/chaos-monkey/README (about)

     1  Overview
     2  ========
     3  This charm provides tooling for injecting errors, instrumenting degraded
     4  conditions or causing outages, in a Juju environment. Once deployed this
     5  charm can be put into a relation with any service. Juju actions are used
     6  to start a single chaos operation or a series of operations, for a
     7  specified time period. Chaos operations can be selected randomly by the
     8  tooling or specific operations can be specified when the action is started.
     9  
    10  Usage
    11  =====
    12  1. Deploy the charm into an existing Juju environment.
    13  
    14  2. Add a relation between Chaos Monkey and the service to be affected.
    15  
    16  3. Call the start action (e.g. juju action do <unit name> start [options])
    17     Run 'juju action defined --schema chaos-monkey' to see the full list of
    18     available actions and action parameters.
    19  
    20  4. Use the show-monkey-ids action to list the identifiers for the Chaos
    21     Monkeys that have been run and the location of the logs.
    22     For example:
    23       'juju action do chaos-monkey/0  show-monkey-ids'
    24       Action queued with id: a7ee2b06-1d75-4a8c-8f4b-aeb27009ce59
    25  
    26       'juju action fetch a7ee2b06-1d75-4a8c-8f4b-aeb27009ce59'
    27  
    28  5. Use the show-logs action to print the log of operations that were run.
    29       'juju action do chaos-monkey/0 show-logs monkey-id=<ID String>'
    30  
    31       'juju action fetch <Action ID>
    32  
    33  Replay
    34  ======
    35  Each time Chaos Monkey runs, a replay log is generated and saved in the
    36  units log directory. This replay log can be used to reproduce the Chaos
    37  operations. For example:
    38    /home/ubuntu/chaos-monkey/chaos_monkey.<ID String>/logs/chaos_run_list.log
    39  
    40  Currently the replay needs to be run from a root shell on the unit itself.
    41    1. 'juju ssh chaos-monkey/0'
    42    2. 'mkdir /home/ubuntu/chaos-monkey/replay_space'
    43    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