From c9d20f82af9173a8ef00ee26c36965ed10a0ee8d Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Tue, 19 Nov 2024 11:57:18 +0530 Subject: [PATCH] Remove Outages extension --- .../outages-extension/index.md | 129 ------------------ 1 file changed, 129 deletions(-) delete mode 100644 content/en/user-guide/chaos-engineering/outages-extension/index.md diff --git a/content/en/user-guide/chaos-engineering/outages-extension/index.md b/content/en/user-guide/chaos-engineering/outages-extension/index.md deleted file mode 100644 index 6f2c572b52..0000000000 --- a/content/en/user-guide/chaos-engineering/outages-extension/index.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "Outages Extension" -linkTitle: "Outages Extension" -description: Use LocalStack Outages Extension to mimic service outages by testing your infrastructure's ability to deploy robustly and recover from unexpected events. -tags: ["Enterprise plan"] ---- - -## Introduction - -{{< callout "warning" >}} -Outages Extension has been deprecated. -It is recommended to migrate to the [Chaos API]({{< ref "chaos-api" >}}). -{{< /callout >}} - -The [LocalStack Outages Extension](https://pypi.org/project/localstack-extension-outages/) allows you to mimic outages across any AWS region or service. -By integrating the Outages Extension using the [LocalStack Extension mechanism](https://docs.localstack.cloud/user-guide/extensions/), you can assess -your infrastructure's robustness. -Intentionally triggering service outages and monitoring the system's response in situations -where the infrastructure is compromised offers a powerful way to test. -This strategy helps gauge the effectiveness of the system's -deployment procedures and its resilience against infrastructure disruptions, which is a key element of chaos engineering. - -### Prerequisites - -The general prerequisites for this guide are: - -- LocalStack Pro with [LocalStack CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli) & [LocalStack Auth Token](https://docs.localstack.cloud/getting-started/auth-token/) -- [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) -- [Python](https://www.python.org/downloads/) - -### Installing the extension - -To install the LocalStack Outages Extension, first set up your LocalStack Auth Token in your environment. -Once the token is configured, use the command below to install the extension: - -{{< command >}} -$ localstack auth set-token -$ localstack extensions install localstack-extension-outages -{{< /command >}} - -Alternatively, you can enable automatic installation of the extension by setting the environment variable `EXTENSION_AUTO_INSTALL=localstack-extension-outages` when you start the LocalStack container. - -Follow our [Managing Extensions documentation](https://docs.localstack.cloud/user-guide/extensions/managing-extensions/) for more information on how to install & manage extensions. - -### Configuration - -The extension is set up through an API endpoint, where the setup involves specifying a set of rules that are applied in order. -Each rule includes two key pieces of information: the service name and its region. -You have the option to use the `*` wildcard -for flexibility in either attribute. - -To initiate an outage for specific service/region combinations, you can make a POST request as described below: - -{{< command >}} -curl --location --request POST 'http://outages.localhost.localstack.cloud:4566/outages' \ ---header 'Content-Type: application/json' \ ---data ' -[ - { - "service": "kms", - "region": "us-east-1" - }, - { - "service": "s3", - "region": "us-*" - }, - { - "service": "lambda", - "region": "*" - } -]' -{{< /command >}} - -Once activated, any API requests to the impacted services and regions will result in an HTTP 503 Service Unavailable error. - -In the given example, the services and regions affected include: - -- KMS in us-east-1 -- S3 in all US regions, including us-east-1, us-east-2, us-west-1, us-west-2, us-gov-east-1, and us-gov-west-1 -- Lambda across all regions - -To demonstrate this works as expected, we can try to create an S3 bucket in a US-based region: - -{{< command >}} -$ awslocal s3 mb s3://test-bucket --region us-east-1 - -make_bucket failed: s3://test-bucket An error occurred (ServiceUnavailableException) when calling the CreateBucket operation (reached max retries: 4): Service 's3' not accessible in 'us-east-1' region due to an outage - -{{< /command >}} - -However, the same command executed for `eu-central-1` is unaffected: - -{{< command >}} -$ awslocal s3 mb s3://test-bucket --region eu-central-1 - -make_bucket: test-bucket - -{{< /command >}} - -Outages may be stopped by using empty list in the configuration. -The following request will clear the current configuration: - -{{< command >}} -curl --location --request POST 'http://outages.localhost.localstack.cloud:4566/outages' \ ---header 'Content-Type: application/json' \ ---data '[]' -{{< /command >}} - -To retrieve the current configuration, make the following GET call: - -{{< command >}} -curl --location --request GET 'http://outages.localhost.localstack.cloud:4566/outages' -{{}} - -To add a new service/region rule pair to the configuration, make a PATCH call as follows: - -{{< command >}} -curl --location --request PATCH 'http://outages.localhost.localstack.cloud:4566/outages' \ ---header 'Content-Type: application/json' \ ---data '[{"service": "transcribe", "region": "us-west-1"}]' -{{}} - -To remove a service/region rule pair from the configuration, make a DELETE call as follows: - -{{< command >}} -curl --location --request DELETE 'http://outages.localhost.localstack.cloud:4566/outages' \ ---header 'Content-Type: application/json' \ ---data '[{"service": "transcribe", "region": "us-west-1"}]' -{{}}