Skip to content

Commit 97ac52e

Browse files
committed
Merge branch 'develop' into 'main'
Merging hot-fix for ocsp issue on RES BI stack See merge request mwvaughn/aws-hpc-recipes!172
2 parents 6e696b1 + 325a4df commit 97ac52e

File tree

8 files changed

+49
-49
lines changed

8 files changed

+49
-49
lines changed

recipes/res/res_demo_env/assets/bi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Parameters:
3535
Type: String
3636
Default: ""
3737
EnvironmentName:
38-
Description: (Optional) EnvironmentName must start with "res-"and should be less than or equal to 11 characters. Required to generate certificates.
38+
Description: (Optional) EnvironmentName must start with "res-" without capital letters and should be less than or equal to 11 characters. Required to generate certificates.
3939
Type: String
40-
AllowedPattern: ^$|^res-[A-Za-z\-\_0-9]{0,7}$
40+
AllowedPattern: ^$|^res-[a-z\-\_0-9]{0,7}$
4141
Default: res-demo
4242
AdminPassword:
4343
Description: (Optional) Provide the Active Directory Administrator Account Password Directly or Resource ARN to Secret Containing Password.

recipes/res/res_demo_env/assets/res-demo-stack.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Parameters:
2727
Description: Provide name of the RES Environment. Must be unique for your account and AWS Region.
2828
Type: String
2929
Default: res-demo
30-
AllowedPattern: ^res-[A-Za-z\-\_0-9]{0,7}$
31-
ConstraintDescription: EnvironmentName must start with "res-" and should be less than or equal to 11 characters.
30+
AllowedPattern: ^res-[a-z\-\_0-9]{0,7}$
31+
ConstraintDescription: EnvironmentName must start with "res-" without capital letters and should be less than or equal to 11 characters.
3232

3333
AdministratorEmail:
3434
Type: String

recipes/res/res_demo_env/assets/res-sso-keycloak.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Parameters:
2121
Description: Provide name of the RES Environment. Must be unique for your account and AWS Region.
2222
Type: String
2323
Default: res-demo
24-
AllowedPattern: ^res-[A-Za-z\-\_0-9]{0,7}$
25-
ConstraintDescription: EnvironmentName must start with "res-" and should be less than or equal to 11 characters.
24+
AllowedPattern: ^res-[a-z\-\_0-9]{0,7}$
25+
ConstraintDescription: EnvironmentName must start with "res-" without capital letters and should be less than or equal to 11 characters.
2626

2727
Keypair:
2828
Description: EC2 Keypair to access management instance.

recipes/res/res_ready_ami/assets/imagebuilder-infrastructure.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Parameters:
1818
EnvironmentName:
1919
Type: String
2020
Description: Provide name of the RES Environment. Must be unique for your account and AWS Region.
21-
AllowedPattern: ^res-[A-Za-z\-\_0-9]{0,7}$
22-
ConstraintDescription: EnvironmentName must start with "res-" and should be less than or equal to 11 characters.
21+
AllowedPattern: ^res-[a-z\-\_0-9]{0,7}$
22+
ConstraintDescription: EnvironmentName must start with "res-" without capital letters and should be less than or equal to 11 characters.
2323
VPC:
2424
Description: VPC where RES is deployed
2525
Type: 'AWS::EC2::VPC::Id'

recipes/security/public_certs/assets/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Resources:
168168
cd acme.sh-$VERSION
169169
./acme.sh --install
170170
./acme.sh --set-default-ca --server letsencrypt
171-
./acme.sh --issue --dns dns_aws --ocsp-must-staple --keylength 4096 -d ${DomainName} -d "*.${DomainName}"
171+
./acme.sh --issue --dns dns_aws --keylength 4096 -d ${DomainName} -d "*.${DomainName}"
172172
173173
CERTKEYFILE=$HOME/.acme.sh/${DomainName}/${DomainName}.key
174174
CERTCERFILE=$HOME/.acme.sh/${DomainName}/${DomainName}.cer
@@ -322,7 +322,7 @@ Resources:
322322
cd acme.sh-$VERSION
323323
./acme.sh --install
324324
./acme.sh --set-default-ca --server letsencrypt
325-
./acme.sh --issue --dns dns_aws --ocsp-must-staple --keylength 4096 -d ${DomainName} -d "*.${DomainName}"
325+
./acme.sh --issue --dns dns_aws --keylength 4096 -d ${DomainName} -d "*.${DomainName}"
326326
327327
CERTKEYFILE=$HOME/.acme.sh/${DomainName}/${DomainName}.key
328328
CERTCERFILE=$HOME/.acme.sh/${DomainName}/${DomainName}.cer

recipes/storage/efs_simple/assets/main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,13 @@ Resources:
141141

142142
EfsSecurityGroupInboundRule:
143143
Type: 'AWS::EC2::SecurityGroupIngress'
144+
Condition: CreateSecurityGroup
144145
Properties:
145146
IpProtocol: tcp
146147
Description: Allow incoming traffic to EFS from members of security group
147148
FromPort: 2049
148149
ToPort: 2049
149-
GroupId: !If
150-
- CreateSecurityGroup
151-
- !Ref EfsSecurityGroup
152-
- !GetAtt SecurityGroupLookup.GroupId
150+
GroupId: !Ref EfsSecurityGroup
153151
SourceSecurityGroupId: !Ref EfsClientSecurityGroup
154152

155153
EfsClientSecurityGroupOutboundRule:
@@ -203,6 +201,7 @@ Resources:
203201
Condition: UseExistingSecurityGroup
204202
Properties:
205203
ServiceToken: !GetAtt SecurityGroupLookupFunction.Arn
204+
ServiceTimeout: 60
206205
VpcId: !Ref VpcId
207206
GroupName: !Ref SecurityGroupName
208207

@@ -232,6 +231,7 @@ Resources:
232231
Type: AWS::Lambda::Function
233232
Condition: UseExistingSecurityGroup
234233
Properties:
234+
Timeout: 60
235235
Runtime: python3.9
236236
Handler: index.handler
237237
Role: !GetAtt SecurityGroupLookupRole.Arn

recipes/storage/fsx_lustre/assets/scratch.yaml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ Conditions:
6161
Resources:
6262

6363
LustreServersSG:
64-
Type: AWS::EC2::SecurityGroup
65-
Condition: CreateSecurityGroup
66-
Properties:
67-
GroupDescription: 'Allows traffic to FSx for Lustre filesystem'
68-
GroupName: !Sub '${AWS::StackName}-fsxl-security-group'
69-
VpcId: !Ref VpcId
64+
Type: AWS::EC2::SecurityGroup
65+
Condition: CreateSecurityGroup
66+
Properties:
67+
GroupDescription: 'Allows traffic to FSx for Lustre filesystem'
68+
GroupName: !Sub '${AWS::StackName}-fsxl-security-group'
69+
VpcId: !Ref VpcId
7070

7171
LustreClientsSG:
7272
Type: AWS::EC2::SecurityGroup
@@ -87,16 +87,14 @@ Resources:
8787

8888
LustreClientsSGxxFROMxxLustreServersSG988:
8989
Type: AWS::EC2::SecurityGroupIngress
90+
Condition: CreateSecurityGroup
9091
Properties:
9192
IpProtocol: tcp
9293
Description: Allows Lustre traffic on port 988 between Amazon FSx for Lustre file servers and Lustre clients
9394
FromPort: 988
9495
ToPort: 988
9596
GroupId: !Ref LustreClientsSG
96-
SourceSecurityGroupId: !If
97-
- CreateSecurityGroup
98-
- !Ref LustreServersSG
99-
- !GetAtt SecurityGroupLookup.GroupId
97+
SourceSecurityGroupId: !Ref LustreServersSG
10098

10199
LustreClientsSGfromLustreClients1021:
102100
Type: AWS::EC2::SecurityGroupIngress
@@ -110,16 +108,14 @@ Resources:
110108

111109
LustreClientsSGxxFROMxxLustreServersSG1021:
112110
Type: AWS::EC2::SecurityGroupIngress
111+
Condition: CreateSecurityGroup
113112
Properties:
114113
IpProtocol: tcp
115114
Description: Allows Lustre traffic on ports 1021-23 between Amazon FSx for Lustre file servers and Lustre clients
116115
FromPort: 1021
117116
ToPort: 1023
118117
GroupId: !Ref LustreClientsSG
119-
SourceSecurityGroupId: !If
120-
- CreateSecurityGroup
121-
- !Ref LustreServersSG
122-
- !GetAtt SecurityGroupLookup.GroupId
118+
SourceSecurityGroupId: !Ref LustreServersSG
123119

124120
LustreClientsSGtoLustreClients988:
125121
Type: AWS::EC2::SecurityGroupEgress
@@ -133,19 +129,18 @@ Resources:
133129

134130
LustreClientsSGtopclusterLustreServersSG:
135131
Type: AWS::EC2::SecurityGroupEgress
132+
Condition: CreateSecurityGroup
136133
Properties:
137134
IpProtocol: tcp
138135
Description: Allow Lustre traffic on port 988 between Amazon FSx for Lustre file servers and Lustre clients
139136
FromPort: 988
140137
ToPort: 988
141138
GroupId: !Ref LustreClientsSG
142-
DestinationSecurityGroupId: !If
143-
- CreateSecurityGroup
144-
- !Ref LustreServersSG
145-
- !GetAtt SecurityGroupLookup.GroupId
139+
DestinationSecurityGroupId: !Ref LustreServersSG
146140

147141
LustreClientsSGtoLustreClients1021:
148142
Type: AWS::EC2::SecurityGroupEgress
143+
Condition: CreateSecurityGroup
149144
Properties:
150145
IpProtocol: tcp
151146
Description: Allows Lustre traffic on ports 1021-23 between Amazon FSx for Lustre clients
@@ -156,16 +151,14 @@ Resources:
156151

157152
LustreClientsSGtoLustreServersSG:
158153
Type: AWS::EC2::SecurityGroupEgress
154+
Condition: CreateSecurityGroup
159155
Properties:
160156
IpProtocol: tcp
161157
Description: Allows Lustre traffic on ports 1021-23 between Amazon FSx for Lustre file servers and Lustre clients
162158
FromPort: 1021
163159
ToPort: 1023
164160
GroupId: !Ref LustreClientsSG
165-
DestinationSecurityGroupId: !If
166-
- CreateSecurityGroup
167-
- !Ref LustreServersSG
168-
- !GetAtt SecurityGroupLookup.GroupId
161+
DestinationSecurityGroupId: !Ref LustreServersSG
169162

170163
FSxLFilesystem:
171164
Type: AWS::FSx::FileSystem
@@ -196,6 +189,7 @@ Resources:
196189
Condition: UseExistingSecurityGroup
197190
Properties:
198191
ServiceToken: !GetAtt SecurityGroupLookupFunction.Arn
192+
ServiceTimeout: 60
199193
VpcId: !Ref VpcId
200194
GroupName: !Ref SecurityGroupName
201195

@@ -225,6 +219,7 @@ Resources:
225219
Type: AWS::Lambda::Function
226220
Condition: UseExistingSecurityGroup
227221
Properties:
222+
Timeout: 60
228223
Runtime: python3.9
229224
Handler: index.handler
230225
Role: !GetAtt SecurityGroupLookupRole.Arn

recipes/storage/fsx_ontap/assets/main.yaml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Metadata:
1515
Parameters:
1616
- VpcId
1717
- SubnetId
18-
- ClientIpCidr
1918
- SecurityGroupName
19+
- ClientIpCidr
2020
- KmsKeyId
2121
- Label:
2222
default: File System Options
@@ -48,16 +48,16 @@ Parameters:
4848
SubnetId:
4949
Type: AWS::EC2::Subnet::Id
5050
Description: Subnet ID where the file system will be created (must be in same VPC).
51-
ClientIpCidr:
52-
Description: CIDR block controlling incoming NFS and/or SMB traffic to FSx file system.
53-
Default: ""
54-
Type: String
55-
AllowedPattern: ^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2}))?$
56-
ConstraintDescription: ClientIP must be a valid IP or network range of the form x.x.x.x/x. specify your IP/NETMASK (e.g x.x.x/32 or x.x.x.x/24 for subnet range)
5751
SecurityGroupName:
5852
Type: String
5953
Description: (Optional) An existing security group to associate to the file system (must be in same VPC). If none is provided, a new security group will be created.
6054
Default: ""
55+
ClientIpCidr:
56+
Type: String
57+
Description: (Optional) If no existing security group is provided, then provide a CIDR block controlling incoming NFS and/or SMB traffic to FSx file system.
58+
Default: ""
59+
AllowedPattern: ^$|^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2}))?$
60+
ConstraintDescription: ClientIP must be a valid IP or network range of the form x.x.x.x/x. specify your IP/NETMASK (e.g x.x.x/32 or x.x.x.x/24 for subnet range)
6161
KmsKeyId:
6262
Type: String
6363
Description: (Optional) An existing ID of the AWS Key Management Service (AWS KMS) key used to encrypt Amazon FSx file system data. If none is provided, the default aws/fsx encryption key will be used.
@@ -84,9 +84,9 @@ Parameters:
8484
OntapHAPairs:
8585
Type: Number
8686
Description: Number of high-availability (HA) pairs of file servers will power your file system. Default is set to 1 HA pair.
87-
ConstraintDescription: "Minimum: 1 HA pair"
8887
Default: 1
8988
MinValue: 1
89+
ConstraintDescription: "Minimum: 1 HA pair"
9090
OntapDiskIopsMode:
9191
Type: String
9292
Description: Specifies whether the file system is using the AUTOMATIC setting of SSD IOPS of 3 IOPS per GB of storage capacity, or if it is using a USER_PROVISIONED value. Default is set to AUTOMATIC.
@@ -97,15 +97,15 @@ Parameters:
9797
OntapDiskIops:
9898
Type: Number
9999
Description: Total number of SSD IOPS provisioned for the file system if using USER_PROVISIONED for file system's disk IOPS. Default is set to 3,072 SSD IOPS.
100-
ConstraintDescription: "Minimum: 3,072 SSD IOPS"
101100
Default: 3072
102101
MinValue: 3072
102+
ConstraintDescription: "Minimum: 3,072 SSD IOPS"
103103
OntapThroughputCapacity:
104104
Type: Number
105105
Description: Throughput capacity for the file system (MBps). Default is set to 384 MBps.
106-
ConstraintDescription: "Minimum: 384 MBps"
107106
Default: 384
108107
MinValue: 384
108+
ConstraintDescription: "Minimum: 384 MBps"
109109
OntapSecurityStyle:
110110
Type: String
111111
Description: Security style of the file system's volumes. Default is set to UNIX.
@@ -117,9 +117,9 @@ Parameters:
117117
OntapVolumeJunctionPath:
118118
Type: String
119119
Description: The location in the storage virtual machine's namespace where the non-root volume is mounted. Default is set to /vol1.
120-
ConstraintDescription: "Must start with /"
121120
Default: "/vol1"
122121
AllowedPattern: "^/[a-zA-Z0-9-_/]+$"
122+
ConstraintDescription: "Must start with /"
123123
EnableActiveDirectory:
124124
Type: String
125125
Description: Enable file system to join an Active Directory. Required for Windows SMB clients to mount file system. Default is set to false.
@@ -138,9 +138,9 @@ Parameters:
138138
ServiceAccountCredentialsSecretArn:
139139
Type: String
140140
Description: Directory Service Root (Service Account) Credentials Secret ARN. The username and password for the Active Directory ServiceAccount user formatted as a username:password key/value pair.
141-
ConstraintDescription: "Secret name can be 512 characters long and may include letters, numbers, and the following characters: /_+=.@-."
142-
AllowedPattern: ^$|^(?:arn:(?:aws|aws-us-gov|aws-cn):secretsmanager:[a-z0-9-]+:[0-9]{12}:secret:[A-Za-z0-9\-\_\+\=\/\.\@]{1,519})?$
143141
Default: ""
142+
AllowedPattern: ^$|^(?:arn:(?:aws|aws-us-gov|aws-cn):secretsmanager:[a-z0-9-]+:[0-9]{12}:secret:[A-Za-z0-9\-\_\+\=\/\.\@]{1,519})?$
143+
ConstraintDescription: "Secret name can be 512 characters long and may include letters, numbers, and the following characters: /_+=.@-."
144144
ComputersOU:
145145
Type: String
146146
Description: Organization Unit (OU) for compute and storage servers in the Active Directory.
@@ -170,6 +170,11 @@ Conditions:
170170
- !Condition CreateCIFSShare
171171

172172
Rules:
173+
RequireSecurityGroupRule:
174+
RuleCondition: !Equals [!Ref SecurityGroupName, ""]
175+
Assertions:
176+
- Assert: !Not [!Equals [!Ref ClientIpCidr, ""]]
177+
AssertDescription: If a SecurityGroupName is not provided, a valid ClientIpCidr must be provided.
173178
ActiveDirectoryParametersRule:
174179
RuleCondition: !Equals [!Ref EnableActiveDirectory, "true"]
175180
Assertions:

0 commit comments

Comments
 (0)