chaostoolkit-cloud-foundry


Namechaostoolkit-cloud-foundry JSON
Version 0.7.3 PyPI version JSON
download
home_pagehttp://chaostoolkit.org
SummaryChaos Toolkit Extension for Cloud Foundry
upload_time2023-02-27 08:04:21
maintainer
docs_urlNone
authorchaostoolkit Team
requires_python>=3.7
licenseApache License Version 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Chaos Toolkit Cloud Foundry Extension

[![Build Status](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-cloud-foundry.svg?branch=master)](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-cloud-foundry)
[![Python versions](https://img.shields.io/pypi/pyversions/chaostoolkit-cloud-foundry.svg)](https://www.python.org/)
[![Requirements Status](https://requires.io/github/chaostoolkit-incubator/chaostoolkit-cloud-foundry/requirements.svg?branch=master)](https://requires.io/github/chaostoolkit-incubator/chaostoolkit-cloud-foundry/requirements/?branch=master)
[![Has wheel](https://img.shields.io/pypi/wheel/chaostoolkit-cloud-foundry.svg)](http://pythonwheels.com/)

This extension package provides probes and actions for Chaos Engineering
experiments against a Cloud Foundry instance using the
[Chaos Toolkit][chaostoolkit].

## Install

This package requires Python 3.7+

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 -U chaostoolkit-cloud-foundry
```

## Usage

To use the probes and actions from this package, add a similar payload to your
experiment file:

```json
{
    "type": "action",
    "name": "terminate-random-instance",
    "provider": {
        "type": "python",
        "module": "chaoscf.probes",
        "func": "terminate_some_random_instance",
        "arguments": {
            "name": "my-app",
            "org_name": "my-org",
            "space_name": "my-space"
        }
    }
},
{
    "type": "probe",
    "name": "fetch-app-statistics",
    "provider": {
        "type": "python",
        "module": "chaoscf.probes",
        "func": "get_app_stats",
        "arguments": {
            "name": "my-app",
            "org_name": "my-org",
            "space_name": "my-space"
        }
    }
}
```

That's it!

Please explore the code to see existing probes and actions.

### Discovery

You may use the Chaos Toolkit to discover the capabilities of this extension:

```
$ chaos discover chaostoolkit-cloud-foundry --no-install
```

If you have logged in against a Cloud Foundry environment, this will discover
information about it along the way.

## Configuration

This extension to the Chaos Toolkit need credentials to a Cloud Foundry account
with appropriate scopes. Please add the following sections to your experiment
file:

```json
{
    "configuration": {
        "cf_api_url": "https://api.local.pcfdev.io",
        "cf_verify_ssl": false
    },
    "secrets": {
        "cloudfoundry": {
            "cf_username": "user",
            "cf_password": "pass"
        }
    }
}
```

You may leave `"cf_verifiy_ssl"` out of the configuration when you want to
verify TLS certificates. Usually, local environments are self-signed so it
may be useful to disable that check in that case.

You may also specify the `"cf_client_id"` and `"cf_client_secret"` secrets
when you need. Their default values are `"cf"` and `""` respectively. These
work well against a local [PCF dev][pcfdev] install.

[pcfdev]: https://pivotal.io/pcf-dev

Then in your probe or action:

```json
{
    "type": "probe",
    "name": "fetch-app-statistics",
    "provider": {
        "type": "python",
        "secrets": ["cloudfoundry"],
        "module": "chaoscf.probes",
        "func": "get_app_stats",
        "arguments": {
            "name": "my-app",
            "org_name": "my-org",
            "space_name": "my-space"
        }
    }
}
```


## Test

To run the tests for the project execute the following:

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

## 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/

The Chaos Toolkit project 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


### Develop

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

[venv]: http://chaostoolkit.org/reference/usage/install/#create-a-virtual-environment

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

Then, point your environment to this directory:

```console
$ 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:

```
$ python setup.py test
```

            

Raw data

            {
    "_id": null,
    "home_page": "http://chaostoolkit.org",
    "name": "chaostoolkit-cloud-foundry",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "chaostoolkit Team",
    "author_email": "contact@chaostoolkit.org",
    "download_url": "https://files.pythonhosted.org/packages/0a/dc/3cd5456b54800d0be8fc2b24761466605864c29b871fd1649c070920b77a/chaostoolkit-cloud-foundry-0.7.3.tar.gz",
    "platform": null,
    "description": "# Chaos Toolkit Cloud Foundry Extension\n\n[![Build Status](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-cloud-foundry.svg?branch=master)](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-cloud-foundry)\n[![Python versions](https://img.shields.io/pypi/pyversions/chaostoolkit-cloud-foundry.svg)](https://www.python.org/)\n[![Requirements Status](https://requires.io/github/chaostoolkit-incubator/chaostoolkit-cloud-foundry/requirements.svg?branch=master)](https://requires.io/github/chaostoolkit-incubator/chaostoolkit-cloud-foundry/requirements/?branch=master)\n[![Has wheel](https://img.shields.io/pypi/wheel/chaostoolkit-cloud-foundry.svg)](http://pythonwheels.com/)\n\nThis extension package provides probes and actions for Chaos Engineering\nexperiments against a Cloud Foundry instance using the\n[Chaos Toolkit][chaostoolkit].\n\n## Install\n\nThis package requires Python 3.7+\n\nTo be used from your experiment, this package must be installed in the Python\nenvironment where [chaostoolkit][] already lives.\n\n[chaostoolkit]: https://github.com/chaostoolkit/chaostoolkit\n\n```\n$ pip install -U chaostoolkit-cloud-foundry\n```\n\n## Usage\n\nTo use the probes and actions from this package, add a similar payload to your\nexperiment file:\n\n```json\n{\n    \"type\": \"action\",\n    \"name\": \"terminate-random-instance\",\n    \"provider\": {\n        \"type\": \"python\",\n        \"module\": \"chaoscf.probes\",\n        \"func\": \"terminate_some_random_instance\",\n        \"arguments\": {\n            \"name\": \"my-app\",\n            \"org_name\": \"my-org\",\n            \"space_name\": \"my-space\"\n        }\n    }\n},\n{\n    \"type\": \"probe\",\n    \"name\": \"fetch-app-statistics\",\n    \"provider\": {\n        \"type\": \"python\",\n        \"module\": \"chaoscf.probes\",\n        \"func\": \"get_app_stats\",\n        \"arguments\": {\n            \"name\": \"my-app\",\n            \"org_name\": \"my-org\",\n            \"space_name\": \"my-space\"\n        }\n    }\n}\n```\n\nThat's it!\n\nPlease explore the code to see existing probes and actions.\n\n### Discovery\n\nYou may use the Chaos Toolkit to discover the capabilities of this extension:\n\n```\n$ chaos discover chaostoolkit-cloud-foundry --no-install\n```\n\nIf you have logged in against a Cloud Foundry environment, this will discover\ninformation about it along the way.\n\n## Configuration\n\nThis extension to the Chaos Toolkit need credentials to a Cloud Foundry account\nwith appropriate scopes. Please add the following sections to your experiment\nfile:\n\n```json\n{\n    \"configuration\": {\n        \"cf_api_url\": \"https://api.local.pcfdev.io\",\n        \"cf_verify_ssl\": false\n    },\n    \"secrets\": {\n        \"cloudfoundry\": {\n            \"cf_username\": \"user\",\n            \"cf_password\": \"pass\"\n        }\n    }\n}\n```\n\nYou may leave `\"cf_verifiy_ssl\"` out of the configuration when you want to\nverify TLS certificates. Usually, local environments are self-signed so it\nmay be useful to disable that check in that case.\n\nYou may also specify the `\"cf_client_id\"` and `\"cf_client_secret\"` secrets\nwhen you need. Their default values are `\"cf\"` and `\"\"` respectively. These\nwork well against a local [PCF dev][pcfdev] install.\n\n[pcfdev]: https://pivotal.io/pcf-dev\n\nThen in your probe or action:\n\n```json\n{\n    \"type\": \"probe\",\n    \"name\": \"fetch-app-statistics\",\n    \"provider\": {\n        \"type\": \"python\",\n        \"secrets\": [\"cloudfoundry\"],\n        \"module\": \"chaoscf.probes\",\n        \"func\": \"get_app_stats\",\n        \"arguments\": {\n            \"name\": \"my-app\",\n            \"org_name\": \"my-org\",\n            \"space_name\": \"my-space\"\n        }\n    }\n}\n```\n\n\n## Test\n\nTo run the tests for the project execute the following:\n\n```\n$ pip install -r requirements-dev.txt\n$ pytest\n```\n\n## Contribute\n\nIf you wish to contribute more functions to this package, you are more than\nwelcome to do so. Please, fork this project, make your changes following the\nusual [PEP 8][pep8] code style, sprinkling with tests and submit a PR for\nreview.\n\n[pep8]: https://pycodestyle.readthedocs.io/en/latest/\n\nThe Chaos Toolkit project requires all contributors must sign a\n[Developer Certificate of Origin][dco] on each commit they would like to merge\ninto the master branch of the repository. Please, make sure you can abide by\nthe rules of the DCO before submitting a PR.\n\n[dco]: https://github.com/probot/dco#how-it-works\n\n\n### Develop\n\nIf you wish to develop on this project, make sure to install the development\ndependencies. But first, [create a virtual environment][venv] and then install\nthose dependencies.\n\n[venv]: http://chaostoolkit.org/reference/usage/install/#create-a-virtual-environment\n\n```console\n$ pip install -r requirements-dev.txt -r requirements.txt \n```\n\nThen, point your environment to this directory:\n\n```console\n$ python setup.py develop\n```\n\nNow, you can edit the files and they will be automatically be seen by your\nenvironment, even when running from the `chaos` command locally.\n\n### Test\n\nTo run the tests for the project execute the following:\n\n```\n$ python setup.py test\n```\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0",
    "summary": "Chaos Toolkit Extension for Cloud Foundry",
    "version": "0.7.3",
    "project_urls": {
        "Homepage": "http://chaostoolkit.org"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37bf0ad0ff2f0ccc40fd0b2ea57bf5ce0a840182c351881485bba4e837d93892",
                "md5": "fb054d6610289f65c17be083c7aaf2d7",
                "sha256": "7fe8898956be863d9bac9bc6a0e210b422e5e90b88997504e3d9fbe1d436f38b"
            },
            "downloads": -1,
            "filename": "chaostoolkit_cloud_foundry-0.7.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb054d6610289f65c17be083c7aaf2d7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 13569,
            "upload_time": "2023-02-27T08:04:19",
            "upload_time_iso_8601": "2023-02-27T08:04:19.906806Z",
            "url": "https://files.pythonhosted.org/packages/37/bf/0ad0ff2f0ccc40fd0b2ea57bf5ce0a840182c351881485bba4e837d93892/chaostoolkit_cloud_foundry-0.7.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0adc3cd5456b54800d0be8fc2b24761466605864c29b871fd1649c070920b77a",
                "md5": "c7a32a399cefcf6561a4c9bbdc506cc9",
                "sha256": "7587fd40adf308bfea337dc6b4a12e0b7a4d9ed51ba89265504f52213aa4e2c5"
            },
            "downloads": -1,
            "filename": "chaostoolkit-cloud-foundry-0.7.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c7a32a399cefcf6561a4c9bbdc506cc9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 17508,
            "upload_time": "2023-02-27T08:04:21",
            "upload_time_iso_8601": "2023-02-27T08:04:21.582562Z",
            "url": "https://files.pythonhosted.org/packages/0a/dc/3cd5456b54800d0be8fc2b24761466605864c29b871fd1649c070920b77a/chaostoolkit-cloud-foundry-0.7.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-27 08:04:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "chaostoolkit-cloud-foundry"
}
        
Elapsed time: 0.20188s