Skip to content

Releases: guardian/cdk

v59.5.1

19 Sep 11:42
70de4fb
Compare
Choose a tag to compare

Patch Changes

  • fed2598: fix(experimental-ec2-pattern): Add buffer to rolling update timeout

    If we consider the health check grace period to be the time it takes the "normal" user data to run,
    the rolling update should be configured to be a little longer to cover the additional time spent polling the target group.

    A buffer of 1 minute is somewhat arbitrarily chosen.
    Too high a value, then we increase the time it takes to automatically rollback from a failing healthcheck.
    Too low a value, then we risk flaky deploys.

v59.5.0

17 Sep 13:48
3d81b92
Compare
Choose a tag to compare

Minor Changes

feat(experimental-ec2-pattern): Pattern to deploy ASG updates w/CFN (#2417)

Included in this update is a new experimental pattern GuEc2AppExperimental, which can be used in place of a GuEc2App:

import { GuEc2AppExperimental } from "@guardian/cdk/lib/experimental/patterns/ec2-app";

This pattern will add an AutoScalingRollingUpdate policy to the autoscaling group.This allows application updates to be performed like a standard CloudFormation update, and using the custom logic provided by Riff-Raff's autoscaling deployment type is unnecessary.

This experimental pattern has few requirements.

Add the build number to the application artifact

This change requires versioned artifacts.

The easiest way to achieve this is by adding the build number to the filename of the artifact:

import { UserData } from "aws-cdk-lib/aws-ec2";
// Use a GitHub Actions provided environment variable
const buildNumber = process.env.GITHUB_RUN_NUMBER ?? "DEV";

const userData = UserData.forLinux();
userData.addCommands(`aws s3 cp s3://dist-bucket/path/to/artifact-${buildNumber}.deb /tmp/artifact.deb`);
userData.addCommands(`dpkg -i /tmp/artifact.dep`);
riff-raff.yaml

The riff-raff.yaml file should remove the deploy action of the autoscaling deployment type.
Though including it shouldn't break anything, it would result in a longer deployment time as instance will be rotated by both CloudFormation and Riff-Raff's custom logic.

The uploadArtifacts step of the autoscaling deployment type should still be included, with the cloud-formation deployment type depending on it. This step uploads the versioned artifact to S3.

Tip

An auto-generated riff-raff.yaml file meets this requirement.

v59.4.0

17 Sep 07:57
1281710
Compare
Choose a tag to compare

Minor Changes

  • 43dc653: feat(asg) Collect all ASG level metrics

    This change should have no cost impact:

    Group metrics are available at one-minute granularity at no additional charge, but you must enable them.
    https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html.

    If it does, or if you only want a subset, the escape hatch mechanism can be used:

    declare const asg: AutoScalingGroup;
    
    const cfnAsg = asg.node.defaultChild as CfnAutoScalingGroup;
    
    cfnAsg.metricsCollection = [
      {
        granularity: "1Minute",
        metrics: [
          // A subset of metrics
        ],
      },
    ];

v59.3.5

10 Sep 10:18
e203f2d
Compare
Choose a tag to compare

Patch Changes

  • 9ff96cd: Update aws-cdk to 2.157.0, aws-cdk-lib to 2.157.0, constructs to 10.3.0

v59.3.4

09 Sep 10:09
0cc0bbe
Compare
Choose a tag to compare

Patch Changes

  • 7d214d6: Update git-url-parse from 14.1.0 to 15.0.0
  • 19d41d3: Update aws-sdk from 2.1687.0 to 2.1691.0

v59.3.3

04 Sep 09:48
af7604b
Compare
Choose a tag to compare

Patch Changes

  • c57b024: Allow inputs in GuScheduledLambda

v59.3.2

03 Sep 17:28
f4759e7
Compare
Choose a tag to compare

Patch Changes

  • 8e8a20f: Fix bug preventing creation of multiple VPCs in single stack

v59.3.1

02 Sep 07:54
10cad8d
Compare
Choose a tag to compare

Patch Changes

  • 89dee99: Update aws-cdk to 2.155.0, aws-cdk-lib to 2.155.0, constructs to 10.3.0
  • 9412236: Update aws-sdk from 2.1674.0 to 2.1687.0
  • 481e40d: Update codemaker from 1.102.0 to 1.103.1

v59.3.0

23 Aug 14:40
ba565d4
Compare
Choose a tag to compare

Minor Changes

  • 18daa5d: enable InstanceMetadataTags on EC2 patterns

v59.2.4

20 Aug 12:07
6488f85
Compare
Choose a tag to compare

Patch Changes

  • 72c6eec: Update aws-cdk to 2.153.0, aws-cdk-lib to 2.153.0, constructs to 10.3.0
  • bef9b1d: Update aws-sdk from 2.1670.0 to 2.1674.0