Skip to main content

ChaosIQ plugins for the Chaos Toolkit project

Project description

# chaosiq client

[![Build Status](https://travis-ci.org/chaosiq/chaosiq.svg?branch=master)](https://travis-ci.org/chaosiq/chaosiq)

Client library to the [chaosiq.io][chaosiq] services.

[chaosiq]: http://www.chaosiq.io/ [chaostoolkit]: http://chaostoolkit.org/

## Overview

This open-source library provide a simple client to the [chaosiq.io][chaosiq] services. Namely it supports the following features:

  • a command line interface to manage your local chaosiq configuration

  • an extension to the [chaostoolkit][chaostoolkit] discover command that interfaces with the chaosiq.io API to enrich your user experience of the chaostoolkit default behavior.

## Install

Once you have installed the requirements below, you can install the chaosiq client as follows:

`console (chaosiq) $ pip install -U chaosiq `

## Usage

### The chaosiq CLI

The chaosiq client comes with a chaosiq command line interface. That CLI provides a few commands to manage your local chaosiq configuration.

>From your virtual environment, invoke it as follows:

`console (chaosiq) $ chaosiq --help `

#### Create a default configuration

To talk with the chaosiq.io services, you will need a token, stored locally in your configuration file. You can intiailize such configuration file as follows:

`console (chaosiq) $ chaosiq config init `

The configuration is located at ~/.chaosiq/config.

#### Add your token

You must add your chaosiq token to the configuration file under auth/token.

### The chaostoolkit CLI overloading

In addition to its own set of commands, the client overloads the chaostoolkit CLI to enrich it.

#### The discover overloading

The chaosiq client overloads the discover method by taking its output and sending it to the chaosiq.io API endpoint. The returned output from that call is added to the original discovery result.

So here is what happens when you run:

`console $ chaos discover chaostoolkit-kubernetes `

As you have installed the chaosiq client, the chaoostoolkit discover command will perform as usual, and discover capabilities from the given extension package (as well as discovering your system, Kubernetes in this case). That is the builtin discover support from chaostoolkit. On top of that, chaosiq will extend this by sending discovered features to the chaosiq API which will return a set of potential experiments that could be run with those parameters.

## Requirements

### Python

To install this client, you need [Python 3.5][python] or above installed on your machine:

[python]: https://www.python.org/

On MacOSX:

`console $ brew install python3 `

On Debian/Ubuntu:

`console $ sudo apt-get install python3 python3-venv `

On CentOS:

`console $ sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm $ sudo yum -y install python35u `

Notice, on CentOS, the Python 3.5 binary is named python3.5 rather than python3 as other systems.

On Windows:

[Download the latest binary installer][wininst] from the Python website.

[wininst]: https://www.python.org/downloads/windows/

### Virtual Environment

Once Python is installed, create a [Python virtual environment][venv]:

[venv]: https://docs.python.org/3/tutorial/venv.html

`console $ python3 -m venv ~/.venvs/chaosiq `

Make sure to activate thsi environment every time you want to run chaosiq:

`console $ source ~/.venvs/chaosiq/bin/activate `

## 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][pep8] code style, sprinkling with tests and submit a PR for review.

[pep8]: https://pycodestyle.readthedocs.io/en/latest/

[chaosiq][chaosiq] requires all contributors must sign a [Developer Certificate of Origin][dco] 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.

[dco]: https://github.com/probot/dco#how-it-works

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

chaosiq-0.2.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

chaosiq-0.2.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file chaosiq-0.2.1.tar.gz.

File metadata

  • Download URL: chaosiq-0.2.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for chaosiq-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4583eb6579372bb45d6a1499501d135b39603b9e9fd2f4884a87db2d2e776322
MD5 c8d6ae297f26a8866e62acb3fec56445
BLAKE2b-256 ca16b5150db52855d73339fbf559d40add596b5f8f3bbc9a8a4fa12855f933e3

See more details on using hashes here.

File details

Details for the file chaosiq-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for chaosiq-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39e0b4cba7588d76bd03f99fed95df8b5e73563448bcd2ea7172404e430d4757
MD5 98016e2cd07189976637c5d5a33c99eb
BLAKE2b-256 030f6309a763cf6203a1647d9f665a0ccabb2f98d15b417602a47b69a146c1bc

See more details on using hashes here.

Supported by

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