Saravanan666/pypi-org huggingface dataset:
Package: chaostoolkit-docker-swarm
Chaos Toolkit extension for Docker SwarmThis is a Chaos Toolkit extension package with probes and actions for Docker Swarm. Its main motivation is that in a multinode Swarm cluster, Docker provides no method to act oncontainerson remote nodes, e.g. to kill it. Thus, in order to harass a random container in a service, you would have to log in to a Swarm node and perform the command there.This extension solves this shortcoming by launching a global-mode helper service in your swarm which mounts the Docker socket on all nodes and thus allows you to perform specific commands on any node. For more information, seechaostoolkit-docker-swarm-helper.InstallThis package requires Python 3.5+To be used from your experiment, this package must be installed in the Python environment wherechaostoolkitalready lives. A fresh setup may look like this:virtualenvchaosenv-p/usr/bin/python3
../chaosenv/bin/activate
pipinstallchaostoolkitchaostoolkit-docker-swarmUsageversion:1.0.0title:Redis Docker service should survive container deathdescription:Docker Swarm should recreate the Redis containersteady-state-hypothesis:title:Redis service with running container existsprobes:-name:Redis container must existtype:probetolerance:1provider:type:pythonmodule:chaosswarm.probesfunc:running_tasksarguments:service:redismethod:-name:Kill a Redis tasktype:actionprovider:type:pythonmodule:chaosswarm.actionsfunc:kill_taskarguments:service:redispauses:after:7dockerservicecreate--nameredisredis:latest
chaosrun./swarm-experiment.yaml[2020-01-27 20:34:51 INFO] Validating the experiment's syntax
[2020-01-27 20:34:51 INFO] Experiment looks valid
[2020-01-27 20:34:51 INFO] Running experiment: Redis Docker service should survive container death
[2020-01-27 20:34:51 INFO] Steady state hypothesis: Redis service with running container exists
[2020-01-27 20:34:51 INFO] Probe: Redis container must exist
[2020-01-27 20:34:51 INFO] Steady state hypothesis is met!
[2020-01-27 20:34:51 INFO] Action: Kill a Redis task
[2020-01-27 20:34:51 INFO] Pausing after activity for 5s...
[2020-01-27 20:34:56 INFO] Steady state hypothesis: Redis service with running container exists
[2020-01-27 20:34:56 INFO] Probe: Redis container must exist
[2020-01-27 20:34:56 INFO] Steady state hypothesis is met!
[2020-01-27 20:34:56 INFO] Let's rollback...
[2020-01-27 20:34:56 INFO] No declared rollbacks, let's move on.
[2020-01-27 20:34:56 INFO] Experiment ended with status: completedConfigurationThis extension assumes your environment is set up for Docker access, e.g. using Docker environment variables.TestTo run the tests for the project execute the following:python3setup.pytestThere are integration tests which assume you have a Docker Swarm cluster available. You can promote your local dev Docker to a 1-node Swarm cluster with:dockerswarminitContributeIf 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 usualPEP 8code style, sprinkling with tests and submit a PR for review.
Package: chaostoolkit-dynatrace
Chaos Toolkit extension for DynatraceDynatracesupport for theChaos Toolkit.InstallTo be used from your experiment, this package must be installed in the Python
environment wherechaostoolkitalready lives.$ pip install chaostoolkit-dynatraceUsageTo use this package, you must  have access to a Dynatrace instance viaDynatraceApiand be allowed to connect to it.the access credentials to the api must be specified in the configuration section{"configuration":{"dynatrace_base_url":"https://{your-environment-id}.live.dynatrace.com"},"secrets":{"dynatrace":{"token":"..."}}}Here is an example of how to get the failure rate of a service in Dynatrace.
for this example, the api for validate de failure rate isMetric-v1{"type":"probe","name":"get-failure-rate-services","provider":{"type":"python","module":"chaosdynatrace.timeseries.v1.probes","func":"failure_rate","secrets":["dynatrace"],"arguments":{"entity":"SERVICE-665B05BC92550119","relative_time":"30mins","failed_percentage":1}}}The probe returnstrueif the api request failure percentage is less than
thefailed_percentagevalue or returnfalse.The extension also exports a control to send events to Dynatrace. For instance:{"controls":[{"name":"dynatrace","provider":{"type":"python","secrets":["dynatrace"],"module":"chaosdynatrace.events.v2.control"}}]}This will send start/stop logs of the experiment events.You can correlate them to traces using theOpen Telemetryextension.{"configuration":{"dynatrace_base_url":"https://{your-environment-id}.live.dynatrace.com","tracing_provider":"opentelemetry","tracing_opentelemetry_exporter":"oltp-http","tracing_opentelemetry_collector_endpoint":"https://{your-environment-id}.live.dynatrace.com/api/v2/otlp/v1/traces","tracing_opentelemetry_collector_headers":{"Authorization":"Api-Token <TOKEN>"}},"controls":[{"name":"opentracing","provider":{"type":"python","module":"chaostracing.control"}}]The logs and traces will be automatically correlated.ContributeIf 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
usualPEP 8code style, sprinkling with tests and submit a PR for
review.DevelopIf you wish to develop on this project, make sure to install the development
dependencies. But first,create a virtual environmentand then install
those dependencies.$pipinstall-rrequirements-dev.txt-rrequirements.txtThen, point your environment to this directory:$pipinstall-e.Now, you can edit the files and they will be automatically be seen by your
environment, even when running from thechaoscommand locally.TestTo run the tests for the project execute the following:$ pytest
Package: chaostoolkit-extension-template
Chaos Toolkit Extension TemplateThis project should be used as a starting point to create your own
Chaos Toolkit extension.InstallThis package requires Python 3.7+To be used from your experiment, this package must be installed in the Python
environment wherechaostoolkitalready lives.$ pip install chaostoolkit-<your extension name here>UsageThat's it!Please explore the code to see existing probes and actions.ConfigurationTestTo run the tests for the project execute the following:$ pdm run testFormatting and LintingWe use a combination ofblack,ruff, andisortto both lint and format this repositories code.Before raising a Pull Request, we recommend you run formatting against your
code with:$pdmrunformatThis will automatically format any code that doesn't adhere to the formatting
standards.As some things are not picked up by the formatting, we also recommend you run:$pdmrunlintTo ensure that any unused import statements/strings that are too long, etc.
are also picked up.ContributeIf 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
usualblackcode style, sprinkling with tests and submit a PR for
review.To contribute to this project, you will also need to installpdm.
Package: chaostoolkit-gandi
Chaos Toolkit extension for the Gandi platformThis project is a collection ofactionsandprobes, gathered as an
extension to theChaos Toolkit.InstallThis package requires Python 3.5+To be used from your experiment, this package must be installed in the Python
environment wherechaostoolkitalready lives.$ pip install -U chaostoolkit-gandiUsageTo use the probes and actions from this package, add the following to your
experiment file:{"version":"1.0.0","title":"Our domains are not going expiring within a month","description":"We need time to renew.","secrets":{"gandi":{"apikey":{"type":"env","key":"GANDI_API_KEY"}}},"steady-state-hypothesis":{"title":"Check domains are all more than 1 month away from expiring","probes":[{"type":"probe","name":"list-my-domains","tolerance":{"type":"probe","name":"validate-domain-expire-date","provider":{"type":"python","secrets":["gandi"],"module":"chaosgandi.domains.tolerances","func":"domains_should_not_expire_in","arguments":{"when":"1 month"}}},"provider":{"type":"python","secrets":["gandi"],"module":"chaosgandi.domains.probes","func":"list_domains"}}]},"method":[]}That's it!Set theGANDI_API_KEYenvironment variable to your Gandi API Key.Please explore the code to see existing probes and actions.ContributeIf 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
usualPEP 8code style, sprinkling with tests and submit a PR for
review.The Chaos Toolkit projects require all contributors must sign aDeveloper Certificate of Originon 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.DevelopIf you wish to develop on this project, make sure to install the development
dependencies. But first,create a virtual environmentand then install
those dependencies.$pipinstall-rrequirements-dev.txt-rrequirements.txtThen, point your environment to this directory:$pipinstall-e.Now, you can edit the files and they will be automatically be seen by your
environment, even when running from thechaoscommand locally.TestTo run the tests for the project execute the following:$ pytest
Package: chaostoolkit-google-cloud-platform
Google Cloud Platform Extension for the Chaos ToolkitCommunity•ChangeLogWelcome to the Google Cloud Platform (GCP) extension for Chaos Toolkit. The
package aggregates activities to target your GCP projects and explore
your resilience via Chaos Engineering experiments.InstallThis package requires Python 3.8+To be used from your experiment, this package must be installed in the Python
environment where Chaos Toolkit already lives.$ pip install -U chaostoolkit-google-cloud-platformUsageTo use the probes and actions from this package, add the following to your
experiment file:{"version":"1.0.0","title":"Our users should not be impacted by increased latency from our services","description":"Use traffic shaping from the load Balancer to explore the impact of latency on our users","method":[{"name":"add-delay-to-traffic","type":"action","provider":{"type":"python","module":"chaosgcp.lb.actions","func":"inject_traffic_delay","arguments":{"url_map":"my-service","target_name":"all-paths","target_path":"/*","delay_in_seconds":1,"impacted_percentage":80}},"pauses":{"after":180}}],"rollbacks":[{"name":"remove-traffic-delay","type":"action","provider":{"type":"python","module":"chaosgcp.lb.actions","func":"remove_fault_injection_traffic_policy","arguments":{"url_map":"my-service","target_name":"all-paths","target_path":"/*"}}}]}That's it! You can now run it aschaos run experiment.jsonPlease explore the code to see existing probes and actions.The extension picks up the credentials found on the machine running the
experiment as describe in the officialPython GCP client.ContributeIf 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
usualPEP 8code style, sprinkling with tests and submit a PR for
review.The Chaos Toolkit projects require all contributors must sign aDeveloper Certificate of Originon 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.DevelopIf you wish to develop on this project, make sure to install the development
dependencies. You will need to installPDM.$pdminstall--devWhenever you need to make contribution, ensure to run the linter as follows:$pdmrunformat$pdmrunlintNow, you can edit the files and they will be automatically be seen by your
environment, even when running from thechaoscommand locally.TestTo run the tests for the project execute the following:$ pdm run test
Package: chaostoolkit-grafana
Grafana extension for the Chaos Toolkit ExtensionThis project should be used as a starting point to create your own
Chaos Toolkit extension.InstallThis package requires Python 3.7+To be used from your experiment, this package must be installed in the Python
environment wherechaostoolkitalready lives.$ pip install chaostoolkit-grafanaUsageSending Chaos Toolkit logs to LokiTo send the Chaos Toolkit logs to Loki endpoints, you need to enable the
according control as follows:{"secrets":{"grafana":{"auth":["admin","admin"]}},"controls":[{"name":"loki","provider":{"type":"python","module":"chaosgrafana.controls.loki","secrets":["grafana"],"arguments":{"loki_endpoint":"http://localhost:3100","tags":{"service":"something"}}}}]}You can set two other arguments to the control:trace_id: This must be a string which will identify this run uniquely in
your logs. If none is a provided, a random string is generated.experiment_ref: Sometimes it's useful to identify a particular experiment,
not just its run, throughout many runs. This is the string to do that. If
none is provided, a hash of the experiment is performed and used. The hash
is not stable across changes of the experiment of course.These are particularly useful when you cpuple this extension with others like
Prometheus where you want to cross-reference between logs and metrics.TestTo run the tests for the project execute the following:$ make testsFormatting and LintingWe use a combination ofblack,flake8, andisortto both lint and format this repositories code.Before raising a Pull Request, we recommend you run formatting against your
code with:$makeformatThis will automatically format any code that doesn't adhere to the formatting
standards.As some things are not picked up by the formatting, we also recommend you run:$makelintTo ensure that any unused import statements/strings that are too long, etc.
are also picked up.ContributeIf 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
usualPEP 8code style, sprinkling with tests and submit a PR for
review.
Package: chaostoolkit-gremlin
# 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/## InstallTo be used from your experiment, this package must be installed in the Pythonenvironment where [chaostoolkit][] already lives.[chaostoolkit]: https://github.com/chaostoolkit/chaostoolkit```$ pip install chaostoolkit-gremlin```## UsageTo use this package, you must create an account with [Gremlin, Inc][gremlin].Once registered, create a new organisation (formerly known as team). You mayhave to ask your Gremlin administrator to do this for you.Once this is done, you must set the following environmental variablesso the Chaos Toolkit can pick up them:* `GREMLIN_EMAIL`: the email used to register to Gremlin and associated to thatorganisation* `GREMLIN_PWD`: your password* `GREMLIN_ORG_NAME`: the oprganisation's name you createdNote that 2FA is not yet implemented in this package.Next you need to specify to load thosevariables and inject them into this package's activities. At the top of theexperiment 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, makesure 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"}}}}]}```## ContributeIf you wish to contribute more functions to this package, you are more thanwelcome to do so. Please, fork this project, make your changes following theusual [PEP 8][pep8] code style, sprinkling with tests and submit a PR forreview.[pep8]: https://pycodestyle.readthedocs.io/en/latest/
Package: chaostoolkit-gremlin-yy
# chaostoolkit-gremlin-yy[![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://github.com/beingcoder/chaostoolkit-gremlin[gremlin]:https://www.gremlin.com/[chaostoolkit]:http://chaostoolkit.org/## InstallTo 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 installchaostoolkit-gremlin-yy`## UsageTo 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:team_id: the email used to register to Gremlin and associated to that
organisationapi_key: your api keyNote 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 under secret:api_key: api_key_value
team_id: team_id_valueFinally, in all activities where you call a function from this package, make
sure to add the following property:json
“secrets”: [“gremlin”]## ContributeIf 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/
Package: chaostoolkit-honeycomb
Chaos Toolkit Extension for HoneycombThis project contains Chaos Toolkit activities for theHoneycombplatform.InstallThis package requires Python 3.7+To be used from your experiment, this package must be installed in the Python
environment wherechaostoolkitalready lives.$ pip install chaostoolkit-honeycombUsage{"title":"SLO should not be impacted","description":"n/a","secrets":{"honeycomb":{"api_key":{"type":"env","key":"HONEYCOMB_API_KEY"}}},"steady-state-hypothesis":{"title":"Use SLO as Steady-State Hypothesis verification","probes":[{"name":"slo has enough budget left","type":"probe","tolerance":true,"provider":{"type":"python","secrets":["honeycomb"],"module":"chaoshoneycomb.slo.probes","func":"slo_has_enough_remaining_budget","arguments":{"dataset_slug":"ds","slo_id":"slo1","min_budget":7.5}}}]}}That's it!Please explore the code to see existing probes and actions.ConfigurationSpecify the Honeycomb API key either via thesecretsblock or via
theHONEYCOMB_API_KEYenvironment variable. In that later case, you
can in fact skip the declaration on thesecretsblock as the
extension will look for it anyway.TestTo run the tests for the project execute the following:$ pdm run testFormatting and LintingWe use a combination ofblack,ruff, andisortto both lint and format this repositories code.Before raising a Pull Request, we recommend you run formatting against your
code with:$pdmrunformatThis will automatically format any code that doesn't adhere to the formatting
standards.As some things are not picked up by the formatting, we also recommend you run:$pdmrunlintTo ensure that any unused import statements/strings that are too long, etc.
are also picked up.ContributeIf 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
usualblackcode style, sprinkling with tests and submit a PR for
review.To contribute to this project, you will also need to installpdm.
Package: chaostoolkit-instana
# Chaos Toolkit Instana Extension[![Build Status](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-instana.svg?branch=master)](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-instana)
[![Python versions](https://img.shields.io/pypi/pyversions/chaostoolkit-instana.svg)](https://www.python.org/)
[![Requirements Status](https://requires.io/github/chaostoolkit-incubator/chaostoolkit-instana/requirements.svg?branch=master)](https://requires.io/github/chaostoolkit-incubator/chaostoolkit-instana/requirements/?branch=master)
[![Has wheel](https://img.shields.io/pypi/wheel/chaostoolkit-instana.svg)](http://pythonwheels.com/)This extension package provides probes and actions for Chaos Engineering
experiments against a Instana instance using the
[Chaos Toolkit][chaostoolkit].[actions]:http://chaostoolkit.org/reference/api/experiment/#action[probes]:http://chaostoolkit.org/reference/api/experiment/#probe[chaostoolkit]:http://chaostoolkit.org## InstallThis package requires Python 3.5+To be used from your experiment, this package must be installed in the Python
environment where [chaostoolkit][] already lives.` $ pip install-Uchaostoolkit-instana`## UsageTo use the probes and actions from this package, add the following secrets and configuration to your environment or experiments file:### SecretsINSTANA_API_TOKEN- Token for accessing the Instana API### ConfigurationINSTANA_HOST- Host of the Instana instance that you wish to connect toA [collection of samples](samples/) are provided so you can see existing probes and actions.### DiscoveryYou may use the Chaos Toolkit to discover the capabilities of this extension:` $ chaos discoverchaostoolkit-instana--no-install`If you have logged in against a Instana environment, this will discover
information about it along the way.## Configuration## TestTo run the tests for the project execute the following:` $ pip install-rrequirements-dev.txt$ pytest `## ContributeIf 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 projects require 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### DevelopIf 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-rrequirements-dev.txt-rrequirements.txt `Then, point your environment to this directory:`console $ pip install-e. `Now, you can edit the files and they will be automatically be seen by your
environment, even when running from thechaoscommand locally.