-
Notifications
You must be signed in to change notification settings - Fork 33
/
00-master-ohdsi-china.yaml
736 lines (706 loc) · 27.3 KB
/
00-master-ohdsi-china.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
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# 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 OHDSI China 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
- WebPort
- UseRoute53Boolean
- UseACMBoolean
- HostedZoneId
- HostedZoneName
- DomainName
- Label:
default: Database Tier
Parameters:
- DatabaseType
- DatabaseInstanceType
- RedshiftInstanceType
- NumRedshiftNodes
- DatabaseMasterPassword
- Label:
default: OMOP Sources
Parameters:
- Sources
- SourcesBucket
- Label:
default: RStudio
Parameters:
- RStudioInstanceType
- RStudioHomeDirectorySize
- RStudioUserList
- Label:
default: Atlas
Parameters:
- WebInstanceType
- WebAsgMin
- WebAsgMax
- ExampleStudies
- AtlasSecurity
- Label:
default: OHDSI Project Versions
Parameters:
- OMOPv
- Atlasv
- WebAPIv
- Achillesv
- PatientLevelPredictionv
- CohortMethodv
- SqlRenderv
- DatabaseConnectorv
- DatabaseConnectorJarsv
- OhdsiRToolsv
- FeatureExtractionv
- Cyclopsv
- EmpiricalCalibrationv
- OhdsiSharingv
- MethodEvaluationv
- Hydrav
- PredictionComparisonv
- Eunomiav
- 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
WebPort:
default: Web server port number
UseRoute53Boolean:
default: Use Route 53?
UseACMBoolean:
default: Apply SSL Certificate?
HostedZoneId:
default: Route53 Hosted Zone ID
HostedZoneName:
default: Route53 Hosted Zone Domain Name
DomainName:
default: Route53 Site Domain
DatabaseType:
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. The first source in the list will have its Vocabulary and Results schema priorty set to 1 for WebAPI.
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: Atlas/WebAPI Instance Type
ExampleStudies:
default: Include Example Studies in Atlas?
AtlasSecurity:
default: Enable Authentication For Atlas?
RStudioInstanceType:
default: Instance Type for RStudio
RStudioHomeDirectorySize:
default: Home Directory size for RStudio instance
RStudioUserList:
default: Comma-delimited user list for RStudio
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
DatabaseConnectorJarsv:
default: DatabaseConnectorJars Version
OhdsiRToolsv:
default: OhdsiRTools Version
FeatureExtractionv:
default: FeatureExtraction Version
Cyclopsv:
default: Cyclops Version
EmpiricalCalibrationv:
default: EmpiricalCalibration Version
OhdsiSharingv:
default: OhdsiSharing Version
MethodEvaluationv:
default: MethodEvaluation Version
Hydrav:
default: Hydra Version
PredictionComparisonv:
default: PredictionComparison Version
Eunomiav:
default: Eunomia 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 OHDSI 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
WebPort:
Description: 'By default, China blocks inbound access to common ports like 80, 8080, and 443. If you need to use these ports, there is an exception process.'
Type: Number
MaxValue: 65535
MinValue: 1
Default: 3389
UseRoute53Boolean:
AllowedValues:
# - true
- false
Default: false
Description: Specifies whether a record set should be created in Route 53 for your OHDSI domain name. If not, you will recieve a default Elastic Beanstalk DNS name (e.g. ohdsi.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 needed 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 needed 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 needed if using Route53 ] The sub-domain name of your OHDSI implementation. This sub-domain will be prepended your specified Hosted Zone (e.g. ohdsi in ohdsi.example.edu).'
Type: String
DatabaseType:
AllowedValues:
- "Highly Available"
- "Single Instance"
# - "Serverless"
Default: "Single Instance"
Description: Specifies whether to deploy the AWS Aurora PostgreSQL WebAPI database in a Multi-AZ configuration.
Type: String
DatabaseInstanceType:
AllowedValues:
# - db.t3.medium
- 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: dc2.large
NumRedshiftNodes:
ConstraintDescription: Must be a number between 1 and 32.
Default: 1
MaxValue: 32
MinValue: 1
Description: "[ Required ] Specifies the number of nodes in your Redshift cluster."
Type: Number
DatabaseMasterPassword:
AllowedPattern: ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.{8,41}$)[a-zA-Z\d~#%^*_+,-]*$
ConstraintDescription: Must have a length of 8-41 and be letters (upper and lower), numbers, and/or these special characters ~#%^*_+,-
Description: '[ Required ] This password will be used for the master user of the Aurora PostgreSQL WebAPI database and the Redshift OMOP CDM data warehouse. It must have a length of 8-41 and have at least 1 uppercase, 1 lowercase, 1 number, and optionally include these special characters ~#%^*_+,-.'
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: CMSDESynPUF23mchina,CMSDESynPUF100kchina,CMSDESynPUF1kchina,synthea23mchina,synthea100kchina,synthea1kchina
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:
- m5.large
- m5.xlarge
- m5.2xlarge
- c5.large
- c5.xlarge
- c5.2xlarge
- r5.large
- r5.xlarge
ConstraintDescription: Must be a valid Amazon EC2 instance type.
Default: m5.large
Description: The Amazon EC2 instance type for your web instances.
Type: String
WebAsgMax:
MaxValue: 30
MinValue: 1
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: Number
WebAsgMin:
ConstraintDescription: Must be a number between 0 and 10.
MaxValue: 10
MinValue: 1
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: Number
ExampleStudies:
Type: String
Description: "Include example studies in Atlas?"
AllowedValues:
- "true"
- "false"
Default: true
AtlasSecurity:
Type: String
Description: "Use the RStudio usernames and passwords to authenticate access to Atlas?"
AllowedValues:
- "true"
- "false"
Default: true
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: t3.xlarge
RStudioHomeDirectorySize:
Description: '[ Required ] The amount of encrypted disk space, in GBs, allocated to store RStudio users local data.'
Type: Number
Default: 50
MaxValue: 16000
MinValue: 20
RStudioUserList:
Description: '[ Required ] 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
ConstraintDescription: "Usernames can contain letters and numbers. Passwords can contain letters, numbers and these characters #&*."
AllowedPattern: ([A-Za-z\d]+,)+([A-Za-z\d#&*.,]+)
OMOPv:
Description: The OHDSI CommonDataModel GitHub branch you want deployed (this specifies the version)
Type: String
Default: '5.3.0'
Atlasv:
Description: The OHDSI Atlas GitHub branch you want deployed (this specifies the version)
Type: String
Default: '2.7.5'
WebAPIv:
Description: OHDSI WebAPI GitHub branch you want deployed (this specifies the version)
Type: String
Default: '2.7.5'
Achillesv:
Description: OHDSI Achilles GitHub branch you want deployed (this specifies the version)
Type: String
Default: '1.6.3'
PatientLevelPredictionv:
Description: OHDSI PatientLevelPrediction GitHub branch you want deployed (this specifies the version)
Type: String
Default: '3.0.6'
CohortMethodv:
Description: OHDSI CohortMethod GitHub branch you want deployed (this specifies the version)
Type: String
Default: '3.1.0'
SqlRenderv:
Description: OHDSI SqlRender GitHub branch you want deployed (this specifies the version)
Type: String
Default: '1.6.2'
DatabaseConnectorv:
Description: OHDSI DatabaseConnector GitHub branch you want deployed (this specifies the version)
Type: String
Default: '2.4.1'
DatabaseConnectorJarsv:
Description: OHDSI DatabaseConnectorJars GitHub branch you want deployed (this specifies the version)
Type: String
Default: '1.0.0'
OhdsiRToolsv:
Description: OhdsiRTools GitHub branch you want deployed (this specifies the version)
Type: String
Default: '1.7.0'
FeatureExtractionv:
Description: OHDSI FeatureExtraction GitHub branch you want deployed (this specifies the version)
Type: String
Default: '2.2.5'
Cyclopsv:
Description: OHDSI Cyclops GitHub branch you want deployed (this specifies the version)
Type: String
Default: '2.0.2'
EmpiricalCalibrationv:
Description: OHDSI EmpiricalCalibration GitHub branch you want deployed (this specifies the version)
Type: String
Default: '2.0.0'
OhdsiSharingv:
Description: OHDSI OhdsiSharing GitHub branch you want deployed (this specifies the version)
Type: String
Default: '0.1.3'
MethodEvaluationv:
Description: OHDSI MethodEvaluation GitHub branch you want deployed (this specifies the version)
Type: String
Default: '1.1.0'
Hydrav:
Description: OHDSI Hydra GitHub branch you want deployed (this specifies the version)
Type: String
Default: '0.0.5'
PredictionComparisonv:
Description: OHDSI Hydra GitHub branch you want deployed (this specifies the version)
Type: String
Default: '1.0.0'
Eunomiav:
Description: OHDSI Eunomia GitHub branch you want deployed (this specifies the version)
Type: String
Default: '1.0.0'
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 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 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://ohdsi-sample-data.s3.cn-northwest-1.amazonaws.com.cn/01-vpc-ohdsi-china.yaml
Parameters:
AccessCidr: !Ref 'AccessCidr'
UseACMBoolean: !Ref 'UseACMBoolean'
UseRoute53Boolean: !Ref 'UseRoute53Boolean'
SourcesBucket: !Ref SourcesBucket
WebPort: !Ref WebPort
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 [',', [!Join ['', ['rstudio.', !Ref DomainName, '.', !Ref HostedZoneName]], !Join ['', ['jupyter.', !Ref DomainName, '.', !Ref HostedZoneName]]]]
TemplateURL: https://ohdsi-sample-data.s3.cn-northwest-1.amazonaws.com.cn/01-certificate-ohdsi-china.yaml
DatabasesStack:
Type: AWS::CloudFormation::Stack
DependsOn: VPCStack
Properties:
TemplateURL: https://ohdsi-sample-data.s3.cn-northwest-1.amazonaws.com.cn/02-databases-ohdsi-china.yaml
Parameters:
DatabaseMasterPassword:
!Ref DatabaseMasterPassword
DatabaseInstanceType:
!Ref DatabaseInstanceType
RedshiftInstanceType:
!Ref 'RedshiftInstanceType'
NumRedshiftNodes:
!Ref 'NumRedshiftNodes'
DatabaseType:
!Ref DatabaseType
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://ohdsi-sample-data.s3.cn-northwest-1.amazonaws.com.cn/02-rstudio-ohdsi-china.yaml
Parameters:
RStudioInstanceProfile: !GetAtt 'VPCStack.Outputs.RStudioInstanceProfile'
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
Hydrav: !Ref 'Hydrav'
PatientLevelPredictionv: !Ref 'PatientLevelPredictionv'
CohortMethodv: !Ref 'CohortMethodv'
SqlRenderv: !Ref 'SqlRenderv'
DatabaseConnectorv: !Ref 'DatabaseConnectorv'
DatabaseConnectorJarsv: !Ref 'DatabaseConnectorJarsv'
OhdsiRToolsv: !Ref 'OhdsiRToolsv'
FeatureExtractionv: !Ref 'FeatureExtractionv'
Cyclopsv: !Ref 'Cyclopsv'
EmpiricalCalibrationv: !Ref 'EmpiricalCalibrationv'
OhdsiSharingv: !Ref 'OhdsiSharingv'
MethodEvaluationv: !Ref 'MethodEvaluationv'
Achillesv: !Ref 'Achillesv'
PredictionComparisonv: !Ref 'PredictionComparisonv'
Eunomiav: !Ref 'Eunomiav'
RDSEndpoint: !GetAtt 'DatabasesStack.Outputs.RDSEndpoint'
RedshiftEndpoint: !GetAtt 'DatabasesStack.Outputs.RedshiftEndpoint'
Sources: !Ref Sources
DatabaseMasterPassword: !Ref DatabaseMasterPassword
EBEndpoint: !Ref EBEndpoint
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 ], '' ]
WebPort:
!Ref WebPort
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'
DatabaseConnectorJarsv:
!Ref 'DatabaseConnectorJarsv'
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'
JupyterTargetGroupArn:
!GetAtt 'RStudioStack.Outputs.JupyterTargetGroupArn'
RDSEndpoint:
!GetAtt 'DatabasesStack.Outputs.RDSEndpoint'
RedshiftEndpoint:
!GetAtt 'DatabasesStack.Outputs.RedshiftEndpoint'
RSRoleArn:
!GetAtt 'VPCStack.Outputs.RSRoleArn'
PrivateDeployment: 'false'
AtlasSecurity: !Ref AtlasSecurity
ExampleStudies: !Ref ExampleStudies
UserList: !Ref 'RStudioUserList'
TemplateURL: https://ohdsi-sample-data.s3.cn-northwest-1.amazonaws.com.cn/03-application-ohdsi-china.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://ohdsi-sample-data.s3.cn-northwest-1.amazonaws.com.cn/03-route53-ohdsi-china.yaml
Outputs:
AtlasURL:
Value: !If [DeployRoute53, !If [DeployACM, !Join ['', ['https://', !Ref DomainName, '.', !Ref HostedZoneName, ':', !Ref WebPort, '/']], !Join ['', ['http://', !Ref DomainName, '.', !Ref HostedZoneName, ':', !Ref WebPort, '/']]], !Join ['', ['http://', !Ref EBEndpoint, '.', !Ref 'AWS::Region', '.eb.amazonaws.com.cn', ':', !Ref WebPort ]]]
RStudioURL:
Value: !If [DeployRoute53, !If [DeployACM, !Join ['', ['https://', 'rstudio.', !Ref DomainName, '.', !Ref HostedZoneName, ':', !Ref WebPort, '/']], !Join ['', ['http://', 'rstudio.', !Ref DomainName, '.', !Ref HostedZoneName, ':', !Ref WebPort, '/']]], !Join ['', ['http://', 'rstudio.', !Ref EBEndpoint, '.', !Ref 'AWS::Region', '.eb.amazonaws.com.cn', ':', !Ref WebPort ]]]
JupyterURL:
Value: !If [DeployRoute53, !If [DeployACM, !Join ['', ['https://', 'jupyter.', !Ref DomainName, '.', !Ref HostedZoneName, ':', !Ref WebPort, '/']], !Join ['', ['http://', 'jupyter.', !Ref DomainName, '.', !Ref HostedZoneName, ':', !Ref WebPort, '/']]], !Join ['', ['http://', 'jupyter.', !Ref EBEndpoint, '.', !Ref 'AWS::Region', '.eb.amazonaws.com.cn', ':', !Ref WebPort ]]]
DeploymentLog:
Value: !Join ['', ['https://cn-northwest-1.console.amazonaws.cn/cloudwatch/home?region=', !Ref 'AWS::Region', '#logEventViewer:group=ohdsi-temporary-ec2-instance-build-log;stream=', !Ref EBEndpoint, '-build-log']]