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

Amazon OpenSearch Service: High Level Constructs For OpenSearch Coordinator (NodeOptions) Feature #32553

Open
2 tasks
dubesar opened this issue Dec 17, 2024 · 11 comments
Labels
@aws-cdk/aws-opensearch Related to the @aws-cdk/aws-opensearchservice package effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@dubesar
Copy link

dubesar commented Dec 17, 2024

Describe the feature

Describe the feature
The OpenSearch Team has recently launched Coordinator Node Feature for OpenSearch Domain which can be specified under a parameter called NodeOptions in ClusterConfig. API Documentation Link. According to the CDK docs, currently there is no high level CDK construct for this feature.

Use Case

The general recommendation is to use high level constructs and due to lack of High level construct for this feature. The CDK template needs to be migrated to use CFN constructs if there is a need to create an OpenSearchDomain with NodeOptions. This serves as a hindrance to the adoption of the Coordinator Node feature for AWS OpenSearch Domains.

Proposed Solution

Add the NodeOptions to the Domain high level object under ClusterConfig CDK Doc for Domain Options .
A NodeOptions based OpenSearchDomain created using CDK high level constructs should look like

const domain = new Domain(this, 'Domain', {
  version: EngineVersion.OPENSEARCH_1_0,
  clusterConfig: {
    nodeOptions: [{
      nodeType: 'coordinator' (possible values: [coordinator])
      nodeConfig: {
        enabled: true, (boolean)
        type: 'm5.xlarge.search', (string)
        count: 1 (number)
      }
    }]
  }
});

Other Information

No response

Acknowledgements

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

CDK version used

NA (Yet to be updated)

Environment details (OS name and version, etc.)

macOS Venture 13.7.1

@dubesar dubesar added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 17, 2024
@github-actions github-actions bot added the @aws-cdk/aws-opensearch Related to the @aws-cdk/aws-opensearchservice package label Dec 17, 2024
@dubesar dubesar changed the title Amazon OpenSearch Service: High Level Constructs For OpenSearch NodeOptions Feature (In Deployment) Amazon OpenSearch Service: High Level Constructs For OpenSearch NodeOptions Feature Dec 17, 2024
@dubesar dubesar changed the title (In Deployment) Amazon OpenSearch Service: High Level Constructs For OpenSearch NodeOptions Feature (In Deployment) Amazon OpenSearch Service: High Level Constructs For OpenSearch Coordinator (NodeOptions) Feature Dec 17, 2024
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 17, 2024
@khushail khushail self-assigned this Dec 17, 2024
@khushail
Copy link
Contributor

khushail commented Dec 17, 2024

Hi @dubesar , thanks for requesting this. CDK high level construct are basically synthesized to Cloudformation L1 Constructs. I see that this NodeOptions is not currently provided by the Cloudformation construct, so unless this is supported by Cloudformation, would have to wait and once is done from their side, CDK support can be provided.

You can create a feature request with Cloudformation team on their coverage roadmap and follow that for updates.Hope that would be helpful.
Thanks.

@khushail khushail added the needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. label Dec 17, 2024
@khushail khushail removed their assignment Dec 17, 2024
@khushail khushail added p3 effort/medium Medium work item – several days of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Dec 17, 2024
@dubesar
Copy link
Author

dubesar commented Dec 18, 2024

Thanks for the reply, the cloudformation change is still in deployment, will inform once it's completed.

@dubesar
Copy link
Author

dubesar commented Dec 18, 2024

@khushail the NodeOptions seems to be available now in the Cloudformation construct, Can you please check once?

@khushail
Copy link
Contributor

khushail commented Dec 18, 2024

@dubesar , Thanks for keeping a check on the recent updates with Cloudformation team.

I see that NodeOptions is available on cloudformation-https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-clusterconfig.html#cfn-opensearchservice-domain-clusterconfig-nodeoptions but the corresponding changes have not been incorporated in regions cloudformation specifications and relevant CDK docs.

CDK Docs pending update - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.ClusterConfigProperty.html

Cloudformation resource specification doc missing the NodeOptions -https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json

Screenshot 2024-12-18 at 12 36 10 PM

I am unable to see the cloudformation construct updated with NodeOptions(https://github.com/cdklabs/awscdk-service-spec/blob/%40aws-cdk/service-spec-types%40v0.0.63/sources/CloudFormationSchema/us-east-1/aws-opensearchservice-domain.json) could you please share the link as it seems like L1 construct is still not updated with this property.
Thanks

@khushail khushail added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Dec 18, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Dec 21, 2024
@dubesar dubesar changed the title (In Deployment) Amazon OpenSearch Service: High Level Constructs For OpenSearch Coordinator (NodeOptions) Feature Amazon OpenSearch Service: High Level Constructs For OpenSearch Coordinator (NodeOptions) Feature Dec 21, 2024
@dubesar
Copy link
Author

dubesar commented Dec 21, 2024

I am not sure when the CDK docs will be updated, but the deployment from our side has been completed. Will keep a track if this is eventually consistent and will be updated in a few days.

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Dec 22, 2024
@dubesar
Copy link
Author

dubesar commented Jan 2, 2025

Hey, I am still not sure why this hasn't been updated yet.

Can you help me from where does the link: https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json gets updated?

Also as a proposed solution we would like CDK to work like -

const domain = new Domain(this, 'Domain', {
  version: EngineVersion.OPENSEARCH_1_0,
  clusterConfig: {
    nodeOptions: [{
      nodeType: 'coordinator' (possible values: [coordinator])
      nodeConfig: {
        enabled: true, (boolean)
        type: 'm5.xlarge.search', (string)
        count: 1 (number)
      }
    }]
  }
});

Can you please help as the documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-clusterconfig.html, has already been updated.

@dubesar
Copy link
Author

dubesar commented Jan 7, 2025

Hi Team, can we look into this please?

@khushail khushail added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Jan 7, 2025
@khushail khushail removed the needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. label Jan 7, 2025
@khushail
Copy link
Contributor

khushail commented Jan 7, 2025

@dubesar ,

Cloduformation resource spec -https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json

Screenshot 2025-01-07 at 10 46 59 AM

Cloudformation doc - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.ClusterConfigProperty.html#nodeoptions

I see that Cloudformation specification docs are also updated with this NodeOptions property as well, so you can now use the L1 construct for this feature.

@khushail khushail removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Jan 7, 2025
@dubesar
Copy link
Author

dubesar commented Jan 7, 2025

Thanks @khushail, so are we good with the above implementation then? Are we good to close this ticket as well?

@khushail
Copy link
Contributor

khushail commented Jan 7, 2025

@dubesar , The NodeOptions property is available through L1 construct only ,which means you can not use it as you suggested here. For clusterConfig to work like that, it has to available as DomainProps, which is currently not feasible. Here is how you can do this -

const domain = new Domain(this, 'Domain', {
      version: EngineVersion.OPENSEARCH_1_0,
      capacity: {
        masterNodes: 3,
        masterNodeInstanceType: 'm5.large.search',
        dataNodes: 2,
        dataNodeInstanceType: 'm5.large.search'
      },
      ebs: {
        volumeSize: 100
      },
      zoneAwareness: {
        availabilityZoneCount: 3
      }
    });

    const cfndomain = domain.node.defaultChild as opensearchservice.CfnDomain;
    cfndomain.clusterConfig = {
      coldStorageOptions: {
        enabled: false,
      },
      dedicatedMasterCount: 123,
      dedicatedMasterEnabled: false,
      dedicatedMasterType: 'dedicatedMasterType',
      instanceCount: 123,
      instanceType: 'instanceType',
      multiAzWithStandbyEnabled: false,
      nodeOptions: [{
        nodeConfig: {
          count: 123,
          enabled: false,
          type: 'type',
        },
        nodeType: 'nodeType',
      }],
      warmCount: 123,
      warmEnabled: false,
      warmType: 'warmType',
      zoneAwarenessConfig: {
        availabilityZoneCount: 123,
      },
      zoneAwarenessEnabled: false,
    };
  }

This would be synthesized into this json template -

{
 "Resources": {
  "Domain66AC69E0": {
   "Type": "AWS::OpenSearchService::Domain",
   "Properties": {
    "ClusterConfig": {
     "ColdStorageOptions": {
      "Enabled": false
     },
     "DedicatedMasterCount": 123,
     "DedicatedMasterEnabled": false,
     "DedicatedMasterType": "dedicatedMasterType",
     "InstanceCount": 123,
     "InstanceType": "instanceType",
     "MultiAZWithStandbyEnabled": false,
     "NodeOptions": [
      {
       "NodeConfig": {
        "Count": 123,
        "Enabled": false,
        "Type": "type"
       },
       "NodeType": "nodeType"
      }
     ],
     "WarmCount": 123,
     "WarmEnabled": false,
     "WarmType": "warmType",
     "ZoneAwarenessConfig": {
      "AvailabilityZoneCount": 123
     },
     "ZoneAwarenessEnabled": false
    },
    "DomainEndpointOptions": {
     "EnforceHTTPS": false,
     "TLSSecurityPolicy": "Policy-Min-TLS-1-0-2019-07"
    },
    "EBSOptions": {
     "EBSEnabled": true,
     "VolumeSize": 100,
     "VolumeType": "gp2"
    },
    "EncryptionAtRestOptions": {
     "Enabled": false
    },
    "EngineVersion": "OpenSearch_1.0",
    "LogPublishingOptions": {},
    "NodeToNodeEncryptionOptions": {
     "Enabled": false
    }
   },
   "UpdateReplacePolicy": "Retain",
   "DeletionPolicy": "Retain",
   "Metadata": {
    "aws:cdk:path": "NodeOptionsStack/Domain/Resource"
   }
  },

Hope that would be useful.
Please feel free to close this issue if your ask is fulfilled.

@khushail khushail added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-opensearch Related to the @aws-cdk/aws-opensearchservice package effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants