Skip to main content


Google Cloud Platform Extension for the Chaos Toolkit

Release Build GitHub issues License Python version

Community • ChangeLog


Welcome 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.

Install

This 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-platform

Usage

To 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 as chaos run experiment.json

Please 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 official Python GCP client.

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 code style, sprinkling with tests and submit a PR for review.

The Chaos Toolkit projects require all contributors must sign a Developer Certificate of Origin 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.

Develop

If you wish to develop on this project, make sure to install the development dependencies. You will need to install PDM.

$ pdm install --dev

Whenever you need to make contribution, ensure to run the linter as follows:

$ pdm run format
$ pdm run lint

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:

$ pdm run test

Metadata

Release files for chaostoolkit-google-cloud-platform 0.37.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chaostoolkit-google-cloud-platform 0.37.0
File Size Uploaded Provenance Actions
chaostoolkit_google_cloud_platform-0.37.0.tar.gz 46.8 kB Without provenance Details for chaostoolkit_google_cloud_platform-0.37.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chaostoolkit-google-cloud-platform 0.37.0
File Interpreter ABI Platform Actions
chaostoolkit_google_cloud_platform-0.37.0-py3-none-any.whl Python 3 none any Details for chaostoolkit_google_cloud_platform-0.37.0-py3-none-any.whl

Total release size: 99.1 kB

Release files / chaostoolkit_google_cloud_platform-0.37.0.tar.gz

Download URL chaostoolkit_google_cloud_platform-0.37.0.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
416fde8a51f6c1dd8d54ffeb01be58b71ead93eac89fd97c6eff4366cc3c7524
BLAKE2b-256 checksum
How to use checksums
fa11eb5c76632ba459e1b6cc5135817b61089f4855a9642889036385c6f7102c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / chaostoolkit_google_cloud_platform-0.37.0-py3-none-any.whl

Download URL chaostoolkit_google_cloud_platform-0.37.0-py3-none-any.whl
Size 52.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
882c4e0cc09036e0eac0cb27d9a9ec6c6719b7246392282a3a1ba3d7455b78a6
BLAKE2b-256 checksum
How to use checksums
bf5da4518bee9574efecdbe655ecc7f56333fb6b00f88320b465291a3e83cb6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Security for chaostoolkit-google-cloud-platform 0.37.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.37.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page