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

Add ec2 instance options for data and ml nodes #30

Merged
merged 1 commit into from
May 24, 2023

Conversation

rishabh6788
Copy link
Collaborator

@rishabh6788 rishabh6788 commented May 18, 2023

Description

This PR adds ec2 isntance options for data and ml nodes.
This PR also adds the ability to set seed node to data instance type and storage when there is no dedicated master node configured.
The single-node is fixed to eg.2xlarge due to urgent requirement for it to be used for benchmarking test. Will update this to use the passed data ec2 instance type post P0 release.
Other nodes except data and ml default to c5.xlarge, options for them can be provided in subsequent PRs.

Issues Resolved

#6 #27 #28

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@b450ca4). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #30   +/-   ##
=======================================
  Coverage        ?   81.12%           
=======================================
  Files           ?        5           
  Lines           ?      339           
  Branches        ?      102           
=======================================
  Hits            ?      275           
  Misses          ?       64           
  Partials        ?        0           

@rishabh6788
Copy link
Collaborator Author

@gaiksaya @peterzhuamazon @prudhvigodithi Need your review.

README.md Outdated
@@ -51,6 +51,8 @@ In order to deploy both the stacks the user needs to provide a set of required a
| clientNodeCount (Optional) | integer | Number of dedicated client nodes, default is 0 |
| ingestNodeCount (Optional) | integer | Number of dedicated ingest nodes, default is 0 |
| mlNodeCount (Optional) | integer | Number of dedicated machine learning nodes, default is 0 |
| dataInstanceType (Optional) | string | Ec2 instance type for data node, defaults to r5.large. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c dataInstanceType=m5.xlarge` |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| dataInstanceType (Optional) | string | Ec2 instance type for data node, defaults to r5.large. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c dataInstanceType=m5.xlarge` |
| dataInstanceType (Optional) | string | EC2 instance type for data node, defaults to r5.large. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c dataInstanceType=m5.xlarge` |

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

README.md Outdated
@@ -51,6 +51,8 @@ In order to deploy both the stacks the user needs to provide a set of required a
| clientNodeCount (Optional) | integer | Number of dedicated client nodes, default is 0 |
| ingestNodeCount (Optional) | integer | Number of dedicated ingest nodes, default is 0 |
| mlNodeCount (Optional) | integer | Number of dedicated machine learning nodes, default is 0 |
| dataInstanceType (Optional) | string | Ec2 instance type for data node, defaults to r5.large. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c dataInstanceType=m5.xlarge` |
| mlInstanceType (Optional) | string | Ec2 instance type for ml node, defaults to r5.large. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c mlInstanceType=m5.xlarge` |
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
| mlInstanceType (Optional) | string | Ec2 instance type for ml node, defaults to r5.large. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c mlInstanceType=m5.xlarge` |
| mlInstanceType (Optional) | string | EC2 instance type for ml node, defaults to r5.large. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c mlInstanceType=m5.xlarge` |

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

Comment on lines +58 to +59
readonly dataEc2InstanceType: InstanceType,
readonly mlEc2InstanceType: InstanceType,
Copy link
Member

Choose a reason for hiding this comment

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

Should we enable instance type for all types of nodes including leader, etc? Keep defaults but allow option to override for others too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not required as manager and client nodes not really do any heavy lifting and are only involved in book-keeping and traffic routing tasks.
We can take it up in future if the need arises.
@gaiksaya

Signed-off-by: Rishabh Singh <sngri@amazon.com>
@gaiksaya gaiksaya changed the title Add ec2 isntance options for data and ml nodes Add ec2 instance options for data and ml nodes May 24, 2023
@rishabh6788 rishabh6788 merged commit 465f824 into opensearch-project:main May 24, 2023
5 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 24, 2023
Signed-off-by: Rishabh Singh <sngri@amazon.com>
(cherry picked from commit 465f824)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants