# chaostoolkit-gremlin
[](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/
[](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/
Release files for chaostoolkit-gremlin 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chaostoolkit-gremlin-0.3.0.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chaostoolkit_gremlin-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / chaostoolkit-gremlin-0.3.0.tar.gz
| Download URL | chaostoolkit-gremlin-0.3.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7efc4b441aaeb755a08ccef489fbb646c2b3b217057fe007afa46ef5a203177c
|
|
BLAKE2b-256 checksum How to use checksums |
905843a0de5149fd52222f2e7ef68ffc0bea0da33143ecc45edfb0a84d3ded89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / chaostoolkit_gremlin-0.3.0-py3-none-any.whl
| Download URL | chaostoolkit_gremlin-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
957458cf568f7b0a19e787eb6012e317617c1f7adf3c992a137fd08ee5a81a95
|
|
BLAKE2b-256 checksum How to use checksums |
b153576063cb7ae6feb4d93a2a56fa50056b8ac11640f6612dba728cee2e0eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |