-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path00-master-ohdsi.yaml
669 lines (638 loc) · 23.7 KB
/
00-master-ohdsi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License.
# A copy of the License is located at
# http://aws.amazon.com/apache2.0/
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific language governing permissions and limitations under the License.
AWSTemplateFormatVersion: 2010-09-09
Description: Stack to deploy a highly available, elastic, scalable REDCap environment. This master stack launches multiple nested stacks for different tiers.
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: General AWS
Parameters:
- EC2KeyName
- AccessCidr
- Label:
default: DNS and SSL
Parameters:
- EBEndpoint
- UseRoute53Boolean
- UseACMBoolean
- HostedZoneId
- HostedZoneName
- DomainName
- Label:
default: Database Tier
Parameters:
- MultiAZDatabase
- DatabaseInstanceType
- RedshiftInstanceType
- NumRedshiftNodes
- DatabaseMasterPassword
- Sources
- SourcesBucket
- Label:
default: Web Tier
Parameters:
- WebInstanceType
- WebAsgMin
- WebAsgMax
- Label:
default: RStudio
Parameters:
- RStudioInstanceType
- RStudioHomeDirectorySize
- RStudioUserList
- SageMakerBucket
- Label:
default: OHDSI Component Versions
Parameters:
- OMOPv
- Atlasv
- WebAPIv
- Achillesv
- PatientLevelPredictionv
- CohortMethodv
- SqlRenderv
- DatabaseConnectorv
- OhdsiRToolsv
- FeatureExtractionv
- Cyclopsv
- EmpiricalCalibrationv
- OhdsiSharingv
- Label:
default: VPC Networking (changing this is optional)
Parameters:
- VPCcidr
- p1cidr
- p2cidr
- a1cidr
- a2cidr
- d1cidr
- d2cidr
ParameterLabels:
EC2KeyName:
default: EC2 Key Pair
AccessCidr:
default: Limit access to IP address range?
EBEndpoint:
default: Elastic Beanstalk Endpoint Name
UseRoute53Boolean:
default: Use Route 53?
UseACMBoolean:
default: Use AWS Certificate Manager?
HostedZoneId:
default: Route53 Hosted Zone ID
HostedZoneName:
default: Hosted Zone
DomainName:
default: Site Domain
MultiAZDatabase:
default: Use Primary and Standby Database Instances?
DatabaseInstanceType:
default: DB Instance Class
RedshiftInstanceType:
default: Instance Type for Redshift cluster nodes
NumRedshiftNodes:
default: Number of nodes in your Redshift cluster
DatabaseMasterPassword:
default: 'Aurora Postgres and Redshift master password'
Sources:
default: Comma-delimited list of OMOP CDM schema sources to load into the Redshift datawarehouse
SourcesBucket:
default: S3 Bucket that contains DDL SQL files name after each 'Source'.sql that will be executed to load data into the OMOP CDM schema sources.
WebAsgMin:
default: Minimum Atlas/WebAPI Instances
WebAsgMax:
default: Maximum Atlas/WebAPI Instances
WebInstanceType:
default: Web Tier Instance Type
RStudioInstanceType:
default: Instance Type to use for RStudio
RStudioHomeDirectorySize:
default: Home Directory size for RStudio instance
RStudioUserList:
default: Comma-delimited user list for RStudio
SageMakerBucket:
default: Bucket used to store PatientLevelPrediction ML models trained by Amazon SageMaker
Atlasv:
default: Atlas Version
WebAPIv:
default: WebAPI Version
OMOPv:
default: OMOP Common Data Model Version
Achillesv:
default: Achilles Version
PatientLevelPredictionv:
default: PatientLevelPrediction Version
CohortMethodv:
default: CohortMethod Version
SqlRenderv:
default: SqlRender Version
DatabaseConnectorv:
default: DatabaseConnector Version
OhdsiRToolsv:
default: OhdsiRTools Version
FeatureExtractionv:
default: FeatureExtraction Version
Cyclopsv:
default: Cyclops Version
EmpiricalCalibrationv:
default: EmpiricalCalibration Version
OhdsiSharingv:
default: OhdsiSharing Version
VPCcidr:
default: VPC CIDR Range
p1cidr:
default: Public Subnet A CIDR Range
p2cidr:
default: Public Subnet B CIDR Range
a1cidr:
default: Application Subnet A CIDR Range
a2cidr:
default: Application Subnet B CIDR Range
d1cidr:
default: Database Subnet A CIDR Range
d2cidr:
default: Database Subnet B CIDR Range
Parameters:
EC2KeyName:
ConstraintDescription: Must be letters (upper or lower), numbers, and special characters.
Description: '[ REQUIRED ] Name of an EC2 KeyPair. Your bastion & Web instances will launch with this KeyPair. To create a KeyPair, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#having-ec2-create-your-key-pair'
Type: AWS::EC2::KeyPair::KeyName
AccessCidr:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Description: 'The CIDR IP range that is permitted to access your REDCap servers. Note: A value of 0.0.0.0/0 will allow access from ANY IP address.'
Type: String
Default: 0.0.0.0/0
EBEndpoint:
AllowedPattern: ^([a-zA-Z0-9-])*$
Description: '[ REQUIRED ] The unique name to use for your Elastic Beanstalk URL (will be rendered http://(EBEndpoint).(region).elasticbeanstalk.com). You can use the "nslookup" to see if an endpoint is in use.'
ConstraintDescription: 'This name must be between 4 and 40 characters and contain only letters, numbers, and/or a hyphen'
MaxLength: 40
MinLength: 4
Type: String
UseRoute53Boolean:
AllowedValues:
- true
- false
Default: false
Description: Specifies whether a record set should be created in Route 53 for your REDCap domain name. If not, you will recieve a default Elastic Beanstalk DNS name (e.g. redcap.us-east-1.elasticbeanstalk.com).
Type: String
UseACMBoolean:
AllowedValues:
- true
- false
Default: false
Description: '[ Requires Route53 ] Specifies whether an SSL certificate should be generated for your domain name using AWS Certificate Manager (ACM). If one is not generated, HTTP will be used and an SSL certificate can be applied after deployment.'
Type: String
HostedZoneId:
Description: '[ Optional, only if using Route53 ] The Route 53 hosted zone ID to create the domain in (e.g. Z2FDTNDATAQYW2).'
Type: String
HostedZoneName:
AllowedPattern: ^$|(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
Description: '[ Optional, only if using Route53 ] The Route 53 hosted zone name to create the domain in (e.g. example.edu).'
Type: String
DomainName:
AllowedPattern: ^([a-zA-Z0-9-])*$
Description: '[ Optional, only if using Route53 ] The sub-domain name of the REDCap website. This sub-domain will be prepended your specified Hosted Zone (e.g. redcap in redcap.example.edu).'
Type: String
MultiAZDatabase:
AllowedValues:
- true
- false
Default: false
Description: Specifies whether to deploy the AWS Aurora MySQL Database in a Multi-AZ configuration.
Type: String
DatabaseInstanceType:
AllowedValues:
- db.r4.large
- db.r4.xlarge
- db.r4.2xlarge
- db.r4.4xlarge
- db.r4.8xlarge
- db.r4.16xlarge
ConstraintDescription: Must be a valid RDS instance class.
Default: db.r4.large
Description: The Amazon RDS database instance class (determines processing power and memory capacity of the database).
Type: String
RedshiftInstanceType:
Type: String
Description: DC instance types provide faster, but smaller storage. DS instance types provide larger, but slower storage.
AllowedValues:
- dc2.large
- dc2.8xlarge
- ds2.xlarge
- ds2.8xlarge
- dc1.large
Default: dc1.large
NumRedshiftNodes:
AllowedPattern: ^((?!0$)[1-2]?[0-9]|32)$
ConstraintDescription: Must be a number between 1 and 32.
Default: 1
Description: "[ Required ] Specifies the number of nodes in your Redshift cluster."
Type: String
DatabaseMasterPassword:
AllowedPattern: ^([a-zA-Z0-9~#%^*_+,-])*$
ConstraintDescription: Must have a length of 8-41 and be letters (upper or lower), numbers, and/or these special characters ~#%^*_+,-
Description: '[ Required ] The Amazon RDS master password'
MaxLength: 41
MinLength: 8
NoEcho: true
Type: String
Sources:
Description: Comma-delimited list of OMOP CDM schema sources to load into the Redshift datawarehouse
Type: String
AllowedPattern: ^([a-zA-Z0-9,])*$
Default: CMSDESynPUF1k,CMSDESynPUF23m
SourcesBucket:
Description: S3 Bucket that contains DDL SQL files name after each 'Source'.sql that will be executed to load data into the OMOP CDM schema sources.
Type: String
AllowedPattern: ^([a-zA-Z0-9`~#$%^&*()_+,\\-])*$
Default: ohdsi-sample-data
WebInstanceType:
AllowedValues:
- t2.micro
- t2.small
- t2.medium
- t2.large
- t2.xlarge
- t2.2xlarge
- t3.micro
- t3.small
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge
- m4.large
- m4.xlarge
- m4.2xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- c4.large
- c4.xlarge
- c4.2xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- r4.large
- r4.xlarge
- r5.large
- r5.xlarge
ConstraintDescription: Must be a valid Amazon EC2 instance type.
Default: t2.micro
Description: The Amazon EC2 instance type for your web instances.
Type: String
WebAsgMax:
AllowedPattern: ^((?!0$)[1-2]?[0-9]|30)$
ConstraintDescription: Must be a number between 1 and 30.
Default: 2
Description: Specifies the maximum number of EC2 instances in the Web Autoscaling Group. Must be greater than or equal to the Minimum Atlas/WebAPI Instances.
Type: String
WebAsgMin:
AllowedPattern: ^([0-0]?[0-9]|10)$
ConstraintDescription: Must be a number between 0 and 10.
Default: 2
Description: Specifies the minimum number of EC2 instances in the Web Autoscaling Group. A value of >1 will create a highly available environment by placing instances in multiple availability zones.
Type: String
RStudioInstanceType:
Type: String
Description: Choose an instance with about 0.75GB of memory per concurrent user.
AllowedValues:
- t2.medium
- t2.large
- t2.xlarge
- t2.2xlarge
- t3.medium
- t3.large
- t3.xlarge
- t3.2xlarge
- m4.large
- m4.xlarge
- m4.2xlarge
- m4.4xlarge
- m4.10xlarge
- m4.16xlarge
- m5.large
- m5.xlarge
- m5.2xlarge
- m5.4xlarge
- m5.12xlarge
- m5.24xlarge
- c4.large
- c4.xlarge
- c4.2xlarge
- c4.4xlarge
- c4.8xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- c5.4xlarge
- c5.9xlarge
- c5.18xlarge
- r4.large
- r4.xlarge
- r4.2xlarge
- r4.4xlarge
- r4.8xlarge
- r4.16xlarge
- r5.large
- r5.xlarge
- r5.2xlarge
- r5.4xlarge
- r5.8xlarge
- r5.16xlarge
- g2.2xlarge
- g2.8xlarge
- p2.xlarge
- p2.8xlarge
- p2.16xlarge
- g3.4xlarge
- g3.8xlarge
- g3.16xlarge
ConstraintDescription: Valid instance type in the t2, m5, c5, r4, g2, p2, and g3 families
Default: t2.xlarge
RStudioHomeDirectorySize:
Description: The amount of encrypted disk space, in GBs, allocated to store RStudio user's local data.
Type: Number
Default: 20
RStudioUserList:
Description: Provide a comma separated list of usernames and passwords (user1,pass1,user2,pass2) to create on the RStudio Server. The first user in the list will be given sudoers access.
Type: 'String'
NoEcho: true
SageMakerBucket:
Description: Name of the S3 bucket you want to use to hold the PatientLevelPrediction training data and model output for SageMaker. If you leave this blank a bucket will be generated for you.
Type: 'String'
AllowedPattern: ^([a-zA-Z0-9`~#$%^&*()_+,\\-])*$
OMOPv:
Description: The OHDSI CommonDataModel GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v5.3.1'
Atlasv:
Description: The OHDSI Atlas GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.6.0'
WebAPIv:
Description: OHDSI WebAPI GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.6.0'
Achillesv:
Description: OHDSI Achilles GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.6.0'
PatientLevelPredictionv:
Description: OHDSI PatientLevelPrediction GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'efficient'
CohortMethodv:
Description: OHDSI CohortMethod GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.6.2'
SqlRenderv:
Description: OHDSI SqlRender GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.5.2'
DatabaseConnectorv:
Description: OHDSI DatabaseConnector GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.2.0'
OhdsiRToolsv:
Description: OhdsiRTools GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.5.5'
FeatureExtractionv:
Description: OHDSI FeatureExtraction GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.1.5'
Cyclopsv:
Description: OHDSI Cyclops GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.0.0'
EmpiricalCalibrationv:
Description: OHDSI EmpiricalCalibration GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.3.6'
OhdsiSharingv:
Description: OHDSI EmpiricalCalibration GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v0.1.3'
VPCcidr:
Description: (optional to change) CIDR IP Range for your VPC.
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Type: String
Default: 10.1.0.0/16
p1cidr:
Description: (optional to change) CIDR IP Range for the public subnet in AZ 'a' of your VPC.
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Type: String
Default: 10.1.0.0/24
p2cidr:
Description: (optional to change) CIDR IP Range for the public subnet in AZ 'b' of your VPC.
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Type: String
Default: 10.1.1.0/24
a1cidr:
Description: (optional to change) CIDR IP Range for the application subnet in AZ 'a' of your VPC.
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Type: String
Default: 10.1.2.0/24
a2cidr:
Description: (optional to change) CIDR IP Range for the application subnet in AZ 'b' of your VPC.
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Type: String
Default: 10.1.3.0/24
d1cidr:
Description: (optional to change) CIDR IP Range for the database subnet in AZ 'b' of your REDCap VPC.
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Type: String
Default: 10.1.4.0/24
d2cidr:
Description: (optional to change) CIDR IP Range for the database subnet in AZ 'b' of your REDCap VPC.
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$
Type: String
Default: 10.1.5.0/24
Conditions:
DeployRoute53:
!Equals [ true, !Ref UseRoute53Boolean ]
DeployACM: !And
- !Equals [ true, !Ref UseACMBoolean ]
- !Condition DeployRoute53
Resources:
VPCStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/ohdsi-rstudio/01-vpc-ohdsi.yaml
Parameters:
AccessCidr: !Ref 'AccessCidr'
UseACMBoolean: !Ref 'UseACMBoolean'
UseRoute53Boolean: !Ref 'UseRoute53Boolean'
SourcesBucket: !Ref SourcesBucket
SageMakerBucket: !Ref SageMakerBucket
VPCcidr: !Ref VPCcidr
p1cidr: !Ref p1cidr
p2cidr: !Ref p2cidr
a1cidr: !Ref a1cidr
a2cidr: !Ref a2cidr
d1cidr: !Ref d1cidr
d2cidr: !Ref d2cidr
certificate:
Condition: DeployACM
Type: AWS::CloudFormation::Stack
Properties:
Parameters:
R53HostedZoneId: !Ref 'HostedZoneId'
R53DomainName: !Join ['', [!Ref DomainName, '.', !Ref HostedZoneName]]
SubjectAlternativeNames: !Join ['', ['rstudio.', !Ref DomainName, '.', !Ref HostedZoneName]]
TemplateURL: https://s3.amazonaws.com/ohdsi-rstudio/01-certificate-ohdsi.yaml
DatabasesStack:
Type: AWS::CloudFormation::Stack
DependsOn: VPCStack
Properties:
TemplateURL: https://s3.amazonaws.com/ohdsi-rstudio/02-databases-ohdsi.yaml
Parameters:
DatabaseMasterPassword:
!Ref DatabaseMasterPassword
DatabaseInstanceType:
!Ref DatabaseInstanceType
RedshiftInstanceType:
!Ref 'RedshiftInstanceType'
NumRedshiftNodes:
!Ref 'NumRedshiftNodes'
MultiAZDatabase:
!Ref MultiAZDatabase
SubnetDataA:
!GetAtt 'VPCStack.Outputs.SubnetDataA'
SubnetDataB:
!GetAtt 'VPCStack.Outputs.SubnetDataB'
SGData:
!GetAtt 'VPCStack.Outputs.SGData'
RSRoleArn:
!GetAtt 'VPCStack.Outputs.RSRoleArn'
RStudioStack:
Type: AWS::CloudFormation::Stack
DependsOn: DatabasesStack
Properties:
TemplateURL: https://s3.amazonaws.com/ohdsi-rstudio/02-rstudio-ohdsi.yaml
Parameters:
RStudioInstanceProfile: !GetAtt 'VPCStack.Outputs.RStudioInstanceProfile'
SageMakerBucket: !Ref SageMakerBucket
VPCSubnet: !GetAtt 'VPCStack.Outputs.SubnetAppA'
VPCId: !GetAtt 'VPCStack.Outputs.VPCId'
RStudioSecurityGroup: !GetAtt 'VPCStack.Outputs.SGApp'
InstanceType: !Ref 'RStudioInstanceType'
HomeDirectorySize: !Ref 'RStudioHomeDirectorySize'
UserList: !Ref 'RStudioUserList'
KeyPair: !Ref EC2KeyName
PatientLevelPredictionv: !Ref 'PatientLevelPredictionv'
CohortMethodv: !Ref 'CohortMethodv'
SqlRenderv: !Ref 'SqlRenderv'
DatabaseConnectorv: !Ref 'DatabaseConnectorv'
OhdsiRToolsv: !Ref 'OhdsiRToolsv'
FeatureExtractionv: !Ref 'FeatureExtractionv'
Cyclopsv: !Ref 'Cyclopsv'
EmpiricalCalibrationv: !Ref 'EmpiricalCalibrationv'
OhdsiSharingv: !Ref 'OhdsiSharingv'
Achillesv: !Ref 'Achillesv'
RDSEndpoint: !GetAtt 'DatabasesStack.Outputs.RDSEndpoint'
RedshiftEndpoint: !GetAtt 'DatabasesStack.Outputs.RedshiftEndpoint'
Sources: !Ref Sources
DatabaseMasterPassword: !Ref DatabaseMasterPassword
ohdsielasticbeanstalk:
DependsOn: [ RStudioStack ]
Type: AWS::CloudFormation::Stack
Properties:
Parameters:
EBBucket: !Join [ "", [ !Ref "AWS::AccountId", '-', !Select [ 1, !Split [ '-', !GetAtt 'VPCStack.Outputs.SubnetPublicA'] ], '-atlas' ] ]
DatabaseMasterPassword:
!Ref DatabaseMasterPassword
Sources:
!Ref Sources
SourcesBucket:
!Ref SourcesBucket
SslCertificate:
!If [ DeployACM, !GetAtt [ certificate, Outputs.CertificateArn ], '' ]
WebAsgMax:
!Ref WebAsgMax
WebAsgMin:
!Ref WebAsgMin
WebInstanceType:
!Ref WebInstanceType
EBEndpoint:
!Ref EBEndpoint
UseRoute53Boolean:
!Ref UseRoute53Boolean
UseACMBoolean:
!Ref UseACMBoolean
HostedZoneName:
!If [ DeployRoute53, !Ref HostedZoneName, '' ]
DomainName:
!If [ DeployRoute53, !Ref DomainName, '' ]
EC2KeyName:
!Ref EC2KeyName
OMOPv:
!Ref 'OMOPv'
Atlasv:
!Ref 'Atlasv'
WebAPIv:
!Ref 'WebAPIv'
SqlRenderv:
!Ref 'SqlRenderv'
DatabaseConnectorv:
!Ref 'DatabaseConnectorv'
Achillesv:
!Ref 'Achillesv'
OhdsiRToolsv:
!Ref 'OhdsiRToolsv'
VPCId:
!GetAtt 'VPCStack.Outputs.VPCId'
SubnetPublicA:
!GetAtt 'VPCStack.Outputs.SubnetPublicA'
SubnetPublicB:
!GetAtt 'VPCStack.Outputs.SubnetPublicB'
SubnetAppA:
!GetAtt 'VPCStack.Outputs.SubnetAppA'
SubnetAppB:
!GetAtt 'VPCStack.Outputs.SubnetAppB'
SGPublic:
!GetAtt 'VPCStack.Outputs.SGPublic'
SGApp:
!GetAtt 'VPCStack.Outputs.SGApp'
EBServiceRole:
!GetAtt 'VPCStack.Outputs.EBServiceRole'
EBInstanceProfile:
!GetAtt 'VPCStack.Outputs.EBInstanceProfile'
TempEC2InstanceProfile:
!GetAtt 'VPCStack.Outputs.TempEC2InstanceProfile'
RStudioTargetGroupArn:
!GetAtt 'RStudioStack.Outputs.RStudioTargetGroupArn'
RDSEndpoint:
!GetAtt 'DatabasesStack.Outputs.RDSEndpoint'
RedshiftEndpoint:
!GetAtt 'DatabasesStack.Outputs.RedshiftEndpoint'
RSRoleArn:
!GetAtt 'VPCStack.Outputs.RSRoleArn'
TemplateURL: https://s3.amazonaws.com/ohdsi-rstudio/03-application-ohdsi.yaml
route53:
Condition: DeployRoute53
DependsOn: ohdsielasticbeanstalk
Type: AWS::CloudFormation::Stack
Properties:
Parameters:
DnsEndpoint:
!Join ['', [!Ref EBEndpoint, '.', !Ref 'AWS::Region', '.elasticbeanstalk.com']]
HostedZoneId:
!Ref HostedZoneId
HostedZoneName:
!Ref HostedZoneName
DomainName:
!Ref DomainName
TemplateURL: https://s3.amazonaws.com/ohdsi-rstudio/03-route53-ohdsi.yaml
Outputs:
AtlasURL:
Value: !If [DeployRoute53, !If [DeployACM, !Join ['', ['https://', !Ref DomainName, '.', !Ref HostedZoneName, '/']], !Join ['', ['http://', !Ref DomainName, '.', !Ref HostedZoneName, '/']]], !Join ['', ['http://', !Ref EBEndpoint, '.', !Ref 'AWS::Region', '.elasticbeanstalk.com']]]
RStudioURL:
Value: !If [DeployRoute53, !If [DeployACM, !Join ['', ['https://', 'rstudio.', !Ref DomainName, '.', !Ref HostedZoneName, '/']], !Join ['', ['http://', 'rstudio.', !Ref DomainName, '.', !Ref HostedZoneName, '/']]], !Join ['', ['http://', 'rstudio.', !Ref EBEndpoint, '.', !Ref 'AWS::Region', '.elasticbeanstalk.com']]]