diff --git a/README.md b/README.md index 0841563..02fe9ea 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,10 @@ npx @guardian/cdk@latest new \ --package-manager npm ``` - [x] Setup the project in CI (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions) and CD -- [ ] Run the Dockerfile in AWS (via GuCDK) - - [ ] Run the HelloWorld image in AWS +- [x] Run the Dockerfile in AWS (via GuCDK) + - [x] Run the HelloWorld image in AWS - [ ] Run our image in AWS - [ ] Make the repo public - [ ] Publish image to GitHub Packages during CI +- [ ] Run the task on demand - [ ] Profit? \ No newline at end of file diff --git a/lib/__snapshots__/interactive-tilemaker.test.ts.snap b/lib/__snapshots__/interactive-tilemaker.test.ts.snap index 5954834..d44e7ef 100644 --- a/lib/__snapshots__/interactive-tilemaker.test.ts.snap +++ b/lib/__snapshots__/interactive-tilemaker.test.ts.snap @@ -45,102 +45,6 @@ exports[`The InteractiveTilemaker stack matches the snapshot 1`] = ` }, "Type": "AWS::ECS::Cluster", }, - "TileMakerService0A7F7D41": { - "DependsOn": [ - "TileMakerTaskTaskRole4911CC8F", - ], - "Properties": { - "Cluster": { - "Ref": "TileMakerClusterC42EED4C", - }, - "DeploymentConfiguration": { - "Alarms": { - "AlarmNames": [], - "Enable": false, - "Rollback": false, - }, - "MaximumPercent": 200, - "MinimumHealthyPercent": 50, - }, - "EnableECSManagedTags": false, - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "AssignPublicIp": "DISABLED", - "SecurityGroups": [ - { - "Fn::GetAtt": [ - "TileMakerServiceSecurityGroup1A5B42EB", - "GroupId", - ], - }, - ], - "Subnets": { - "Ref": "PrivateSubnets", - }, - }, - }, - "Tags": [ - { - "Key": "gu:cdk:version", - "Value": "TEST", - }, - { - "Key": "gu:repo", - "Value": "guardian/interactive-tilemaker", - }, - { - "Key": "Stack", - "Value": "interactives", - }, - { - "Key": "Stage", - "Value": "TEST", - }, - ], - "TaskDefinition": { - "Ref": "TileMakerTask35D431C4", - }, - }, - "Type": "AWS::ECS::Service", - }, - "TileMakerServiceSecurityGroup1A5B42EB": { - "DependsOn": [ - "TileMakerTaskTaskRole4911CC8F", - ], - "Properties": { - "GroupDescription": "InteractiveTilemaker/TileMakerService/SecurityGroup", - "SecurityGroupEgress": [ - { - "CidrIp": "0.0.0.0/0", - "Description": "Allow all outbound traffic by default", - "IpProtocol": "-1", - }, - ], - "Tags": [ - { - "Key": "gu:cdk:version", - "Value": "TEST", - }, - { - "Key": "gu:repo", - "Value": "guardian/interactive-tilemaker", - }, - { - "Key": "Stack", - "Value": "interactives", - }, - { - "Key": "Stage", - "Value": "TEST", - }, - ], - "VpcId": { - "Ref": "VpcId", - }, - }, - "Type": "AWS::EC2::SecurityGroup", - }, "TileMakerTask35D431C4": { "Properties": { "ContainerDefinitions": [ diff --git a/lib/interactive-tilemaker.ts b/lib/interactive-tilemaker.ts index 81ba18a..dd25c88 100644 --- a/lib/interactive-tilemaker.ts +++ b/lib/interactive-tilemaker.ts @@ -7,7 +7,6 @@ import { Compatibility, ContainerImage, CpuArchitecture, - FargateService, LogDriver, OperatingSystemFamily, TaskDefinition, @@ -33,7 +32,7 @@ export class InteractiveTilemaker extends GuStack { privateSubnetIds: privateSubnets.map((subnet) => subnet.subnetId), }); - const cluster = new Cluster(this, 'TileMakerCluster', { vpc }); + new Cluster(this, 'TileMakerCluster', { vpc }); const task = new TaskDefinition(this, 'TileMakerTask', { compatibility: Compatibility.FARGATE, @@ -50,10 +49,5 @@ export class InteractiveTilemaker extends GuStack { memoryLimitMiB: 2048, logging: LogDriver.awsLogs({streamPrefix: "tile-maker/hello-world"}) }); - - new FargateService(this, 'TileMakerService', { - cluster, - taskDefinition: task, - }); } }