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 options to enable automatic software updates #153

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Pair this pacakge with [@nasa-gcn/architect-functions-search](https://github.com
3. Amazon offers two flavors of managed OpenSearch: OpenSearch Service and OpenSearch Serverless. By default, this plugin will provision OpenSearch Serverless. If you want to use OpenSearch Service instead, then add a `@search` section to your `app.arc` file:

@search
# Enable automatic software updates (disabled by default).
autoSoftwareUpdateEnabled true
# See https://docs.aws.amazon.com/opensearch-service/latest/developerguide/supported-instance-types.html for supported instance types
instanceType t3.small.search
instanceCount 2
Expand All @@ -30,6 +32,8 @@ Pair this pacakge with [@nasa-gcn/architect-functions-search](https://github.com
# master nodes are disabled.
dedicatedMasterCount 3
dedicatedMasterType t3.small.search
# Enable off-peak window for software updates (disabled by default).
offPeakWindowEnabled true
# Use OpenSearch in sandbox mode; default is Elasticsearch.
sandboxEngine opensearch

Expand Down
6 changes: 6 additions & 0 deletions service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
*/

export function cloudformationResources({
autoSoftwareUpdateEnabled,
availabilityZoneCount,
dedicatedMasterCount,
dedicatedMasterType,
instanceCount,
instanceType,
offPeakWindowEnabled,
volumeSize,
}: Record<string, string | undefined>) {
if (!availabilityZoneCount)
Expand Down Expand Up @@ -80,6 +82,7 @@ export function cloudformationResources({
},
],
},
AutoSoftwareUpdateEnabled: Boolean(autoSoftwareUpdateEnabled),
ClusterConfig: {
DedicatedMasterCount,
DedicatedMasterEnabled,
Expand All @@ -106,6 +109,9 @@ export function cloudformationResources({
},
},
NodeToNodeEncryptionOptions: { Enabled: true },
OffPeakWindowOptions: {
Enabled: Boolean(offPeakWindowEnabled),
},
},
},
}
Expand Down
Loading