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

[aws-msk] L2 construct for Cluster #9603

Closed
2 tasks
iliapolo opened this issue Aug 11, 2020 · 3 comments · Fixed by #9908
Closed
2 tasks

[aws-msk] L2 construct for Cluster #9603

iliapolo opened this issue Aug 11, 2020 · 3 comments · Fixed by #9908
Assignees
Labels
@aws-cdk/aws-msk Related to Amazon Managed Streaming for Apache Kafka (Amazon MSK) effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p2

Comments

@iliapolo
Copy link
Contributor

Create an L2 Cluster construct that provisions an MSK cluster.

Use Case

Increase our L2 coverage and make it easier for users to get started with MSK

Proposed Solution

We want to provide a rudimentary MVP that users can use to create a cluster as quickly as possible. We want to reach a state where users can just do:

import * as msk from '@aws-cdk/aws-msk'

new msk.Cluster(this, 'Cluster', {
  version: msk.KafkaVersion.V2_2_1
});

The experience should be very similar to the EKS Cluster construct.

As a reference, we should emulate the console experience, and use the same default values it provides.

Screen Shot 2020-08-11 at 4 45 22 PM

As far as which configuration properties should be supported in this initial implementation, here is a proposed list:

  • KafkaVersion [REQUIRED]

  • ClusterName [OPTIONAL]

  • NumberOfBrokerNodes [OPTIONAL]

  • ConfigurationInfo [OPTIONAL].

    Note that creating configuration sets is currently not supported by CloudFormation, you can only reference them. The creation is done out-of-band with the CLI. This is ok, I imagine users will have some configuration sets already created in their account, and we should allow them to use it. In the future, we can consider allowing to create configuration sets using a custom resource.

  • ClientSubnets [OPTIONAL]

  • SecurityGroups [OPTIONAL]

  • InstanceType [OPTIONAL]

I think these set of properties will provide a good getting started experience, and be flexible enough to cover plenty of use-cases.

Other

CloudFormation specification: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-cluster.html

Implementation Notice

To those who eventually pick this issue up:

Before diving deep into the implementation code, please create an initial PR that includes only the API design, i.e, the README of this new module. Since this is a brand new L2 library, a design discussion is warranted, and will take place on the PR reviewing the README.

Thanks

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@iliapolo iliapolo added p2 feature-request A feature should be added or improved. effort/large Large work item – several weeks of effort @aws-cdk/aws-msk Related to Amazon Managed Streaming for Apache Kafka (Amazon MSK) labels Aug 11, 2020
@curtiseppel
Copy link

Hey, I've just ported our internal MSK Cluster construct and adapted it with the default values that the AWS console suggests. Admittedly, I didn't create/search for issues first so the PR contains the implementation also - #9908

@iliapolo
Copy link
Contributor Author

@curtiseppel Awesome!

I'll try to get the review going soon.

Thanks :)

@iliapolo iliapolo added the in-progress This issue is being actively worked on. label Aug 23, 2020
@ericzbeard ericzbeard added the feature/new-construct A request for a new L2 construct label Apr 2, 2021
@mergify mergify bot closed this as completed in #9908 May 10, 2021
mergify bot pushed a commit that referenced this issue May 10, 2021
L2 Construct for a MSK Cluster. 

I wrote this for internal use and thought I'd share it. I tried to follow the [example resource](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/example-construct-library/lib/example-resource.ts) and [design guidelines](https://github.com/aws/aws-cdk/blob/master/DESIGN_GUIDELINES.md) as much as I could. Default properties were chosen either based on defaults when creating a cluster in the console or defaults set from CloudFormation.

Closes #9603

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

john-tipper pushed a commit to john-tipper/aws-cdk that referenced this issue May 10, 2021
L2 Construct for a MSK Cluster. 

I wrote this for internal use and thought I'd share it. I tried to follow the [example resource](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/example-construct-library/lib/example-resource.ts) and [design guidelines](https://github.com/aws/aws-cdk/blob/master/DESIGN_GUIDELINES.md) as much as I could. Default properties were chosen either based on defaults when creating a cluster in the console or defaults set from CloudFormation.

Closes aws#9603

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this issue May 12, 2021
* chore(cloudfront): remove the use of calculateFunctionHash (#14583)

`calculateFunctionHash()` was used to compute the 'refresh token' of the
custom resource for the EdgeFunction construct.

This method is private to the lambda module and is deemed to be changed.
Instead, use the lambda function version's logical id.

The logical id of the version includes computing the function hash (among
others) and is a more reliable determinant of whether the underlying
function version changed.


----

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

* feat(cloudwatch): validate parameters for a metric dimensions (closes #3116) (#14365)

As per #3116, the changes in this PR validate metric dimension values (length, and checking if the value is null or undefined) and throw errors if the values are not valid. I've also corrected a comment in the metric-types.ts to use the correct method name

* feat(appmesh): change HealthChecks to use protocol-specific union-like classes (#14432)

BREAKING CHANGE: HealthChecks require use of static factory methods

fixes #11640

----

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

* feat(msk): Cluster L2 Construct (#9908)

L2 Construct for a MSK Cluster. 

I wrote this for internal use and thought I'd share it. I tried to follow the [example resource](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/example-construct-library/lib/example-resource.ts) and [design guidelines](https://github.com/aws/aws-cdk/blob/master/DESIGN_GUIDELINES.md) as much as I could. Default properties were chosen either based on defaults when creating a cluster in the console or defaults set from CloudFormation.

Closes #9603

----

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

* feat(kms): allow specifying key spec and key usage (#14478)

This allows specifying key spec and key usage, so you can create asymmetric keys.

closes #5639


----

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

* chore: add `@types/jest` to a package that was missing it (#14609)

----

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

* chore: issue template for bugs to have an SSCCE example (#14615)

Ask customers to provide reproducible code snippets
to reduce the amount of triage time required.

----

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

* fix(cli): synth fails if there was an error when synthesizing the stack (#14613)

All stacks created inside a pipeline stage will be flagged for validation. After synth is done, the CLI will validate all flagged stacks plus the stacks that were explicitly specified.

----

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

* chore: annotate `aws-lambda-go` with `docker` requirement (#14618)

The `nozem` build tool needs to know that `docker` is required to
build/test this particular package.


----

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

* feat(elbv2): preserveClientIp for NetworkTargetGroup (#14589)

Allows users to configure client IP preservation for network target groups.

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html

----

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

* chore: npm-check-updates && yarn upgrade (#14620)

Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.

* chore(mergify): add @BenChaimberg to team roster

* chore(release): 1.103.0

* chore: mark "otaviomacedo" as core contributor (#14619)

Co-authored-by: Otavio Macedo <otaviomacedo@protonmail.com>

* chore(cli): add npm command to upgrade notice (#14621)

A colleague had to go look up the command to update the CDK CLI. It occurred to me that is probably common with developers who don't work with NPM on a daily basis, such as anyone who isn't developing in TypeScript or JavaScript.

Put the necessary command right in the upgrade notice.

----

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

* fix(lambda): custom resource fails to connect to efs filesystem (#14431)

Fixes: #14430

----

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

* feat(cfnspec): cloudformation spec v35.2.0 (#14610)

* feat: cloudformation spec v35.2.0

* add spec patches

Co-authored-by: AWS CDK Team <aws-cdk@amazon.com>
Co-authored-by: Elad Ben-Israel <benisrae@amazon.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix(lambda-nodejs): handler filename missing from error message (#14564)


----

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

* chore(build): clarify prerequisites in CONTRIBUTING and verify before build (#14642)

The build script at the top level of the repository performs a prerequisites check before beginning the build. This verification is not complete as it does not include the required checks for .NET and Python executables. Further, the prerequisites documentation in the contributing guide does not note the Docker requirement.

----

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

Co-authored-by: Niranjan Jayakar <nija@amazon.com>
Co-authored-by: OksanaH <34384274+OksanaH@users.noreply.github.com>
Co-authored-by: Dominic Fezzie <fezzid@amazon.com>
Co-authored-by: Curtis <curtis.eppel@cultureamp.com>
Co-authored-by: Shinya Tsuda <shinya@dacci.org>
Co-authored-by: Rico Huijbers <rix0rrr@gmail.com>
Co-authored-by: Otavio Macedo <otaviomacedo@protonmail.com>
Co-authored-by: Griffin Byatt <byatt.griffin@gmail.com>
Co-authored-by: Ben Chaimberg <chaimber@amazon.com>
Co-authored-by: AWS CDK Team <aws-cdk@amazon.com>
Co-authored-by: Mitchell Valine <valinm@amazon.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jerry Kindall <52084730+Jerry-AWS@users.noreply.github.com>
Co-authored-by: Daniel Neilson <53624638+ddneilson@users.noreply.github.com>
Co-authored-by: Elad Ben-Israel <benisrae@amazon.com>
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this issue Aug 26, 2021
L2 Construct for a MSK Cluster. 

I wrote this for internal use and thought I'd share it. I tried to follow the [example resource](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/example-construct-library/lib/example-resource.ts) and [design guidelines](https://github.com/aws/aws-cdk/blob/master/DESIGN_GUIDELINES.md) as much as I could. Default properties were chosen either based on defaults when creating a cluster in the console or defaults set from CloudFormation.

Closes aws#9603

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-msk Related to Amazon Managed Streaming for Apache Kafka (Amazon MSK) effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. in-progress This issue is being actively worked on. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants