Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(plugin): added AWS Event Cache plugin documentation #2244

Merged
merged 12 commits into from
Dec 12, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
| Armory CD Version | Spinnaker Version | AWS Event Cache Plugin Version |
|:------------------|:-------------------|:-------------------------------|
| 2.31.x | 1.31.x | 0.2.1 |
| 2.30.x | 1.29.x, 1.30.x | 0.2.1 |
| 2.28.x | 1.28.x | 0.2.1 |

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

After plugin installation finishes, you need to create an [AWS Simple Notification Service](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) **Standard** topic for your Spinnaker or Armory CD instance. See the AWS SNS [Creating an Amazon SNS topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html) for instructions.

In the **Details** section:

* **Type**: Select **Standard**
* **Name**: Create a meaningful name, such as `AWS Event Cache Plugin`

In the **Access policy** section:

Select **Advanced** and add the following policy:

```json
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AWSConfigSNSPolicy",
"Effect": "Allow",
"Principal": {
"Service": "config.amazonaws.com"
},
"Action": "sns:Publish",
"Resource": "arn:aws:sns:us-west-2:568975057762:config-topic-568975057762"
}
]
}
```

Your Spinnaker or Armory CD instance needs to subscribe to the topic you created. See [Subscribing to an Amazon SNS topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-subscribe-endpoint-to-topic.html) for how to create your subscription. **You need your Gate endpoint** when you create the subscription.

* **Protocol**: Select either `HTTP` or `HTTPS` depending on your Gate endpoint.
* **Endpoint**: This is your Gate endpoint.

{{< figure src="/plugins/aws-event-cache/media/sns-step3.png" height="80%" weight="80%" >}}

After you create your subscription, you should see it in your AWS SNS **Subscriptions** list. The status should be `Confirmed`. If you don’t see the `Confirmed` after 1 or 2 minutes, ensure your Spinnaker or Armory CD service is running. Verify your Gate endpoint and make sure the plugin installation succeeded.

{{< figure src="/plugins/aws-event-cache/media/sns-step4.png" height="80%" weight="80%" >}}

21 changes: 11 additions & 10 deletions content/en/includes/plugins/plugin-compat-matrix.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
| Plugin | Spinnaker | Armory CD |
|:-------|:---------:|:--------:|
| [Armory CD-as-a-Service Plugin](https://developer.armory.io/docs/integrations/plugin-spinnaker)<br>The Armory Continuous Deployment-as-a-Service plugin enables performing canary and blue/green deployments in a single stage from Spinnaker to your Kubernetes deployment target using CD-as-a-Service. | 1.24+ | 2.24+<br>(included with Armory CD)|
| {{< linkWithLinkTitle "plugins/echo-event-filter.md" >}}<br>{{% getPageDesc "/plugins/echo-event-filter.md" %}} | 1.29+ | 2.30+ |
| {{< linkWithLinkTitle "plugins/github-integration/_index.md" >}}<br>{{% getPageDesc "/plugins/github-integration/_index.md" %}} | 1.30+ | 2.30+ |
| Plugin | Spinnaker | Armory CD |
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------:|:----------------------------------:|
| [Armory CD-as-a-Service Plugin](https://developer.armory.io/docs/integrations/plugin-spinnaker)<br>The Armory Continuous Deployment-as-a-Service plugin enables performing canary and blue/green deployments in a single stage from Spinnaker to your Kubernetes deployment target using CD-as-a-Service. | 1.24+ | 2.24+<br>(included with Armory CD) |
| {{< linkWithLinkTitle "plugins/aws-event-cache/_index.md" >}}<br>{{% getPageDesc "/plugins/aws-event-cache/_index.md" %}} | 1.28+ | 2.28+ |
| {{< linkWithLinkTitle "plugins/echo-event-filter.md" >}}<br>{{% getPageDesc "/plugins/echo-event-filter.md" %}} | 1.29+ | 2.30+ |
| {{< linkWithLinkTitle "plugins/github-integration/_index.md" >}}<br>{{% getPageDesc "/plugins/github-integration/_index.md" %}} | 1.30+ | 2.30+ |
| {{< linkWithLinkTitle "plugins/plugin-k8s-custom-resource-status.md" >}}<br>{{% getPageDesc "/plugins/plugin-k8s-custom-resource-status.md" %}} | 1.27+ | 2.27+ |

Check failure on line 7 in content/en/includes/plugins/plugin-compat-matrix.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/includes/plugins/plugin-compat-matrix.md#L7

[Google.Units] Put a nonbreaking space between the number and the unit in '8s'.
Raw output
{"message": "[Google.Units] Put a nonbreaking space between the number and the unit in '8s'.", "location": {"path": "content/en/includes/plugins/plugin-compat-matrix.md", "range": {"start": {"line": 7, "column": 42}}}, "severity": "ERROR"}

Check failure on line 7 in content/en/includes/plugins/plugin-compat-matrix.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/includes/plugins/plugin-compat-matrix.md#L7

[Google.Units] Put a nonbreaking space between the number and the unit in '8s'.
Raw output
{"message": "[Google.Units] Put a nonbreaking space between the number and the unit in '8s'.", "location": {"path": "content/en/includes/plugins/plugin-compat-matrix.md", "range": {"start": {"line": 7, "column": 113}}}, "severity": "ERROR"}
| {{< linkWithLinkTitle "plugins/pipelines-as-code/_index.md" >}}<br>{{% getPageDesc "/plugins/pipelines-as-code/_index.md" %}} | 1.26+ | 2.21+ |
| {{< linkWithLinkTitle "plugins/policy-engine/_index.md" >}}<br>{{% getPageDesc "/plugins/policy-engine/_index.md" %}} | 1.26+ | 2.26+ |
| {{< linkWithLinkTitle "plugins/scale-agent/_index.md" >}}<br>{{% getPageDesc "/plugins/scale-agent/_index.md" %}} | 1.26+ | 2.26+ |
| {{< linkWithLinkTitle "plugins/self-serve-error-management.md" >}}<br>{{% getPageDesc "/plugins/self-serve-error-management.md" %}} | 1.29+ | 2.30+ |
| {{< linkWithLinkTitle "plugins/plugin-k8s-custom-resource-status.md" >}}<br>{{% getPageDesc "/plugins/plugin-k8s-custom-resource-status.md" %}} | 1.27+ | 2.27+ |
| {{< linkWithLinkTitle "plugins/pipelines-as-code/_index.md" >}}<br>{{% getPageDesc "/plugins/pipelines-as-code/_index.md" %}} | 1.26+ | 2.21+ |
| {{< linkWithLinkTitle "plugins/policy-engine/_index.md" >}}<br>{{% getPageDesc "/plugins/policy-engine/_index.md" %}} | 1.26+ | 2.26+ |
| {{< linkWithLinkTitle "plugins/scale-agent/_index.md" >}}<br>{{% getPageDesc "/plugins/scale-agent/_index.md" %}} | 1.26+ | 2.26+ |
| {{< linkWithLinkTitle "plugins/terraform/_index.md" >}}<br>{{% getPageDesc "/plugins/terraform/_index.md" %}} | 1.26+ | 2.26+ |
| {{< linkWithLinkTitle "plugins/terraform/_index.md" >}}<br>{{% getPageDesc "/plugins/terraform/_index.md" %}} | 1.26+ | 2.26+ |
8 changes: 8 additions & 0 deletions content/en/plugins/aws-event-cache/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: AWS Event Cache Plugin for Spinnaker
linkTitle: AWS Event Cache
description: >
The AWS Event Cache Plugin enhances Spinnaker's functionality by addressing rate limit issues commonly encountered when using AWS providers, particularly in scenarios involving EC2 and ECS. The plugin leverages AWS SNS (Simple Notification Service) to receive events and employs a notification handling service to manage data and gate services effectively.
---

![Proprietary](/images/proprietary.svg) ![Beta](/images/beta.svg)
7 changes: 7 additions & 0 deletions content/en/plugins/aws-event-cache/install/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Get Started with the AWS Event Cache Plugin
linkTitle: Get Started
weight: 2
description: >
In this section, learn how to install the AWS Event Cache Plugin for Spinnaker and Armory Continuous Deployment.
---
107 changes: 107 additions & 0 deletions content/en/plugins/aws-event-cache/install/armory-cd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: Install the AWS Event Cache Plugin in Armory Continuous Deployment
linkTitle: Armory CD
weight: 1
description: >
Learn how to install the AWS Event Cache Plugin in Armory Continuous Deployment.
---

![Proprietary](/images/proprietary.svg) ![Beta](/images/beta.svg)

## Installation overview

Enabling the AWS Event Cache plugin consists of the following steps:

1. [Configure the plugin](#configure-the-plugin)
1. [Install the plugin](#install-the-plugin)
1. [Create an AWS SNS topic and subscription](#create-an-aws-sns-topic-and-subscription)

## {{% heading "prereq" %}}

Check warning on line 19 in content/en/plugins/aws-event-cache/install/armory-cd.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/plugins/aws-event-cache/install/armory-cd.md#L19

[Google.Headings] '{{% heading "prereq" %}}' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] '{{% heading \"prereq\" %}}' should use sentence-style capitalization.", "location": {"path": "content/en/plugins/aws-event-cache/install/armory-cd.md", "range": {"start": {"line": 19, "column": 4}}}, "severity": "WARNING"}

* You have read the AWS Event Cache [overview]({{< ref "plugins/aws-event-cache/overview/index" >}}).
* You are running Armory Continuous Deployment.
* You manage your instance using the Armory Operator and the `spinnaker-kustomize-patches` [repo](https://github.com/armory/spinnaker-kustomize-patches).

## Compatibility

{{< include "plugins/aws-event-cache/compat-matrix.md" >}}


## Configure the plugin

Create an `aws-event-cache-plugin.yml` file with the following contents:

```yaml
apiVersion: spinnaker.armory.io/v1alpha2
kind: SpinnakerService
metadata:
name: spinnaker
spec:
spinnakerConfig:
profiles:
spinnaker:
spinnaker:
extensibility:
repositories:
awscatsOnEvent:
version: <version>
enabled: true
url: https://raw.githubusercontent.com/armory-plugins/pluginRepository/master/repositories.json
clouddriver: &clouddriver-cats
spinnaker:
extensibility:
plugins:
Armory.AWSCATsOnEvent:
enabled: true
clouddriver-ro:
*clouddriver-cats
clouddriver-rw:
*clouddriver-cats
clouddriver-caching:
*clouddriver-cats
gate:
spinnaker:
extensibility:
plugins:
Armory.AWSCATsOnEvent:
enabled: true
```

Replace `<version>` with the plugin version compatible with your Armory CD version.

Save the file to your `spinnaker-kustomize-patches/plugins` directory.

## Install the plugin

1. Add the plugin patch to your Kustomize recipe's `patchesStrategicMerge` section. For example:

{{< highlight yaml "linenos=table,hl_lines=13" >}}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: spinnaker

components:
- core/base
- core/persistence/in-cluster
- targets/kubernetes/default

patchesStrategicMerge:
- core/patches/oss-version.yml
- plugins/aws-event-cache-plugin.yml

patches:
- target:
kind: SpinnakerService
path: utilities/switch-to-oss.yml
{{< /highlight >}}

1. Apply the updates to your Kustomization recipe.

```bash
kubectl apply -k <kustomization-directory-path>
```

## Create an AWS SNS topic and subscription

Check warning on line 105 in content/en/plugins/aws-event-cache/install/armory-cd.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/plugins/aws-event-cache/install/armory-cd.md#L105

[Google.Headings] 'Create an AWS SNS topic and subscription' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Create an AWS SNS topic and subscription' should use sentence-style capitalization.", "location": {"path": "content/en/plugins/aws-event-cache/install/armory-cd.md", "range": {"start": {"line": 105, "column": 4}}}, "severity": "WARNING"}

{{< include "plugins/aws-event-cache/create-aws-sns-subscription.md" >}}
63 changes: 63 additions & 0 deletions content/en/plugins/aws-event-cache/install/spinnaker-halyard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Install the AWS Event Cache Plugin in Spinnaker (Halyard)
linkTitle: Spinnaker - Halyard
weight: 3
description: >
Learn how to install the AWS Event Cache Plugin in a Spinnaker instance managed by Halyard.
---

![Proprietary](/images/proprietary.svg) ![Beta](/images/beta.svg)

## Installation overview

Enabling the AWS Event Cache plugin consists of the following steps:

1. [Configure the plugin](#configure-the-plugin)
1. [Install the plugin](#install-the-plugin)
1. [Create an AWS SNS topic and subscription](#create-an-aws-sns-topic-and-subscription)


## {{% heading "prereq" %}}

Check warning on line 20 in content/en/plugins/aws-event-cache/install/spinnaker-halyard.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/plugins/aws-event-cache/install/spinnaker-halyard.md#L20

[Google.Headings] '{{% heading "prereq" %}}' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] '{{% heading \"prereq\" %}}' should use sentence-style capitalization.", "location": {"path": "content/en/plugins/aws-event-cache/install/spinnaker-halyard.md", "range": {"start": {"line": 20, "column": 4}}}, "severity": "WARNING"}

* You have read the AWS Event Cache [overview]({{< ref "plugins/aws-event-cache/overview/index" >}}).
* You are running open source Spinnaker.
* You manage your instance using Halyard. If you are using the Spinnaker Operator, see {{< linkWithTitle "plugins/aws-event-cache/install/spinnaker-operator.md" >}}.


{{% alert color="warning" title="A note about installing plugins in Spinnaker" %}}
When Halyard adds a plugin to a Spinnaker installation, it adds the plugin repository information to all services, not just the ones the plugin is for. This means that when you restart Spinnaker, each service restarts, downloads the plugin, and checks if an extension exists for that service. Each service restarting is not ideal for large Spinnaker installations due to service restart times. Clouddriver can take an hour or more to restart if you have many accounts configured.

The AWS Event Cache plugin extends Clouddriver and Gate. To avoid every Spinnaker service restarting and downloading the plugin, do not add the plugin using Halyard. Instead, follow the local config installation method, in which you configure the plugin in each extended service’s local profile.

{{% /alert %}}

## Compatibility

{{< include "plugins/aws-event-cache/compat-matrix.md" >}}

## Configure the plugin
Update `clouddriver-local.yml`, and `gate-local.yml` config files with the following:
```yaml
spinnaker:
extensibility:
plugins:
Armory.Integration:
id: Armory.AWSCATsOnEvent
enabled: true
version: <version>
repositories:
githubIntegration:
enabled: true
url: https://raw.githubusercontent.com/armory-plugins/pluginRepository/master/repositories.json
```
Replace `<version>` with the plugin version compatible with your Spinnaker version.

## Install the plugin
Once you've apply your changes:
```bash
hal deploy apply
```

## Create an AWS SNS topic and subscription

Check warning on line 61 in content/en/plugins/aws-event-cache/install/spinnaker-halyard.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/plugins/aws-event-cache/install/spinnaker-halyard.md#L61

[Google.Headings] 'Create an AWS SNS topic and subscription' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Create an AWS SNS topic and subscription' should use sentence-style capitalization.", "location": {"path": "content/en/plugins/aws-event-cache/install/spinnaker-halyard.md", "range": {"start": {"line": 61, "column": 4}}}, "severity": "WARNING"}

{{< include "plugins/aws-event-cache/create-aws-sns-subscription.md" >}}
110 changes: 110 additions & 0 deletions content/en/plugins/aws-event-cache/install/spinnaker-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
title: Install the AWS Event Cache Plugin in Spinnaker (Operator)
linkTitle: Spinnaker - Operator
weight: 2
description: >
Learn how to install the AWS Event Cache Plugin in a Spinnaker instance managed by the Spinnaker Operator.
---

![Proprietary](/images/proprietary.svg) ![Beta](/images/beta.svg)

## Installation overview

Enabling the AWS Event Cache plugin consists of the following steps:

1. [Configure the plugin](#configure-the-plugin)
1. [Install the plugin](#install-the-plugin)
1. [Create an AWS SNS topic and subscription](#create-an-aws-sns-topic-and-subscription)

## {{% heading "prereq" %}}

Check warning on line 19 in content/en/plugins/aws-event-cache/install/spinnaker-operator.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/plugins/aws-event-cache/install/spinnaker-operator.md#L19

[Google.Headings] '{{% heading "prereq" %}}' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] '{{% heading \"prereq\" %}}' should use sentence-style capitalization.", "location": {"path": "content/en/plugins/aws-event-cache/install/spinnaker-operator.md", "range": {"start": {"line": 19, "column": 4}}}, "severity": "WARNING"}

* You have read the AWS Event Cache [overview]({{< ref "plugins/aws-event-cache/overview/index" >}}).
* You are running open source Spinnaker.
* You manage your instance using the Spinnaker Operator and the `spinnaker-kustomize-patches` [repo](https://github.com/armory/spinnaker-kustomize-patches). If you are using Halyard, see {{< linkWithTitle "plugins/aws-event-cache/install/spinnaker-halyard.md" >}}.

## Compatibility

{{< include "plugins/aws-event-cache/compat-matrix.md" >}}


## Configure the plugin

Create an `aws-event-cache-plugin.yml` file with the following contents:

```yaml
apiVersion: spinnaker.io/v1alpha2
kind: SpinnakerService
metadata:
name: spinnaker
spec:
spinnakerConfig:
profiles:
spinnaker:
spinnaker:
extensibility:
repositories:
awscatsOnEvent:
version: <version>
enabled: true
url: https://raw.githubusercontent.com/armory-plugins/pluginRepository/master/repositories.json
clouddriver: &clouddriver-cats
spinnaker:
extensibility:
plugins:
Armory.AWSCATsOnEvent:
enabled: true
clouddriver-ro:
*clouddriver-cats
clouddriver-rw:
*clouddriver-cats
clouddriver-caching:
*clouddriver-cats
gate:
spinnaker:
extensibility:
plugins:
Armory.AWSCATsOnEvent:
enabled: true

```


Replace `<version>` with the plugin version compatible with your Spinnaker version.

Save the file to your `spinnaker-kustomize-patches/plugins/oss` directory.


## Install the plugin

1. Add the plugin patch to your Kustomize recipe's `patchesStrategicMerge` section. For example:

{{< highlight yaml "linenos=table,hl_lines=13" >}}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: spinnaker

components:
- core/base
- core/persistence/in-cluster
- targets/kubernetes/default

patchesStrategicMerge:
- core/patches/oss-version.yml
- plugins/oss/aws-event-cache-plugin.yml

patches:
- target:
kind: SpinnakerService
path: utilities/switch-to-oss.yml
{{< /highlight >}}

1. Apply the updates to your Kustomization recipe.

```bash
kubectl apply -k <kustomization-directory-path>
```

## Create an AWS SNS topic and subscription

Check warning on line 108 in content/en/plugins/aws-event-cache/install/spinnaker-operator.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/en/plugins/aws-event-cache/install/spinnaker-operator.md#L108

[Google.Headings] 'Create an AWS SNS topic and subscription' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Create an AWS SNS topic and subscription' should use sentence-style capitalization.", "location": {"path": "content/en/plugins/aws-event-cache/install/spinnaker-operator.md", "range": {"start": {"line": 108, "column": 4}}}, "severity": "WARNING"}

{{< include "plugins/aws-event-cache/create-aws-sns-subscription.md" >}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading