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(appmesh): add support for AWS AppMesh #2299

Merged
merged 108 commits into from
Aug 23, 2019
Merged

feat(appmesh): add support for AWS AppMesh #2299

merged 108 commits into from
Aug 23, 2019

Conversation

yandy-r
Copy link

@yandy-r yandy-r commented Apr 15, 2019

This PR allows one to work with AWS AppMesh at higher level L2 construct without needing to dive into the CFN layer for most use case.

This allows one to be able to.

  • Create a service mesh
  • Create virtual services and add them too the mesh
  • Add virtual nodes to the mesh
  • Add virtual routers to the mesh
  • Add virtual routes pointing to these nodes
    • Should be able to add HTTP and TCP routes
  • Know which mesh a route(r) is attached to
  • Know which router a Node is attached to
  • Know which backends nodes talk to

Fixes #2297


Pull Request Checklist

  • Testing
    • Unit test added (prefer not to modify an existing test, otherwise, it's probably a breaking change)
    • CLI change?: coordinate update of integration tests with team
    • cdk-init template change?: coordinated update of integration tests with team
  • Docs
    • jsdocs: All public APIs documented
    • README: README and/or documentation topic updated
  • Title and Description
    • Change type: title prefixed with fix, feat will appear in changelog
    • Title: use lower-case and doesn't end with a period
    • Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
    • Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"
  • Sensitive Modules (requires 2 PR approvers)
    • IAM Policy Document (in @aws-cdk/aws-iam)
    • EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
    • Grant APIs (only if not based on official documentation with a reference)

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

Yandy Ramirez added 30 commits April 13, 2019 23:42
This was being worked on in separate repo, being merged here
There's no need to pass the entire mesh as a reference around.
Only the meshName is necssary for most things as it is unique and what
the api takes for reference as well.
Only the namespaceName was required, making things more complex
than necessary. This was changed in favor of just passing down the
namespace name.
adding a virtual router, there was no way to name this router,
now there is with this update
Also change name and type fo properties to better align
with official API
This adds the ability for the service to point to a VirtualRouter or
a VirtualNode for single point of communication
The readme now has examples of mesh actions.
meshArn as import prop is unnecessary and redundant, as only the
meshName is important.
Create a method to allow the addition of a sinble backend at a time
to the VirtualNodes created
@yandy-r yandy-r requested a review from SoManyHs as a code owner August 8, 2019 10:31
@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 9, 2019

Okay, I think I've got the PR in good shape technically, updated to latest AWSCL standards.

Have not really reviewed for content and usability, since I don't know anything about AppMesh. I'm good to ship it and iterate later since it will start out @experimental anyway, but maybe someone with some knowledge on the domain can chip in whether this is fit for purpose? @SoManyHs maybe?

If no further comments, removing the do-not-merge label should trigger the automerge.

@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Aug 9, 2019
rix0rrr
rix0rrr previously approved these changes Aug 9, 2019
@SoManyHs
Copy link
Contributor

SoManyHs commented Aug 9, 2019

@rix0rrr Yes, I'll take a look.

@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 19, 2019

@SoManyHs did you? :)

@rix0rrr rix0rrr changed the title feat(appmesh): Add L2 Construct for AWS AppMesh feat(appmesh): add support for AWS AppMesh Aug 20, 2019
@mergify
Copy link
Contributor

mergify bot commented Aug 20, 2019

Pull Request Checklist

  • Testing
  • Unit test added (prefer to add a new test rather than modify existing tests)
  • CLI change? Re-run/add CLI integration tests
  • Documentation
  • Inline docs: make sure all public APIs are documented (copy & paste from official AWS docs)
  • README: update module README
  • Design: for significant features, follow the design process
  • Title uses the format type(scope): text
  • Type: fix, feat, refactor go into CHANGELOG, chore is hidden
  • Scope: name of the module without the aws- or cdk- prefix or postfix (e.g. s3 instead of aws-s3-deployment)
  • Style: use all lower-case, do not end with a period
  • Description
  • Rationale: describe rationale of change and approach taken
  • Issues: Indicate issues fixed via: fixes #xxx or closes #xxx
  • Breaking?: last paragraph: BREAKING CHANGE: <describe what changed + link for details>
  • Sensitive Modules (requires 2 PR approvers)
  • IAM document library (in @aws-cdk/aws-iam)
  • EC2 security groups and ACLs (in @aws-cdk/aws-ec2)
  • Grant APIs (if not based on official documentation with a reference)

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.

Great work! A few questions/nits. Thanks for contributing!

packages/@aws-cdk/aws-appmesh/README.md Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/README.md Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/README.md Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/README.md Outdated Show resolved Hide resolved
backends: this.backends,
listeners: this.listeners,
serviceDiscovery: {
dns: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we always expecting this to be DNS? Is there a way to allow AWSCloudMapServiceDiscovery as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right, there should be.

packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/lib/virtual-service.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-appmesh/test/integ.mesh.ts Outdated Show resolved Hide resolved
const stack2 = new cdk.Stack();
appmesh.Route.fromRouteName(stack2, 'imported-route', mesh.meshName, router.virtualRouterName, route.routeName);

// Nothing to do with imported route yet
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused -- what are we expecting to assert?

Copy link
Contributor

Choose a reason for hiding this comment

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

A lack of exceptions I suppose :)

@yandy-r
Copy link
Author

yandy-r commented Aug 22, 2019

Thank you all for picking up the slack, it was going to be difficult for me to get this here with everything going on. Thanks again!

@mergify
Copy link
Contributor

mergify bot commented Aug 22, 2019

Codebuild (Continuous Integration) build failed for current commits. Please check log and resolve before PR is merged.

@rix0rrr rix0rrr merged commit 98863f9 into aws:master Aug 23, 2019
@yandy-r yandy-r deleted the IPyandy/aws-appmesh branch August 23, 2019 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/do-not-merge This PR should not be merged at this time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(AppMesh): Create L2 Construct for AWS AppMesh
6 participants