{ "info": { "author": "chaostoolkit Team", "author_email": "contact@chaostoolkit.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: Freely Distributable", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation", "Programming Language :: Python :: Implementation :: CPython" ], "description": "# Chaos Toolkit Extension for Google Cloud Engine\n\n[![Build Status](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-google-cloud.svg?branch=master)](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-google-cloud)\n[![Python versions](https://img.shields.io/pypi/pyversions/chaostoolkit-google-cloud.svg)](https://www.python.org/)\n\nThis project is a collection of [actions][] and [probes][], gathered as an\nextension to the [Chaos Toolkit][chaostoolkit]. It targets the\n[Google Cloud Engine][gce] platform.\n\n[actions]: http://chaostoolkit.org/reference/api/experiment/#action\n[probes]: http://chaostoolkit.org/reference/api/experiment/#probe\n[chaostoolkit]: http://chaostoolkit.org\n[gce]: https://cloud.google.com/compute/\n\n## Install\n\nThis package requires Python 3.5+\n\nTo be used from your experiment, this package must be installed in the Python\nenvironment where [chaostoolkit][] already lives.\n\n```\n$ pip install -U chaostoolkit-google-cloud\n```\n\n## Usage\n\nTo use the probes and actions from this package, add the following to your\nexperiment file:\n\n```json\n{\n \"type\": \"action\",\n \"name\": \"swap-nodepool-for-a-new-one\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaosgce.nodepool.actions\",\n \"func\": \"swap_nodepool\",\n \"secrets\": [\"gce\"],\n \"arguments\": {\n \"body\": {\n \"nodePool\": {\n \"config\": { \n \"oauthScopes\": [\n \"gke-version-default\",\n \"https://www.googleapis.com/auth/devstorage.read_only\",\n \"https://www.googleapis.com/auth/logging.write\",\n \"https://www.googleapis.com/auth/monitoring\",\n \"https://www.googleapis.com/auth/service.management.readonly\",\n \"https://www.googleapis.com/auth/servicecontrol\",\n \"https://www.googleapis.com/auth/trace.append\"\n ]\n },\n \"initialNodeCount\": 3,\n \"name\": \"new-default-pool\"\n }\n }\n }\n }\n}\n```\n\nThat's it!\n\nPlease explore the code to see existing probes and actions.\n\n\n## Configuration\n\n### Project and Cluster Information\n\nYou can pass the context via the `configuration` section of your experiment:\n\n```json\n{\n \"configuration\": {\n \"gce_project_id\": \"...\",\n \"gce_cluster_name\": \"...\",\n \"gce_region\": \"...\",\n \"gce_zone\": \"...\"\n }\n}\n```\n\nNote that most functions exposed in this package also take those values\ndirectly when you want specific values for them.\n\n### Credentials\n\nThis extension expects a [service account][sa] with enough permissions to\nperform its operations. Please create such a service account manually (do not\nuse the default one for your cluster if you can, so you'll be able to delete\nthat service account if need be).\n\n[sa]: https://developers.google.com/api-client-library/python/auth/service-accounts#creatinganaccount\n\nOnce you have created your service account, either keep the file on the same\nmachine where you will be running the experiment from. Or, pass its content\nas part of the `secrets` section, although this is not recommended because your\nsensitive data will be quite visible.\n\nHere is the first way:\n\n```json\n{\n \"secrets\": {\n \"gce\": {\n \"service_account_file\": \"/path/to/sa.json\"\n }\n }\n}\n```\n\nWhile the embedded way looks like this:\n\n\n```json\n{\n \"secrets\": {\n \"gce\": {\n \"service_account_info\": {\n \"type\": \"service_account\",\n \"project_id\": \"...\",\n \"private_key_id\": \"...\",\n \"private_key\": \"...\",\n \"client_email\": \"...\",\n \"client_id\": \"...\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://accounts.google.com/o/oauth2/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/....\"\n }\n }\n }\n}\n```\n\n\n### Putting it all together\n\nHere is a full example:\n\n```json\n{\n \"version\": \"1.0.0\",\n \"title\": \"...\",\n \"description\": \"...\",\n \"configuration\": {\n \"gce_project_id\": \"...\",\n \"gce_cluster_name\": \"...\",\n \"gce_region\": \"...\",\n \"gce_zone\": \"...\"\n },\n \"secrets\": {\n \"gce\": {\n \"service_account_file\": \"/path/to/sa.json\"\n }\n },\n \"method\": [\n {\n \"type\": \"action\",\n \"name\": \"swap-nodepool-for-a-new-one\",\n \"provider\": {\n \"type\": \"python\",\n \"module\": \"chaosgce.nodepool.actions\",\n \"func\": \"swap_nodepool\",\n \"secrets\": [\"gce\"],\n \"arguments\": {\n \"body\": {\n \"nodePool\": {\n \"config\": { \n \"oauthScopes\": [\n \"gke-version-default\",\n \"https://www.googleapis.com/auth/devstorage.read_only\",\n \"https://www.googleapis.com/auth/logging.write\",\n \"https://www.googleapis.com/auth/monitoring\",\n \"https://www.googleapis.com/auth/service.management.readonly\",\n \"https://www.googleapis.com/auth/servicecontrol\",\n \"https://www.googleapis.com/auth/trace.append\"\n ]\n },\n \"initialNodeCount\": 3,\n \"name\": \"new-default-pool\"\n }\n }\n }\n }\n }\n ]\n}\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 projects require 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### 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$ pytest\n```\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://chaostoolkit.org", "keywords": "", "license": "Apache License Version 2.0", "maintainer": "", "maintainer_email": "", "name": "chaostoolkit-google-cloud", "package_url": "https://pypi.org/project/chaostoolkit-google-cloud/", "platform": "", "project_url": "https://pypi.org/project/chaostoolkit-google-cloud/", "project_urls": { "Homepage": "http://chaostoolkit.org" }, "release_url": "https://pypi.org/project/chaostoolkit-google-cloud/0.2.2/", "requires_dist": [ "chaostoolkit-lib (>=0.16.0)", "chaostoolkit-kubernetes (>=0.15.0)", "google-auth", "google-auth-httplib2", "google-api-python-client", "logzero" ], "requires_python": ">=3.5.*", "summary": "Chaos Toolkit Extension for Google Cloud Engine", "version": "0.2.2" }, "last_serial": 3861896, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "70c90ec3741cae2d65a590b1fdf573bd", "sha256": "23c03eba711df98abc1f841c55be924eb013a98016b5937b33ac2b0f0f34edb4" }, "downloads": -1, "filename": "chaostoolkit_google_cloud-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "70c90ec3741cae2d65a590b1fdf573bd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 10982, "upload_time": "2018-04-24T11:30:45", "url": "https://files.pythonhosted.org/packages/26/bb/6021b061e33961011a7a183f6b952afe5a423b9f83962fc0ed28dba1e5e7/chaostoolkit_google_cloud-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbf89da0bd524d510a5519f015b43ce7", "sha256": "3c88d8fd8840f676c4b7eda96aa8d94963dec3f1977b322af1d504d2541c0a77" }, "downloads": -1, "filename": "chaostoolkit-google-cloud-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dbf89da0bd524d510a5519f015b43ce7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 12372, "upload_time": "2018-04-24T11:30:46", "url": "https://files.pythonhosted.org/packages/3f/b7/a1da4b24f70750e4b23e6aad73799767da77949237093489ce5813e8bf8b/chaostoolkit-google-cloud-0.1.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "40dd35bec7cae4069b00875297d79a53", "sha256": "bbeaabd4d5acd31b02e27a8cd3f24e5db66fc096205dd3cf5df837606c12d3fc" }, "downloads": -1, "filename": "chaostoolkit_google_cloud-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "40dd35bec7cae4069b00875297d79a53", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 10986, "upload_time": "2018-04-24T11:36:59", "url": "https://files.pythonhosted.org/packages/cc/f0/942d59963ff0602b6f6bf6bcecf7437ea7d969ec5b50637c315d1ad058d5/chaostoolkit_google_cloud-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3691cb3bf60465a00476f34b8d2fcc16", "sha256": "54e1e4f4b0403a2fa13107b70478cb0310408a358bdb3a9f56f52882a5b2b446" }, "downloads": -1, "filename": "chaostoolkit-google-cloud-0.2.1.tar.gz", "has_sig": false, "md5_digest": "3691cb3bf60465a00476f34b8d2fcc16", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 12437, "upload_time": "2018-04-24T11:37:00", "url": "https://files.pythonhosted.org/packages/a6/27/a9288b59acc606c3c1fa227edb83cdba2f768db4a3ef9a224b2e8559e4c7/chaostoolkit-google-cloud-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "acb0ee02b1bf45a901eb1caea99401d8", "sha256": "ee4c943199732cd18e50f20700d473f3d5e38a271a4a6bb5f3fd9d651111ef51" }, "downloads": -1, "filename": "chaostoolkit_google_cloud-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "acb0ee02b1bf45a901eb1caea99401d8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 10978, "upload_time": "2018-05-14T18:03:34", "url": "https://files.pythonhosted.org/packages/24/bc/bbb91d5e1527e9276767d4403bdbdcec8c0ebfda4dbcc4864843cdccd6dc/chaostoolkit_google_cloud-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "42573df7bff62ea6c74987f7d6fc1b0a", "sha256": "e6bb12920c7b540f36dbac3f9f23bc37937adc45040cb9881575d80461890f49" }, "downloads": -1, "filename": "chaostoolkit-google-cloud-0.2.2.tar.gz", "has_sig": false, "md5_digest": "42573df7bff62ea6c74987f7d6fc1b0a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 12688, "upload_time": "2018-05-14T18:03:35", "url": "https://files.pythonhosted.org/packages/07/8e/7a04b168960c94c26ee0a579de2a060fbf0e2ba987c27c547a2b11cb23f2/chaostoolkit-google-cloud-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "acb0ee02b1bf45a901eb1caea99401d8", "sha256": "ee4c943199732cd18e50f20700d473f3d5e38a271a4a6bb5f3fd9d651111ef51" }, "downloads": -1, "filename": "chaostoolkit_google_cloud-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "acb0ee02b1bf45a901eb1caea99401d8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.*", "size": 10978, "upload_time": "2018-05-14T18:03:34", "url": "https://files.pythonhosted.org/packages/24/bc/bbb91d5e1527e9276767d4403bdbdcec8c0ebfda4dbcc4864843cdccd6dc/chaostoolkit_google_cloud-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "42573df7bff62ea6c74987f7d6fc1b0a", "sha256": "e6bb12920c7b540f36dbac3f9f23bc37937adc45040cb9881575d80461890f49" }, "downloads": -1, "filename": "chaostoolkit-google-cloud-0.2.2.tar.gz", "has_sig": false, "md5_digest": "42573df7bff62ea6c74987f7d6fc1b0a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.*", "size": 12688, "upload_time": "2018-05-14T18:03:35", "url": "https://files.pythonhosted.org/packages/07/8e/7a04b168960c94c26ee0a579de2a060fbf0e2ba987c27c547a2b11cb23f2/chaostoolkit-google-cloud-0.2.2.tar.gz" } ] }