From fce305519cd84197fcbe2daa60880319aba330ec Mon Sep 17 00:00:00 2001 From: Rishabh Singh Date: Wed, 31 May 2023 12:13:21 -0700 Subject: [PATCH] Make r5.xlarge as default instance type (#33) Signed-off-by: Rishabh Singh --- README.md | 4 ++-- lib/os-cluster-entrypoint.ts | 4 ++-- test/os-cluster.test.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3c9e2ebc2fc..f9b1f351ade 100644 --- a/README.md +++ b/README.md @@ -51,8 +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.2xlarge. 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.2xlarge. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c mlInstanceType=m5.xlarge` | +| dataInstanceType (Optional) | string | EC2 instance type for data node, defaults to r5.xlarge. 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.xlarge. See options in `lib/opensearch-config/node-config.ts` for available options. E.g., `-c mlInstanceType=m5.xlarge` | | jvmSysProps (Optional) | string | A comma-separated list of key=value pairs that will be added to `jvm.options` as JVM system properties. | | additionalConfig (Optional) | string | Additional opensearch.yml config parameters passed as JSON. e.g., `--context additionalConfig='{"plugins.security.nodes_dn": ["CN=*.example.com, OU=SSL, O=Test, L=Test, C=DE", "CN=node.other.com, OU=SSL, O=Test, L=Test, C=DE"], "plugins.security.nodes_dn_dynamic_config_enabled": false}'` | | suffix (Optional) | string | An optional string identifier to be concatenated with infra stack name. | diff --git a/lib/os-cluster-entrypoint.ts b/lib/os-cluster-entrypoint.ts index c386b1ad1cb..638918b5ca4 100644 --- a/lib/os-cluster-entrypoint.ts +++ b/lib/os-cluster-entrypoint.ts @@ -27,12 +27,12 @@ const getInstanceType = (instanceType: string, arch: string) => { if (instanceType !== 'undefined') { return getX64InstanceTypes(instanceType); } - return getX64InstanceTypes('r5.2xlarge'); + return getX64InstanceTypes('r5.xlarge'); } if (instanceType !== 'undefined') { return getArm64InstanceTypes(instanceType); } - return getArm64InstanceTypes('r6g.2xlarge'); + return getArm64InstanceTypes('r6g.xlarge'); }; export class OsClusterEntrypoint { diff --git a/test/os-cluster.test.ts b/test/os-cluster.test.ts index 0f00a508e37..0bf47f79c83 100644 --- a/test/os-cluster.test.ts +++ b/test/os-cluster.test.ts @@ -54,7 +54,7 @@ test('Test Resources with security disabled multi-node default instance types', Protocol: 'TCP', }); infraTemplate.hasResourceProperties('AWS::AutoScaling::LaunchConfiguration', { - InstanceType: 'r5.2xlarge', + InstanceType: 'r5.xlarge', IamInstanceProfile: { Ref: 'dataNodeAsgInstanceProfileEC27E8D1', }, @@ -292,7 +292,7 @@ test('Test multi-node cluster with only data-nodes', () => { infraTemplate.resourceCountIs('AWS::AutoScaling::AutoScalingGroup', 2); infraTemplate.resourceCountIs('AWS::AutoScaling::LaunchConfiguration', 2); infraTemplate.hasResourceProperties('AWS::AutoScaling::LaunchConfiguration', { - InstanceType: 'r5.2xlarge', + InstanceType: 'r5.xlarge', IamInstanceProfile: { Ref: 'seedNodeAsgInstanceProfile6F1EA4FF', },