Skip to main content

Extend the Chaos Toolkit with capabilities for the Proofdock Chaos Engineering Platform

Project description

Proofdock extension for the Chaos Toolkit

Build Status Python versions

This project is a collection of features gathered as an extension to the Proofdock Chaos Engineering Platform and the Chaos Toolkit.

Project description

This project is part of the Proofdock Chaos Engineering Platform that helps you to write, run, store and analyze chaos experiments in your Azure DevOps environment.

For more information visit our official website or documentation. Feel free to ask for support for this package on GitHub.

Install

This package requires Python 3.5+

$ pip install -U proofdock-chaos-kit

Usage

The Proofdock Chaos CLI extends the Chaos Toolkit. The several Proofdock Chaos CLI commands are explained in detail at the Proofdock documentation homepage.

Configuration

The Proofdock Chaos CLI expects that you have an API url and a proper API token that allows you to authenticate against the Proofdock cloud.

Configuration values for the Proofdock Chaos CLI can come from several sources:

  • Settings file, e.g.
    # located in ~/.chaostoolkit/settings.yaml
    auths:
      chaosapi.proofdock.io:
        type: bearer
        value: <your_api_token_here>
    controls:
      proofdock:
        provider:
          arguments:
            api_url: https://chaosapi.proofdock.io/
          module: pdchaoskit.controls
          type: python
    
  • You may override the settings file with the environment variable PROOFDOCK_API_TOKEN which overrides the token from your settings file.

The Proofdock Chaos CLI will first try to load the configuration from the settings file. If no configuration is provided, it will try to load it from the environment variables. Please check the usage command to see how to set up the settings file with the Proofdock Chaos CLI.

Putting it all together

Here is a full example to configure the Chaos CLI, run an experiment and list those experiments.

  1. Configure the settings file with the API token that you have gathered from the Proofdock Chaos Engineering Platform.

    chaos configure --token <your-api-token>
    

    More configuration options are vailable. For more options check out the CLI --help command itself or have a look at the docs.

  2. Run an experiment and send its results to the Proofdock cloud.

    chaos run /path/to/experiment.yml
    

    You may use several options like providing descriptions to your experiment run. For more options check out the CLI --help command itself or have a look at the docs.

  3. Retrieve and list experiments from the Proofdock cloud.

    chaos experiment list
    

    For more options check out the CLI --help command itself or have a look at the docs.

You have now configured your Chaos CLI and successfully run an experiment.

Contribute

If you wish to contribute more functions to this package, you are more than welcome to do so. Please, fork this project, make your changes following the usual PEP 8 code style, sprinkling with tests and submit a PR for review.

The Proofdock projects require all contributors to sign a Developer Certificate of Origin on each commit they would like to merge into the master branch of the repository. Please, make sure you can abide by the rules of the DCO before submitting a PR.

Develop

If you wish to develop on this project, make sure to install the development dependencies. But first, create a virtual environment and then install those dependencies.

$ pip install -r requirements-dev.txt -r requirements.txt

Then, point your environment to this directory:

$ python setup.py develop

Now, you can edit the files and they will be automatically be seen by your environment, even when running from the chaos command locally.

Test

To run the tests for the project execute the following:

$ pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proofdock-chaos-kit-1.0.1.tar.gz (18.1 kB view hashes)

Uploaded Source

Built Distribution

proofdock_chaos_kit-1.0.1-py2.py3-none-any.whl (19.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page