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

feat(aws-ecs-builder): RFC 219 - An extendable service class for AWS ECS #10129

Merged
merged 28 commits into from Sep 29, 2020
Merged

feat(aws-ecs-builder): RFC 219 - An extendable service class for AWS ECS #10129

merged 28 commits into from Sep 29, 2020

Conversation

nathanpeck
Copy link
Member

@nathanpeck nathanpeck commented Sep 2, 2020

This PR implements RFC 219

It adds a new module called "@aws-containers/aws-ecs-builder" (Name proposed but not final) with following new constructs:

  • Environment - A deploy environment for a service which by default supplies its own VPC, and ECS cluster with Fargate capacity
  • Service - An ECS service

And supporting classes:

  • ServiceDescription - Defines the application to run as a service, and any features it needs
  • ServiceExtension - Defines an optional extension that may be added to a service to enhance it with new capabilities or connect it to other ECS adjacent features

This PR comes with a ServiceExtension for each of the following ECS adjacent features:

  • AppMesh
  • X-Ray
  • CloudWatch Agent
  • Application Load Balancer
  • FireLens

Developers can use this new extendable Service class to build a ServiceDescription that defines their application and as many optional service extensions as they want. The ServiceDescription is used to build out a Service inside an Environment


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Copy link
Contributor

@bcelenza bcelenza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial comments from an App Mesh / general application networking perspective.

Generally, love the approach and excited to build on this concept further!

mesh: this.mesh,
virtualNodeName: this.parentService.id,
cloudMapService: service.cloudMapService,
listener: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an assumption that every service has a listener? For example, services which read from message queues often don't.

Copy link
Contributor

@SoManyHs SoManyHs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly copy-edit nits, and some naming discrepencies. Did not get through all of it but wanted to publish this before we talked!

@SoManyHs
Copy link
Contributor

I tried to proactively put in suggestions for things like punctuation at the end of docstrings: see #9069 (comment)

Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments.


// A map of AWS account ID's which hold the App Mesh image in various
// regions
enum APPMESH_ECR_ACCOUNTS {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this info belongs in the region-info package. At least in the appmesh package - I don't think this is the greatest place for it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have some work on the underlying L2 appmesh package scheduled. I'll discuss with the team when that second pass begins. I agree this is something we should probably implement as part of that pass to catch the L2's up to the current CFN features.

Copy link
Contributor

@bcelenza bcelenza Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, region-info package can own this configuration and we can tackle it as part of L2 work (either myself or @dfezzie). We're considering an SSM parameter for this longer term (aws/aws-app-mesh-roadmap#257).

SoManyHs
SoManyHs previously approved these changes Sep 28, 2020
@mergify mergify bot dismissed SoManyHs’s stale review September 28, 2020 20:01

Pull request has been modified.

@nathanpeck nathanpeck changed the title feat(aws-ecs-builder): RFC 219 - A extendable service class for AWS ECS feat(aws-ecs-builder): RFC 219 - An extendable service class for AWS ECS Sep 29, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: ae462b5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Sep 29, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit d95af00 into aws:master Sep 29, 2020
@nathanpeck nathanpeck deleted the nathanpeck/rfc-219 branch September 29, 2020 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants