Skip to content

Commit

Permalink
Add options to enable automatic software updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsinger committed Dec 17, 2024
1 parent 4e03f35 commit 826baa0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit 826baa0

Please sign in to comment.