Chaos Toolkit Gremlin, Inc. support
Project description
# chaostoolkit-gremlin
[![Build Status](https://travis-ci.org/chaostoolkit/chaostoolkit-gremlin.svg?branch=master)](https://travis-ci.org/chaostoolkit/chaostoolkit-gremlin)
[Gremlin, Inc][gremlin] support for the [Chaos Toolkit][chaostoolkit].
[gremlin]: https://gremlininc.com/
[chaostoolkit]: http://chaostoolkit.org/
## Install
To be used from your experiment, this package must be installed in the Python
environment where [chaostoolkit][] already lives.
[chaostoolkit]: https://github.com/chaostoolkit/chaostoolkit
```
$ pip install chaostoolkit-gremlin
```
## Usage
To use this package, you must create an account with [Gremlin, Inc][gremlin].
Once registered, create a new organisation (formerly known as team). You may
have to ask your Gremlin administrator to do this for you.
Once this is done, you must set the following environmental variables
so the Chaos Toolkit can pick up them:
* `GREMLIN_EMAIL`: the email used to register to Gremlin and associated to that
organisation
* `GREMLIN_PWD`: your password
* `GREMLIN_ORG_NAME`: the oprganisation's name you created
Note that 2FA is not yet implemented in this package.
Next you need to specify to load those
variables and inject them into this package's activities. At the top of the
experiment file, add the following object:
```json
{
"secrets": {
"gremlin": {
"email": "env.GREMLIN_EMAIL",
"password": "env.GREMLIN_PWD",
"org_name": "env.GREMLIN_ORG_NAME"
}
}
}
```
Finally, in all activities where you call a function from this package, make
sure to add the following property:
```json
"secrets": "gremlin"
```
Here is a full example of running a CPU attack experiment:
```json
{
"title": "Can our system handle a node being CPU-busy?",
"description": "CPU-usage may be impactful on our response time",
"secrets": {
"gremlin": {
"email": "env.GREMLIN_EMAIL",
"password": "env.GREMLIN_PWD",
"org_name": "env.GREMLIN_ORG_NAME"
}
},
"method": [
{
"title": "attack-on-cpu",
"type": "action",
"background": true,
"secrets": "gremlin",
"provider": {
"type": "python",
"module": "chaosgremlin.actions",
"func": "attack",
"arguments": {
"command": {
"type": "cpu"
},
"target": {
"type": "Random"
}
}
}
}
]
}
```
## 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/
[![Build Status](https://travis-ci.org/chaostoolkit/chaostoolkit-gremlin.svg?branch=master)](https://travis-ci.org/chaostoolkit/chaostoolkit-gremlin)
[Gremlin, Inc][gremlin] support for the [Chaos Toolkit][chaostoolkit].
[gremlin]: https://gremlininc.com/
[chaostoolkit]: http://chaostoolkit.org/
## Install
To be used from your experiment, this package must be installed in the Python
environment where [chaostoolkit][] already lives.
[chaostoolkit]: https://github.com/chaostoolkit/chaostoolkit
```
$ pip install chaostoolkit-gremlin
```
## Usage
To use this package, you must create an account with [Gremlin, Inc][gremlin].
Once registered, create a new organisation (formerly known as team). You may
have to ask your Gremlin administrator to do this for you.
Once this is done, you must set the following environmental variables
so the Chaos Toolkit can pick up them:
* `GREMLIN_EMAIL`: the email used to register to Gremlin and associated to that
organisation
* `GREMLIN_PWD`: your password
* `GREMLIN_ORG_NAME`: the oprganisation's name you created
Note that 2FA is not yet implemented in this package.
Next you need to specify to load those
variables and inject them into this package's activities. At the top of the
experiment file, add the following object:
```json
{
"secrets": {
"gremlin": {
"email": "env.GREMLIN_EMAIL",
"password": "env.GREMLIN_PWD",
"org_name": "env.GREMLIN_ORG_NAME"
}
}
}
```
Finally, in all activities where you call a function from this package, make
sure to add the following property:
```json
"secrets": "gremlin"
```
Here is a full example of running a CPU attack experiment:
```json
{
"title": "Can our system handle a node being CPU-busy?",
"description": "CPU-usage may be impactful on our response time",
"secrets": {
"gremlin": {
"email": "env.GREMLIN_EMAIL",
"password": "env.GREMLIN_PWD",
"org_name": "env.GREMLIN_ORG_NAME"
}
},
"method": [
{
"title": "attack-on-cpu",
"type": "action",
"background": true,
"secrets": "gremlin",
"provider": {
"type": "python",
"module": "chaosgremlin.actions",
"func": "attack",
"arguments": {
"command": {
"type": "cpu"
},
"target": {
"type": "Random"
}
}
}
}
]
}
```
## 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/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file chaostoolkit-gremlin-0.3.0.tar.gz
.
File metadata
- Download URL: chaostoolkit-gremlin-0.3.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7efc4b441aaeb755a08ccef489fbb646c2b3b217057fe007afa46ef5a203177c |
|
MD5 | e591cd9d1f310378d90b4091a4cf046f |
|
BLAKE2b-256 | 905843a0de5149fd52222f2e7ef68ffc0bea0da33143ecc45edfb0a84d3ded89 |
File details
Details for the file chaostoolkit_gremlin-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: chaostoolkit_gremlin-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 957458cf568f7b0a19e787eb6012e317617c1f7adf3c992a137fd08ee5a81a95 |
|
MD5 | 952708bcca8d54417726214875397bea |
|
BLAKE2b-256 | b153576063cb7ae6feb4d93a2a56fa50056b8ac11640f6612dba728cee2e0eec |