{"id":22048898,"url":"https://github.com/chaostoolkit-incubator/chaostoolkit-cloud-foundry","last_synced_at":"2025-05-08T23:05:32.453Z","repository":{"id":55596208,"uuid":"116668969","full_name":"chaostoolkit-incubator/chaostoolkit-cloud-foundry","owner":"chaostoolkit-incubator","description":"Cloud Foundry extension for the Chaos Toolkit","archived":false,"fork":false,"pushed_at":"2023-02-27T08:03:34.000Z","size":75,"stargazers_count":6,"open_issues_count":9,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-08T23:05:18.098Z","etag":null,"topics":["chaos-engineering","chaostoolkit-extension","cloudfoundry","pcf"],"latest_commit_sha":null,"homepage":"https://chaostoolkit.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaostoolkit-incubator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-08T11:34:45.000Z","updated_at":"2023-02-26T21:48:25.000Z","dependencies_parsed_at":"2023-01-29T02:31:20.479Z","dependency_job_id":null,"html_url":"https://github.com/chaostoolkit-incubator/chaostoolkit-cloud-foundry","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-cloud-foundry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-cloud-foundry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-cloud-foundry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaostoolkit-incubator%2Fchaostoolkit-cloud-foundry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaostoolkit-incubator","download_url":"https://codeload.github.com/chaostoolkit-incubator/chaostoolkit-cloud-foundry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160775,"owners_count":21863628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaos-engineering","chaostoolkit-extension","cloudfoundry","pcf"],"created_at":"2024-11-30T14:13:39.965Z","updated_at":"2025-05-08T23:05:32.432Z","avatar_url":"https://github.com/chaostoolkit-incubator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaostoolkit-incubator%2Fchaostoolkit-cloud-foundry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaostoolkit-incubator%2Fchaostoolkit-cloud-foundry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaostoolkit-incubator%2Fchaostoolkit-cloud-foundry/lists"}