From 8ff3d37b9aaad48a56c01a763fca5f20ab517a20 Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Fri, 7 Jan 2022 20:18:50 -0500 Subject: [PATCH] Update defaults per TFC --- package-lock.json | 34 ------------------- ...eg.all-existing-private-http.expected.json | 10 +++--- .../integ.all-new-public-http.expected.json | 10 +++--- .../integ.all-new-two-targets.expected.json | 10 +++--- .../core/lib/fargate-defaults.ts | 10 +++--- .../core/test/fargate-helper.test.ts | 8 ++--- 6 files changed, 24 insertions(+), 58 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 56d8b5a65..000000000 --- a/package-lock.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "eslint-plugin-mocha": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-9.0.0.tgz", - "integrity": "sha512-d7knAcQj1jPCzZf3caeBIn3BnW6ikcvfz0kSqQpwPYcVGLoJV5sz0l0OJB2LR8I7dvTDbqq1oV6ylhSgzA10zg==", - "dev": true, - "requires": { - "eslint-utils": "^3.0.0", - "ramda": "^0.27.1" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "requires": { - "eslint-visitor-keys": "^2.0.0" - } - }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" - }, - "ramda": { - "version": "0.27.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", - "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==" - } - } -} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-existing-private-http.expected.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-existing-private-http.expected.json index 52970d9b8..702d5d016 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-existing-private-http.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-existing-private-http.expected.json @@ -902,7 +902,7 @@ { "Essential": true, "Image": "nginx", - "MemoryReservation": 1024, + "MemoryReservation": 512, "Name": "test-container", "PortMappings": [ { @@ -912,9 +912,9 @@ ] } ], - "Cpu": "512", + "Cpu": "256", "Family": "allexistingprivatehttptesttaskdefFB96B83E", - "Memory": "1024", + "Memory": "512", "NetworkMode": "awsvpc", "RequiresCompatibilities": [ "FARGATE" @@ -985,8 +985,8 @@ "Ref": "testclusterDF8B0D19" }, "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 100 + "MaximumPercent": 150, + "MinimumHealthyPercent": 75 }, "DesiredCount": 2, "EnableECSManagedTags": false, diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-public-http.expected.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-public-http.expected.json index 5590e6a4f..29163776e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-public-http.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-public-http.expected.json @@ -1172,7 +1172,7 @@ { "Essential": true, "Image": "nginx", - "MemoryReservation": 1024, + "MemoryReservation": 512, "Name": "test-construct-container", "PortMappings": [ { @@ -1182,9 +1182,9 @@ ] } ], - "Cpu": "512", + "Cpu": "256", "Family": "allnewpublichttptestconstructtaskdefDF932EBD", - "Memory": "1024", + "Memory": "512", "NetworkMode": "awsvpc", "RequiresCompatibilities": [ "FARGATE" @@ -1255,8 +1255,8 @@ "Ref": "testconstructcluster7B6231C5" }, "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 100 + "MaximumPercent": 150, + "MinimumHealthyPercent": 75 }, "DesiredCount": 2, "EnableECSManagedTags": false, diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-two-targets.expected.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-two-targets.expected.json index 00ab79eb6..95afdbe36 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-two-targets.expected.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.all-new-two-targets.expected.json @@ -1199,7 +1199,7 @@ { "Essential": true, "Image": "nginx", - "MemoryReservation": 1024, + "MemoryReservation": 512, "Name": "test-construct-container", "PortMappings": [ { @@ -1209,9 +1209,9 @@ ] } ], - "Cpu": "512", + "Cpu": "256", "Family": "allnewtwotargetstestconstructtaskdef8EF55A85", - "Memory": "1024", + "Memory": "512", "NetworkMode": "awsvpc", "RequiresCompatibilities": [ "FARGATE" @@ -1282,8 +1282,8 @@ "Ref": "testconstructcluster7B6231C5" }, "DeploymentConfiguration": { - "MaximumPercent": 200, - "MinimumHealthyPercent": 100 + "MaximumPercent": 150, + "MinimumHealthyPercent": 75 }, "DesiredCount": 2, "EnableECSManagedTags": false, diff --git a/source/patterns/@aws-solutions-constructs/core/lib/fargate-defaults.ts b/source/patterns/@aws-solutions-constructs/core/lib/fargate-defaults.ts index 22e15edc9..a6c5f3f50 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/fargate-defaults.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/fargate-defaults.ts @@ -26,16 +26,16 @@ export function DefaultFargateServiceProps( return { assignPublicIp: false, desiredCount: 2, - maxHealthyPercent: 200, - minHealthyPercent: 100, + maxHealthyPercent: 150, + minHealthyPercent: 75, platformVersion: ecs.FargatePlatformVersion.LATEST, }; } export function DefaultFargateTaskDefinitionProps(): ecs.FargateTaskDefinitionProps { return { - cpu: 512, - memoryLimitMiB: 1024, + cpu: 256, + memoryLimitMiB: 512, }; } @@ -52,7 +52,7 @@ export function DefaultApplicationTargetGroupProps(vpc: ec2.IVpc): elb.Applicati export function DefaultContainerDefinitionProps(): ecs.ContainerDefinitionOptions | any { return { - memoryReservationMiB: 1024, + memoryReservationMiB: 512, portMappings: [ { containerPort: 8080 } ], }; } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/core/test/fargate-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/fargate-helper.test.ts index 8fc8b64f8..1b3fa69b1 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/fargate-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/fargate-helper.test.ts @@ -36,8 +36,8 @@ test('Test with all defaults', () => { Ref: "testclusterDF8B0D19" }, DeploymentConfiguration: { - MaximumPercent: 200, - MinimumHealthyPercent: 100 + MaximumPercent: 150, + MinimumHealthyPercent: 75 }, DesiredCount: 2, EnableECSManagedTags: false, @@ -115,8 +115,8 @@ test('Test with all defaults in isolated VPC', () => { Ref: "testclusterDF8B0D19" }, DeploymentConfiguration: { - MaximumPercent: 200, - MinimumHealthyPercent: 100 + MaximumPercent: 150, + MinimumHealthyPercent: 75 }, DesiredCount: 2, EnableECSManagedTags: false,