Enable and Use the AWS CloudWatch Integration Plugin in Armory CD

Enable and use the AWS CloudWatch Integration Plugin in your Armory Continuous Deployment instance.

Before you begin

Before you can start using canary deployments, you need to enable Kayenta, the SpinnakerTM service for canary deployments. For more information, see the Configure Automated Canary Deployments in Spinnaker guide.

Enable AWS CloudWatch as a metrics store

To enable AWS CloudWatch, update the AWS configuration entry in your kayenta-local.yml file. Make sure METRICS_STORE is listed under supportedTypes. Add the cloudwatch entry with enabled: true.

This example uses S3 as the object store and CloudWatch as the metrics store.

kayenta:
  aws:
    enabled: true
    accounts:
      - name: monitoring
        bucket: <your-s3-bucket>
        region: <your-region>
        # Kayenta can assume a role when connecting to Cloudwatch using the iamRole configs
        # iamRoleArn: <your-role-ARN> # For example arn:aws:iam::042225624470:role/theRole
        # iamRoleExternalId: Optional. For example 12345
        # iamRoleArnTarget: <your-role-ARN-target> # For example arn:aws:iam::042225624470:role/targetcloudwatchaccount
        # iamRoleExternalIdTarget: <your-ExternalID> # Optional. For example 84475
        rootFolder: kayenta
        roleName: default
        supportedTypes:
          - OBJECT_STORE
          - CONFIGURATION_STORE
          - METRICS_STORE
  cloudwatch:
    enabled: true
  s3:
    enabled: true

Use AWS CloudWatch

Create a canary config

In the UI, you need to create a new canary config for the metrics you are interested in.

Add your Cloudwatch MetricStat JSON in the Template field.

{
    "Metric": {
        "Namespace": "kayenta",
        "MetricName": "integration.test.cpu.value",
        "Dimensions": [
            {
                "Name": "scope",
                "Value": "myapp-prod-canary-2"
            },
            {
                "Name": "namespace",
                "Value": "prod-namespace-2"
            }
        ]
    },
    "Period": 300,
    "Stat": "Average",
    "Unit": "None"
}

Update pipeline configs

In your canary stage, set up the canary config you just created. Then use the app values from AWS CloudWatch to fill in the Baseline + Canary Pair and MetricScope fields.


Last modified December 19, 2023: (13976a9f)