Π·Π΅Ρ€ΠΊΠ°Π»ΠΎ ΠΈΠ·
1
0
Π€ΠΎΡ€ΠΊΠ½ΡƒΡ‚ΡŒ 0
An API for introducing chaos into Azure PaaS offerings using configurable extensions 🌩
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Ethan Arrowood 4633a88eae
fix npm run test to npm test
2018-09-26 11:35:36 -04:00
.github Update style to match platform-chaos (#7) 2018-09-04 13:51:13 -04:00
src Typescript port (#16) 2018-09-26 11:16:57 -04:00
.eslintrc.json Add tests (#9) 2018-09-06 17:27:57 -04:00
.gitignore Typescript port (#16) 2018-09-26 11:16:57 -04:00
.travis.yml Typescript port (#16) 2018-09-26 11:16:57 -04:00
LICENSE Port from bengreenier/azure-chaos-api (#1) 2018-08-29 16:42:22 -04:00
README.md fix npm run test to npm test 2018-09-26 11:35:36 -04:00
package-lock.json Typescript port (#16) 2018-09-26 11:16:57 -04:00
package.json Typescript port (#16) 2018-09-26 11:16:57 -04:00
swagger.yaml Added swagger.yaml (#10) 2018-09-11 10:43:54 -04:00
tsconfig.json Typescript port (#16) 2018-09-26 11:16:57 -04:00
tslint.json Typescript port (#16) 2018-09-26 11:16:57 -04:00

README.md

platform-chaos-api

Build Status Deploy to Azure

An API that surfaces the functionality of the CLI for Platform Chaos. ☁️

hero image

This simply surfaces the chaos functionality via authenticated API. By default, this runs on port 3000 - but that can be configured with the PORT environment variable.

To configure this authentication layer, use the following environment variables:

  • AUTH_CLIENT_ID - an AzureAD application client id
  • AUTH_ISSUER - the AzureAD issuer
  • AUTH_AUDIENCE - the AzureAD audience

See passport-azure-ad for more details.

To configure a deployment of this repo, refer to the wiki page which contains detailed instructions.

API

All endpoints require Authentication: Bearer <token> header authentication values for the configured AzureAD application.

GET /extensions

Returns all registered extensions, as an array:

[
    {
        "name": "test",
        "desc": "test desc",
        "uri": "https://test.com"
    }
]

POST /extensions

Creates a new extension. Takes name, uri, desc as parts of a json payload.

GET /extensions/:extId

Gets a particular extension. Takes extId (the name of the extension) as part of the path.

{
    "name": "test",
    "desc": "test desc",
    "uri": "https://test.com"
}

POST /extensions/:extId/start

Starts an extension. Takes extId (the name of the extension) as part of the path. Optionally takes ?code=<value> as a query parameter, where code is passed along to the extension. Takes accessToken and resources as parts of a json payload.

POST /extensions/:extId/stop

Stops an extension. Takes extId (the name of the extension) as part of the path. Optionally takes ?code=<value> as a query parameter, where code is passed along to the extension. Takes accessToken and resources as parts of a json payload.

DELETE /extensions/:extId

Deletes an extension. Takes extId (the name of the extension) as part of the path.

  • platform-chaos - A Node.js SDK for building services capable of injecting chaos into PaaS offerings.
  • platform-chaos-cli - A tool for introducing chaos into Azure PaaS offerings using configurable extensions.

Contributing

This project welcomes contributions and suggestions! Here's what you need to know to get started.

Feedback and Feature Requests

When you're ready, you can open issues here!

To submit feedback or request features please do a quick search for similar issues, then open a new issue. If you're requesting a new feature, please briefly explain in the issue what scenario you're planning to use the feature for.

Development Requirements

To get started developing, you'll need to first ensure you have these tools installed:

Once you've installed those, clone this repository and install dependencies:

git clone https://github.com/Azure/platform-chaos.git
cd platform-chaos
npm install

Now you're ready to begin contributing!

Compiling

This project uses Typescript. In order to run the code it must first be compiled using npm run compile. This command will first remove any existing compiled files by running rimraf dist/. It then compiles all javascript files contained within the src directory following the configurtion in tsconfig.json.

Testing

To run the tests for this project, first ensure you've installed the requirements. Next, compile the project using npm run compile. Following a successful compile, you can run npm test. The test script will also run tslint on the project.

Note that this command is meant to be run from the project directory. That is, the folder that you cloned the project into (likey platform-chaos).

Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.