Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 2f11759

Browse files
author
Irving Popovetsky
authored
Start v5.0.4 - enable new 3-zone ZoneAwareness for Elasticsearch (#57)
Signed-off-by: Irving Popovetsky <[email protected]>
1 parent a0c503a commit 2f11759

File tree

9 files changed

+114
-71
lines changed

9 files changed

+114
-71
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ You can launch this stack with the push of a button:
3737

3838
| Edition | Version | Est Monthly cost | Launch button |
3939
| ------- | ------- | ---------------- | ------------- |
40-
| High Performance | 5.0.3 | [$1500*](https://calculator.s3.amazonaws.com/index.html#r=IAD&s=EC2&key=calc-E9251374-D80C-45B7-BED7-C9C9778B1D6C) | <p><a href="https://console.aws.amazon.com/cloudformation/home#/stacks/new?templateURL=https:%2F%2Fs3.amazonaws.com%2Faws-native-chef-server%2F5.0.3%2Fmain.yaml&amp;stackName=my-chef-stack" target="_blank"><img src="https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png" alt="Launch Stack" /></a></p> |
41-
| Lowest Cost | 5.0.3 | [$320*](https://calculator.s3.amazonaws.com/index.html#r=IAD&s=EC2&key=files/calc-165638db8e331664846c0d6654d743377bd3eac6&v=ver20190604sQ) | <p><a href="https://console.aws.amazon.com/cloudformation/home#/stacks/new?templateURL=https:%2F%2Fs3.amazonaws.com%2Faws-native-chef-server%2F5.0.3%2Fmarketplace.yaml&amp;stackName=my-chef-stack" target="_blank"><img src="https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png" alt="Launch Stack" /></a></p> |
40+
| High Performance | 5.0.4 | [$1500*](https://calculator.s3.amazonaws.com/index.html#r=IAD&s=EC2&key=calc-E9251374-D80C-45B7-BED7-C9C9778B1D6C) | <p><a href="https://console.aws.amazon.com/cloudformation/home#/stacks/new?templateURL=https:%2F%2Fs3.amazonaws.com%2Faws-native-chef-server%2F5.0.4%2Fmain.yaml&amp;stackName=my-chef-stack" target="_blank"><img src="https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png" alt="Launch Stack" /></a></p> |
41+
| Lowest Cost | 5.0.4 | [$320*](https://calculator.s3.amazonaws.com/index.html#r=IAD&s=EC2&key=files/calc-165638db8e331664846c0d6654d743377bd3eac6&v=ver20190604sQ) | <p><a href="https://console.aws.amazon.com/cloudformation/home#/stacks/new?templateURL=https:%2F%2Fs3.amazonaws.com%2Faws-native-chef-server%2F5.0.4%2Fmarketplace.yaml&amp;stackName=my-chef-stack" target="_blank"><img src="https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png" alt="Launch Stack" /></a></p> |
4242

4343
_*NOTE: Estimated costs are just that, your mileage will vary. Use reserved instances to greatly reduce costs for long-running clusters._
4444

@@ -48,7 +48,7 @@ However, the most repeatable and least error-prone way to launch this stack is t
4848
```bash
4949
MYBUCKET=aws-native-chef-server
5050
MYID=mycompany
51-
VERSION=5.0.3
51+
VERSION=5.0.4
5252
EDITION=main # main or marketplace
5353
# Configure the automate_stack_parameters.json and then launch the cloudformation stack:
5454
# If you're using your own bucket, uncomment the next line:
@@ -69,7 +69,7 @@ If you've made changes to the template content or parameters and you wish to upd
6969
```bash
7070
MYBUCKET=aws-native-chef-server
7171
MYID=mycompany
72-
VERSION=5.0.3
72+
VERSION=5.0.4
7373
EDITION=main # main or marketplace
7474
# If you're using your own bucket, uncomment the next line:
7575
# aws s3 sync . s3://$MYBUCKET/$VERSION/ --exclude "*" --include "*.yaml" --include "files/*" && \

automate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: AWS Native Automate 2 (auto-recovering standalone) v5.0.3
2+
Description: AWS Native Automate 2 (auto-recovering standalone) v5.0.4
33

44
Parameters:
55
# Required Parameters

chef_elasticsearch.yaml

Lines changed: 58 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: Chef Server Elasticsearch 5.0.3
2+
Description: Chef Server Elasticsearch 5.0.4
33

44
Parameters:
55
# Required Parameters
@@ -21,20 +21,35 @@ Parameters:
2121
Description: The Instance type to use for ElasticSearch instances (Note, must have ephemeral storage, the instance type affects the total amount of elasticsearch storage. i3 strongly recommended)
2222
Type: String
2323
Default: 'i3.large.elasticsearch'
24-
AllowedValues: [
25-
'i3.large.elasticsearch', 'i3.xlarge.elasticsearch', 'i3.2xlarge.elasticsearch', 'i3.4xlarge.elasticsearch', 'i3.8xlarge.elasticsearch', 'i3.16xlarge.elasticsearch',
26-
'i2.xlarge.elasticsearch', 'i2.2xlarge.elasticsearch',
27-
'm3.medium.elasticsearch', 'm3.large.elasticsearch', 'm3.xlarge.elasticsearch', 'm3.medium.elasticsearch',
28-
'r3.large.elasticsearch', 'r3.xlarge.elasticsearch', 'r3.2xlarge.elasticsearch', 'r3.4xlarge.elasticsearch', 'r3.8xlarge.elasticsearch' ]
24+
AllowedValues:
25+
[
26+
'i3.large.elasticsearch',
27+
'i3.xlarge.elasticsearch',
28+
'i3.2xlarge.elasticsearch',
29+
'i3.4xlarge.elasticsearch',
30+
'i3.8xlarge.elasticsearch',
31+
'i3.16xlarge.elasticsearch',
32+
'i2.xlarge.elasticsearch',
33+
'i2.2xlarge.elasticsearch',
34+
'm3.medium.elasticsearch',
35+
'm3.large.elasticsearch',
36+
'm3.xlarge.elasticsearch',
37+
'm3.medium.elasticsearch',
38+
'r3.large.elasticsearch',
39+
'r3.xlarge.elasticsearch',
40+
'r3.2xlarge.elasticsearch',
41+
'r3.4xlarge.elasticsearch',
42+
'r3.8xlarge.elasticsearch',
43+
]
2944
ElasticSearchVersion:
3045
Description: Version of ElasticSearch to use
3146
Type: String
3247
Default: '5.6'
3348
AllowedValues:
34-
- '2.3'
35-
- '5.3'
36-
- '5.5'
37-
- '5.6'
49+
- '2.3'
50+
- '5.3'
51+
- '5.5'
52+
- '5.6'
3853
ElasticSearchShardCount:
3954
Description: Number of ElasticSearch hosts to provision at launch (3 recommended, 2 provides HA)
4055
Default: 3
@@ -54,16 +69,15 @@ Parameters:
5469
Type: String
5570

5671
Conditions:
57-
2ZoneES:
58-
!Equals [!Ref ElasticSearchShardCount, 2]
72+
2ZoneES: !Equals [!Ref ElasticSearchShardCount, 2]
5973

6074
Resources:
61-
# ElasticSearch
62-
#########################################################################################
75+
# ElasticSearch
76+
#########################################################################################
6377
ESSecurityGroup:
6478
Type: AWS::EC2::SecurityGroup
6579
Properties:
66-
GroupDescription: "Elasticsearch Frontend Access"
80+
GroupDescription: 'Elasticsearch Frontend Access'
6781
VpcId: !Ref VPC
6882
SecurityGroupIngress:
6983
- IpProtocol: tcp
@@ -77,40 +91,49 @@ Resources:
7791
ElasticsearchVersion: !Ref ElasticSearchVersion
7892
ElasticsearchClusterConfig:
7993
InstanceCount: !Sub ${ElasticSearchShardCount}
80-
ZoneAwarenessEnabled: !If [2ZoneES, true, false]
94+
ZoneAwarenessEnabled: true
95+
ZoneAwarenessConfig:
96+
AvailabilityZoneCount: !If [2ZoneES, 2, 3]
8197
InstanceType: !Ref ElasticSearchInstanceType
8298
DedicatedMasterEnabled: false
8399
SnapshotOptions:
84100
AutomatedSnapshotStartHour: 0
85101
AccessPolicies:
86-
Version: "2012-10-17"
102+
Version: '2012-10-17'
87103
Statement:
88-
- Effect: "Allow"
104+
- Effect: 'Allow'
89105
Principal:
90106
AWS: !Ref ChefRole
91-
Action: "es:*"
92-
Resource: !Sub "arn:aws:es:${AWS::Region}:${AWS::AccountId}:*"
107+
Action: 'es:*'
108+
Resource: !Sub 'arn:aws:es:${AWS::Region}:${AWS::AccountId}:*'
93109
VPCOptions:
94-
SubnetIds: !If [
95-
2ZoneES,
96-
[ !Select [ 0, !Ref ChefServerSubnets ], !Select [ 1, !Ref ChefServerSubnets ]],
97-
[ !Select [ 0, !Ref ChefServerSubnets ] ]
98-
]
110+
SubnetIds:
111+
!If [
112+
2ZoneES,
113+
[
114+
!Select [0, !Ref ChefServerSubnets],
115+
!Select [1, !Ref ChefServerSubnets],
116+
],
117+
[
118+
!Select [0, !Ref ChefServerSubnets],
119+
!Select [1, !Ref ChefServerSubnets],
120+
!Select [2, !Ref ChefServerSubnets],
121+
],
122+
]
99123
SecurityGroupIds:
100124
- !Ref ESSecurityGroup
101125
AdvancedOptions:
102-
rest.action.multi.allow_explicit_index: "true"
126+
rest.action.multi.allow_explicit_index: 'true'
103127
Tags:
104-
- Key: Name
105-
Value: !Sub ${AWS::StackName}-ES
106-
- Key: X-Dept
107-
Value: !Ref ContactDept
108-
- Key: X-Contact
109-
Value: !Ref ContactEmail
110-
128+
- Key: Name
129+
Value: !Sub ${AWS::StackName}-ES
130+
- Key: X-Dept
131+
Value: !Ref ContactDept
132+
- Key: X-Contact
133+
Value: !Ref ContactEmail
111134

112-
# Monitoring
113-
#########################################################################################
135+
# Monitoring
136+
#########################################################################################
114137
ESClusterRed:
115138
Type: AWS::CloudWatch::Alarm
116139
Properties:
@@ -130,7 +153,6 @@ Resources:
130153
- Name: ClientId
131154
Value: !Ref AWS::AccountId
132155

133-
134156
ESClusterYellow:
135157
Type: AWS::CloudWatch::Alarm
136158
Properties:

chef_rds.yaml

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: Chef Server PostgreSQL v5.0.3
2+
Description: Chef Server PostgreSQL v5.0.4
33

44
Parameters:
55
# Required Parameters
@@ -25,10 +25,32 @@ Parameters:
2525
Description: EC2 Instance type for RDS DBs (M5 class recommended for performance)
2626
Default: 'db.m5.large'
2727
Type: String
28-
AllowedValues: [db.t3.small, db.t3.medium, db.t3.large, db.t3.xlarge, db.t3.2xlarge,
29-
db.m4.large, db.m4.xlarge, db.m4.2xlarge, db.m4.4xlarge, db.m4.10xlarge, db.m4.16xlarge,
30-
db.r4.large, db.r4.xlarge, db.r4.2xlarge, db.r4.4xlarge, db.r4.8xlarge, db.r4.16xlarge,
31-
db.m5.large, db.m5.xlarge, db.m5.2xlarge, db.m5.4xlarge, db.m5.12xlarge, db.m5.24xlarge]
28+
AllowedValues:
29+
[
30+
db.t3.small,
31+
db.t3.medium,
32+
db.t3.large,
33+
db.t3.xlarge,
34+
db.t3.2xlarge,
35+
db.m4.large,
36+
db.m4.xlarge,
37+
db.m4.2xlarge,
38+
db.m4.4xlarge,
39+
db.m4.10xlarge,
40+
db.m4.16xlarge,
41+
db.r4.large,
42+
db.r4.xlarge,
43+
db.r4.2xlarge,
44+
db.r4.4xlarge,
45+
db.r4.8xlarge,
46+
db.r4.16xlarge,
47+
db.m5.large,
48+
db.m5.xlarge,
49+
db.m5.2xlarge,
50+
db.m5.4xlarge,
51+
db.m5.12xlarge,
52+
db.m5.24xlarge,
53+
]
3254
DBStorageType:
3355
Description: Select gp2 or io1 DB storage. io1 is much higher performing, must select minimum 100GB storage and an IOPS value
3456
Default: 'gp2'
@@ -62,14 +84,13 @@ Parameters:
6284
Type: String
6385

6486
Conditions:
65-
UsePiopsStorage:
66-
!Equals [ !Ref DBStorageType, 'io1' ]
87+
UsePiopsStorage: !Equals [!Ref DBStorageType, 'io1']
6788

6889
Resources:
6990
DBSecurityGroup:
7091
Type: AWS::EC2::SecurityGroup
7192
Properties:
72-
GroupDescription: "RDS Frontend Access"
93+
GroupDescription: 'RDS Frontend Access'
7394
VpcId: !Ref VPC
7495
SecurityGroupIngress:
7596
- IpProtocol: tcp
@@ -85,7 +106,7 @@ Resources:
85106

86107
DBPostgres:
87108
Type: AWS::RDS::DBInstance
88-
DeletionPolicy: "Snapshot"
109+
DeletionPolicy: 'Snapshot'
89110
Properties:
90111
DBName: chef
91112
AllocatedStorage: !Ref DBAllocatedStorage
@@ -116,26 +137,26 @@ Resources:
116137
Type: AWS::RDS::EventSubscription
117138
Properties:
118139
EventCategories:
119-
- "availability"
140+
- 'availability'
120141
# - "backup"
121-
- "configuration change"
122-
- "creation"
123-
- "deletion"
124-
- "failover"
125-
- "failure"
126-
- "low storage"
127-
- "maintenance"
128-
- "notification"
142+
- 'configuration change'
143+
- 'creation'
144+
- 'deletion'
145+
- 'failover'
146+
- 'failure'
147+
- 'low storage'
148+
- 'maintenance'
149+
- 'notification'
129150
# - "read replica"
130-
- "recovery"
131-
- "restoration"
151+
- 'recovery'
152+
- 'restoration'
132153
SnsTopicArn: !Ref AlertNotificationTopic
133154
SourceIds:
134155
- !Ref DBPostgres
135156
SourceType: db-instance
136157

137-
# Monitoring
138-
#########################################################################################
158+
# Monitoring
159+
#########################################################################################
139160
RDSWriteLatency:
140161
Type: AWS::CloudWatch::Alarm
141162
Properties:

chef_server_ha.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: AWS Native Chef Server (auto-scaling HA) v5.0.3
2+
Description: AWS Native Chef Server (auto-scaling HA) v5.0.4
33

44
Parameters:
55
# Required Parameters
@@ -185,7 +185,7 @@ Parameters:
185185
Type: String
186186
TemplateVersion:
187187
Type: String
188-
Default: "5.0.3"
188+
Default: "5.0.4"
189189

190190
Metadata:
191191
cfn-lint:

chef_server_ops_dashboard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: AWS Native OpsDashboard for Chef Server v5.0.3
2+
Description: AWS Native OpsDashboard for Chef Server v5.0.4
33

44
Parameters:
55
# Required Parameters

main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: AWS Native Chef Stack v5.0.3
2+
Description: AWS Native Chef Stack v5.0.4
33

44
Parameters:
55
# Required Parameters
@@ -194,7 +194,7 @@ Parameters:
194194
TemplateVersion:
195195
Description: The version of this template to use (do not change this unless directed by support)
196196
Type: String
197-
Default: "5.0.3"
197+
Default: "5.0.4"
198198
Route53HostedZone:
199199
Type: String
200200
Default: ''

marketplace.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: AWS Native Chef Stack for Marketplace v5.0.3
2+
Description: AWS Native Chef Stack for Marketplace v5.0.4
33

44
Parameters:
55
# Required Parameters
@@ -186,7 +186,7 @@ Parameters:
186186
TemplateVersion:
187187
Description: The version of this template to use (do not change this unless directed by support)
188188
Type: String
189-
Default: "5.0.3"
189+
Default: "5.0.4"
190190
LogsRetentionInDays:
191191
Description: Specifies the number of days you want to retain cloudwatch log events.
192192
Type: Number

supermarket.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: '2010-09-09'
2-
Description: AWS Native Supermarket (auto-recovering standalone) v5.0.3
2+
Description: AWS Native Supermarket (auto-recovering standalone) v5.0.4
33

44
Parameters:
55
# Required Parameters

0 commit comments

Comments
 (0)