forked from OHDSI/OHDSIonAWS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
03-application-ohdsiprivate.yaml
1204 lines (1130 loc) · 55 KB
/
03-application-ohdsiprivate.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
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# 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: This CloudFormation Template deploys a complete OHDSI environment. It
depends on the OHDSI-VPC CloudFormation Template.
Parameters:
WebAsgMax:
AllowedPattern: ^((?!0$)[1-2]?[0-9]|30)$
ConstraintDescription: Must be a number between 1 and 30.
Default: 1
Description: Specifies the maximum number of EC2 instances in the Web Autoscaling Group.
Type: String
WebAsgMin:
AllowedPattern: ^([0-0]?[0-9]|10)$
ConstraintDescription: Must be a number between 0 and 10.
Default: 1
Description: Specifies the minimum number of EC2 instances in the Web Autoscaling Group.
Type: String
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
SslCertificate:
Type: String
Description: "AWS ARN to ACM generated SSL certificate."
EBEndpoint:
Description: "The unique name to use for your Elastic Beanstalk URL (will be rendered http://(EBEndpoint).(region).elasticbeanstalk.com)"
Type: String
UseRoute53Boolean:
AllowedValues:
- true
- false
Default: true
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: true
Description: 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
HostedZoneName:
Type: String
Description: "The hosted zone that will be used by your application. If using the Elastic Beanstalk provided hosted zone in us-east-1, just accept the default value."
Default: us-east-1.elasticbeanstalk.com
DomainName:
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 sub-domain name of the OHDSI site. This sub-domain will be prepended your specified Hosted Zone (e.g. ohdsi in ohdsi.example.edu).'
Type: String
DatabaseMasterPassword:
Description: Must be letters (upper or lower), numbers, spaces, and these special characters `~#$%^&*()_+,-
Type: String
NoEcho: true
AllowedPattern: ^([a-zA-Z0-9`~#$%^&*()_+,\\-])*$
ConstraintDescription: The Amazon RDS master password. Letters, numbers, spaces, and these special characters `~#$%^&*()_+,-
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
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.7.1'
WebAPIv:
Description: OHDSI WebAPI GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.7.1'
Achillesv:
Description: OHDSI Achilles GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.5.0'
OhdsiRToolsv:
Description: OhdsiRTools GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.5.3'
SqlRenderv:
Description: OHDSI SqlRender GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.4.10'
DatabaseConnectorv:
Description: OHDSI DatabaseConnector GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v2.1.0'
DatabaseConnectorJarsv:
Description: OHDSI DatabaseConnector GitHub branch you want deployed (this specifies the version)
Type: String
Default: 'v1.0.0'
EC2KeyName:
Description: The EC2 Key Pair to use for the Atlas/WebAPI EC2 Instances.
Type: AWS::EC2::KeyPair::KeyName
PrivateDeployment:
Type: String
Description: "Is this going to be a private network deployment of OHDSI?"
AllowedValues:
- "true"
- "false"
Default: false
VPCId:
Type: AWS::EC2::VPC::Id
SubnetPublicA:
Type: AWS::EC2::Subnet::Id
SubnetPublicB:
Type: AWS::EC2::Subnet::Id
SubnetAppA:
Type: AWS::EC2::Subnet::Id
SubnetAppB:
Type: AWS::EC2::Subnet::Id
SGPublic:
Type: AWS::EC2::SecurityGroup::Id
SGApp:
Type: AWS::EC2::SecurityGroup::Id
EBServiceRole:
Type: String
EBInstanceProfile:
Type: String
TempEC2InstanceProfile:
Type: String
RStudioTargetGroupArn:
Type: String
RDSEndpoint:
Type: String
RedshiftEndpoint:
Type: String
EBBucket:
Type: String
Description: 'S3 Bucket used to store the application package for Elastic Beanstalk.'
RSRoleArn:
Type: String
#Mapping to find the Amazon Linux AMI in each region. This AMI is used for the temporary EC2 server.
Mappings:
RegionMap:
us-east-1:
AMI: ami-cfe4b2b0
us-east-2:
AMI: ami-40142d25
us-west-1:
AMI: ami-0e86606d
us-west-2:
AMI: ami-0ad99772
ca-central-1:
AMI: ami-03e86a67
eu-west-1:
AMI: ami-e4515e0e
eu-west-2:
AMI: ami-b2b55cd5
eu-west-3:
AMI: ami-d50bbaa8
eu-central-1:
AMI: ami-a058674b
sa-east-1:
AMI: ami-83d58fef
ap-south-1:
AMI: ami-5a8da735
ap-southeast-1:
AMI: ami-ed838091
ap-southeast-2:
AMI: ami-33f92051
ap-northeast-1:
AMI: ami-9c9443e3
ap-northeast-2:
AMI: ami-ebc47185
ap-northeast-3:
AMI: ami-09b8b674
tomcatconfig:
t2.micro:
Xmx: 512m
t2.small:
Xmx: 1024m
t2.medium:
Xmx: 2048m
t2.large:
Xmx: 4096m
t2.xlarge:
Xmx: 8192m
t2.2xlarge:
Xmx: 16384m
t3.micro:
Xmx: 512m
t3.small:
Xmx: 1024m
t3.medium:
Xmx: 2048m
t3.large:
Xmx: 4096m
t3.xlarge:
Xmx: 8192m
t3.2xlarge:
Xmx: 16384m
m4.large:
Xmx: 4096m
m4.xlarge:
Xmx: 8192m
m4.2xlarge:
Xmx: 16384m
m5.large:
Xmx: 4096m
m5.xlarge:
Xmx: 8192m
m5.2xlarge:
Xmx: 16384m
c4.large:
Xmx: 2048m
c4.xlarge:
Xmx: 4096m
c4.2xlarge:
Xmx: 8192m
c5.large:
Xmx: 2048m
c5.xlarge:
Xmx: 4096m
c5.2xlarge:
Xmx: 8192m
r4.large:
Xmx: 8192m
r4.xlarge:
Xmx: 16384m
r5.large:
Xmx: 8192m
r5.xlarge:
Xmx: 16384m
Conditions:
DeployRoute53:
!Equals [ true, !Ref UseRoute53Boolean ]
PrivateDeploy:
!Equals [ true, !Ref PrivateDeployment ]
DeployACM: !And
- !Equals [ true, !Ref UseACMBoolean ]
- !Condition DeployRoute53
NotDeployACM: !Or
- !Equals [ false, !Ref UseACMBoolean ]
- !Equals [ false, !Ref UseRoute53Boolean ]
Resources:
# Defines the Elastic Beanstalk environment that deploys the load balancer and Atlas/WebAPI Tomcat servers in an auto-scaling group.
OHDSIApp:
Type: 'AWS::ElasticBeanstalk::Application'
DependsOn: EC2WaitCondition
Description: OHDSI Atlas and WebAPI
Properties:
ApplicationVersions:
- Description: Version 1.0
SourceBundle:
S3Bucket: !Ref EBBucket
S3Key: ohdsi-webapi-atlas.zip
VersionLabel: Initial Version
OHDSIEnvironmentACM:
Type: 'AWS::ElasticBeanstalk::Environment'
Condition: DeployACM
DependsOn: EC2WaitCondition
Properties:
ApplicationName: !Ref OHDSIApp
Description: Elastic Beanstalk deployment of Atlas / WebAPI
SolutionStackName: !Select [1, !Split ['"', !Select [0, !Split ['}', !Select [1, !Split [':', !GetAtt 'EC2WaitCondition.Data']]]]]]
VersionLabel: Initial Version
EnvironmentName: !Ref EBEndpoint
CNAMEPrefix: !Ref EBEndpoint
Tier:
Name: WebServer
Type: Standard
Version: ' '
OptionSettings:
- Namespace: 'aws:autoscaling:launchconfiguration'
OptionName: IamInstanceProfile
Value: !Ref EBInstanceProfile
- Namespace: 'aws:elasticbeanstalk:environment'
OptionName: ServiceRole
Value: !Ref EBServiceRole
- Namespace: aws:elasticbeanstalk:environment
OptionName: EnvironmentType
Value: LoadBalanced
- Namespace: aws:autoscaling:asg
OptionName: MinSize
Value: !Ref WebAsgMin
- Namespace: aws:autoscaling:asg
OptionName: MaxSize
Value: !Ref WebAsgMax
- Namespace: aws:autoscaling:launchconfiguration
OptionName: EC2KeyName
Value: !Ref 'EC2KeyName'
- Namespace: aws:autoscaling:launchconfiguration
OptionName: InstanceType
Value: !Ref WebInstanceType
- Namespace: aws:autoscaling:launchconfiguration
OptionName: SecurityGroups
Value: !Ref SGApp
- Namespace: aws:autoscaling:launchconfiguration
OptionName: SSHSourceRestriction
Value: 'tcp, 22, 22, 127.0.0.1/32'
- Namespace: aws:autoscaling:trigger
OptionName: MeasureName
Value: CPUUtilization
- Namespace: aws:autoscaling:trigger
OptionName: Unit
Value: Percent
- Namespace: aws:autoscaling:trigger
OptionName: UpperThreshold
Value: '80'
- Namespace: aws:autoscaling:trigger
OptionName: LowerThreshold
Value: '20'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: MaxBatchSize
Value: '1'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: MinInstancesInService
Value: '0'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: RollingUpdateEnabled
Value: 'true'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: RollingUpdateType
Value: Health
- Namespace: aws:ec2:vpc
OptionName: AssociatePublicIpAddress
Value: 'false'
- Namespace: aws:ec2:vpc
OptionName: ELBScheme
Value: !If [ PrivateDeploy, 'internal', 'public' ]
- Namespace: aws:ec2:vpc
OptionName: ELBSubnets
Value: !Join
- ','
- - !Ref SubnetPublicA
- !Ref SubnetPublicB
- Namespace: aws:ec2:vpc
OptionName: Subnets
Value: !Join
- ','
- - !Ref SubnetAppA
- !Ref SubnetAppB
- Namespace: aws:ec2:vpc
OptionName: VPCId
Value: !Ref VPCId
- Namespace: aws:elasticbeanstalk:command
OptionName: DeploymentPolicy
Value: Rolling
- Namespace: aws:elasticbeanstalk:environment
OptionName: LoadBalancerType
Value: application
- Namespace: aws:elasticbeanstalk:healthreporting:system
OptionName: SystemType
Value: enhanced
- Namespace: aws:elbv2:loadbalancer
OptionName: IdleTimeout
Value: 240
- Namespace: aws:elbv2:loadbalancer
OptionName: SecurityGroups
Value: !Ref SGPublic
- Namespace: aws:elbv2:loadbalancer
OptionName: ManagedSecurityGroup
Value: !Ref SGPublic
- Namespace: aws:elbv2:listener:default
OptionName: ListenerEnabled
Value: false
- Namespace: aws:elbv2:listener:443
OptionName: DefaultProcess
Value: https
- Namespace: aws:elbv2:listener:443
OptionName: Protocol
Value: HTTPS
- Namespace: aws:elbv2:listener:443
OptionName: SSLCertificateArns
Value: !Ref SslCertificate
- Namespace: aws:elasticbeanstalk:environment:process:https
OptionName: Port
Value: 443
- Namespace: aws:elasticbeanstalk:environment:process:https
OptionName: Protocol
Value: HTTPS
- Namespace: aws:elasticbeanstalk:environment:process:https
OptionName: StickinessEnabled
Value: true
- Namespace: aws:elasticbeanstalk:container:tomcat:jvmoptions
OptionName: Xmx
Value: !FindInMap [tomcatconfig, !Ref WebInstanceType, Xmx]
OHDSIEnvironmentNoACM:
Type: 'AWS::ElasticBeanstalk::Environment'
Condition: NotDeployACM
DependsOn: EC2WaitCondition
Properties:
ApplicationName: !Ref OHDSIApp
Description: OHDSI Atlas and WebAPI
SolutionStackName: !Select [1, !Split ['"', !Select [0, !Split ['}', !Select [1, !Split [':', !GetAtt 'EC2WaitCondition.Data']]]]]]
VersionLabel: Initial Version
EnvironmentName: !Ref EBEndpoint
CNAMEPrefix: !Ref EBEndpoint
Tier:
Name: WebServer
Type: Standard
Version: ' '
OptionSettings:
- Namespace: 'aws:autoscaling:launchconfiguration'
OptionName: IamInstanceProfile
Value: !Ref EBInstanceProfile
- Namespace: 'aws:elasticbeanstalk:environment'
OptionName: ServiceRole
Value: !Ref EBServiceRole
- Namespace: aws:elasticbeanstalk:environment
OptionName: EnvironmentType
Value: LoadBalanced
- Namespace: aws:autoscaling:asg
OptionName: MinSize
Value: !Ref WebAsgMin
- Namespace: aws:autoscaling:asg
OptionName: MaxSize
Value: !Ref WebAsgMax
- Namespace: aws:autoscaling:launchconfiguration
OptionName: EC2KeyName
Value: !Ref 'EC2KeyName'
- Namespace: aws:autoscaling:launchconfiguration
OptionName: InstanceType
Value: !Ref WebInstanceType
- Namespace: aws:autoscaling:launchconfiguration
OptionName: SecurityGroups
Value: !Ref SGApp
- Namespace: aws:autoscaling:launchconfiguration
OptionName: SSHSourceRestriction
Value: 'tcp, 22, 22, 127.0.0.1/32'
- Namespace: aws:autoscaling:trigger
OptionName: MeasureName
Value: CPUUtilization
- Namespace: aws:autoscaling:trigger
OptionName: Unit
Value: Percent
- Namespace: aws:autoscaling:trigger
OptionName: UpperThreshold
Value: '80'
- Namespace: aws:autoscaling:trigger
OptionName: LowerThreshold
Value: '20'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: MaxBatchSize
Value: '1'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: MinInstancesInService
Value: '0'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: RollingUpdateEnabled
Value: 'true'
- Namespace: aws:autoscaling:updatepolicy:rollingupdate
OptionName: RollingUpdateType
Value: Health
- Namespace: aws:ec2:vpc
OptionName: AssociatePublicIpAddress
Value: 'false'
- Namespace: aws:ec2:vpc
OptionName: ELBScheme
Value: !If [ PrivateDeploy, 'internal', 'public' ]
- Namespace: aws:ec2:vpc
OptionName: ELBSubnets
Value: !Join
- ','
- - !Ref SubnetPublicA
- !Ref SubnetPublicB
- Namespace: aws:ec2:vpc
OptionName: Subnets
Value: !Join
- ','
- - !Ref SubnetAppA
- !Ref SubnetAppB
- Namespace: aws:ec2:vpc
OptionName: VPCId
Value: !Ref VPCId
- Namespace: aws:elasticbeanstalk:command
OptionName: DeploymentPolicy
Value: Rolling
- Namespace: aws:elasticbeanstalk:environment
OptionName: LoadBalancerType
Value: application
- Namespace: aws:elasticbeanstalk:healthreporting:system
OptionName: SystemType
Value: enhanced
- Namespace: aws:elbv2:loadbalancer
OptionName: IdleTimeout
Value: 240
- Namespace: aws:elbv2:loadbalancer
OptionName: SecurityGroups
Value: !Ref SGPublic
- Namespace: aws:elbv2:loadbalancer
OptionName: ManagedSecurityGroup
Value: !Ref SGPublic
- Namespace: aws:elasticbeanstalk:environment:process:default
OptionName: StickinessEnabled
Value: true
- Namespace: aws:elasticbeanstalk:environment:process:https
OptionName: Port
Value: 443
- Namespace: aws:elasticbeanstalk:environment:process:https
OptionName: Protocol
Value: HTTPS
- Namespace: aws:elasticbeanstalk:environment:process:https
OptionName: StickinessEnabled
Value: true
- Namespace: aws:elasticbeanstalk:container:tomcat:jvmoptions
OptionName: Xmx
Value: !FindInMap [tomcatconfig, !Ref WebInstanceType, Xmx]
# This is a temporary EC2 server used to add the necessary Elastic Beanstalk scripts to the Project REDCap source code zip file.
TempEC2Instance:
Type: AWS::EC2::Instance
Metadata:
AWS::CloudFormation::Init:
config:
files:
/etc/awslogs/awslogs.conf:
content: !Sub
- |
[general]
state_file = /var/lib/awslogs/agent-state
[ohdsi-build-log]
file = /tmp/log.txt
log_group_name = ohdsi-temporary-ec2-instance-build-log
log_stream_name = ${EB}-build-log
- { EB: !Ref EBEndpoint }
mode: 000664
owner: root
group: root
/etc/awslogs/awscli.conf:
content: !Sub |
[plugins]
cwlogs = cwlogs
[default]
region = ${AWS::Region}
mode: 000664
owner: root
group: root
/tmp/config_ohdsi.sh:
content: |
# This script configures the CFN deployed environment for OHDSI WebAPI and Atlas
#
# Requirements:
# $RDS_ENDPOINT must contain the endpoint of the Postgres Aurora RDS environment to be used to store the WebAPI application data
# $EB_ENDPOINT must contain the endpoint of the Elastic Beanstalk Tomcat environment
# $REDSHIFT_ENDPOINT must contain the endpoint of the Redshift Cluster used for OMOP CDM and Vocabulary
# $ACCT_ID must contain the AWS Account ID for the account in which this environment is being deployed
# $BUCKET_NAME must contain the s3 bucket name in which Elastic Beanstalk will look for the ohdsi-webapi-atlas.zip file
# $DATABASE_PASSWORD must contain the password that was used for the master accounts for Redshift and RDS Aurora Postgres
echo "RDS_ENDPOINT=" $RDS_ENDPOINT
echo "EB_ENDPOINT=" $EB_ENDPOINT
echo "REDSHIFT_ENDPOINT=" $REDSHIFT_ENDPOINT
echo "ACCT_ID=" $ACCT_ID
echo "BUCKET_NAME=" $BUCKET_NAME
echo "DATABASE_PASSWORD=" $DATABASE_PASSWORD
echo "OHDSIADMINUSERPWHASH=" $OHDSIADMINUSERPWHASH
echo "OHDSIAPPUSERPWHASH=" $OHDSIAPPUSERPWHASH
export AWS_DEFAULT_REGION=$(echo $EB_ENDPOINT | cut -d . -f2)
sudo yum install -y nodejs npm --enablerepo=epel
sudo yum install -y postgresql
export PGPASSWORD=$DATABASE_PASSWORD
sed -i 's!OHDSIADMINUSERPWHASH!'$OHDSIADMINUSERPWHASH'!' postgres_init_master.sql
sed -i 's!OHDSIAPPUSERPWHASH!'$OHDSIAPPUSERPWHASH'!' postgres_init_master.sql
psql -d postgres --host=$RDS_ENDPOINT --port=5432 -U master -a -f postgres_init_master.sql
psql -d postgres --host=$RDS_ENDPOINT --port=5432 -U ohdsi_admin_user -a -f postgres_init_ohdsi.sql
#Download build tools and compile WebAPI
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install 11.11.0
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
sudo yum install -y java-1.8.0
sudo yum install -y java-1.8.0-openjdk-devel
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
mv settings.xml ./WebAPI/
cd WebAPI
mvn clean package -s settings.xml -P webapi-postgresql -DskipTests=true
cd ..
cp ./WebAPI/target/WebAPI.war .
#Build Atlas "war" file to put at the root URL of the Tomcat server
mv config-local.js ./Atlas/js/
cd Atlas
npm config set strict-ssl false
npm run build
zip -r ../ROOT.war *
cd ..
zip -r ohdsi-webapi-atlas.zip ROOT.war WebAPI.war .ebextensions
aws s3 cp ohdsi-webapi-atlas.zip s3://$BUCKET_NAME
mode: 000777
owner: root
group: root
/tmp/config_db.sh:
content: !Sub
- |
# This script configures the CFN deployed environment for OHDSI WebAPI and Atlas
#
# Requirements:
# $RDS_ENDPOINT must contain the endpoint of the Postgres Aurora RDS environment to be used to store the WebAPI application data
# $EB_ENDPOINT must contain the endpoint of the Elastic Beanstalk Tomcat environment
# $REDSHIFT_ENDPOINT must contain the endpoint of the Redshift Cluster used for OMOP CDM and Vocabulary
# $ACCT_ID must contain the AWS Account ID for the account in which this environment is being deployed
# $BUCKET_NAME must contain the s3 bucket name in which Elastic Beanstalk will look for the ohdsi-webapi-atlas.zip file
# $DATABASE_PASSWORD must contain the password that was used for the master accounts for Redshift and RDS Aurora Postgres
# $RS_ROLE_ARN must contain the role ARN that allows Redshift to read the sample data from S3.
echo "RDS_ENDPOINT=" $RDS_ENDPOINT
echo "EB_ENDPOINT=" $EB_ENDPOINT
echo "REDSHIFT_ENDPOINT=" $REDSHIFT_ENDPOINT
echo "ACCT_ID=" $ACCT_ID
echo "BUCKET_NAME=" $BUCKET_NAME
echo "DATABASE_PASSWORD=" $DATABASE_PASSWORD
echo "RS_ROLE_ARN=" $RS_ROLE_ARN
echo "RSTUDIO_TARGET_GROUP_ARN=" $RSTUDIO_TARGET_GROUP_ARN
echo "SOURCES=" $SOURCES
echo "SOURCESBUCKET= " $SOURCESBUCKET
export AWS_DEFAULT_REGION=$(echo $EB_ENDPOINT | cut -d . -f2)
#Install R and the dependencies for Achilles
sudo yum install -y xorg-x11-xauth.x86_64 xorg-x11-server-utils.x86_64 xterm libXt libX11-devel libXt-devel libcurl-devel git compat-gmp4 compat-libffi5 openssl-devel
sudo yum install R R-core R-core-devel R-devel libxml2-devel -y
if [ -f /usr/lib64/R/etc/Makeconf.rpmnew ]; then
sudo cp /usr/lib64/R/etc/Makeconf.rpmnew /usr/lib64/R/etc/Makeconf
fi
if [ -f /usr/lib64/R/etc/ldpaths.rpmnew ]; then
sudo cp /usr/lib64/R/etc/ldpaths.rpmnew /usr/lib64/R/etc/ldpaths
fi
mkdir /mnt/r-stuff
cd /mnt/r-stuff
pushd .
mkdir R-latest
cd R-latest
wget https://cran.r-project.org/src/base/R-3/R-3.5.3.tar.gz
tar -xzf R-3.5.3.tar.gz
#Trying out Python
sudo yum install -y python36 python36-devel python36-pip
sudo yum install -y gcc gcc-c++ gcc-gfortran
sudo yum install -y readline-devel cairo-devel libpng-devel libjpeg-devel libtiff-devel postgresql-devel
cd R-3*
./configure --with-readline=yes --enable-R-profiling=no --enable-memory-profiling=no --enable-R-shlib --with-pic --prefix=/usr --with-x --with-libpng --with-jpeglib --with-cairo --enable-R-shlib --with-recommended-packages=yes
make -j 8
sudo make install
sudo su << BASH_SCRIPT
echo 'export PATH=${!PWD}/bin:$PATH' >> /etc/profile
BASH_SCRIPT
popd
sudo sed -i 's/make/make -j 8/g' /usr/lib64/R/etc/Renviron
# set unix environment variables
sudo su << BASH_SCRIPT
echo 'export JAVA_HOME=/etc/alternatives/jre' >> /etc/profile
BASH_SCRIPT
sudo sh -c "source /etc/profile"
# fix java binding - R and packages have to be compiled with the same java version as hadoop
sudo R CMD javareconf
sudo R --no-save << R_SCRIPT
install.packages(c('curl','reticulate', 'RJSONIO', 'httr', 'devtools', 'itertools', 'digest', 'Rcpp', 'functional', 'plyr', 'stringr', 'reshape2', 'caTools', 'rJava', 'devtools', 'DBI', 'ggplot2', 'dplyr', 'R.methodsS3', 'Hmisc', 'memoise', 'rjson', 'xml2', 'rvg', 'gdtools', 'png'), repos="http://cran.rstudio.com")
R_SCRIPT
#Connect R-Studio Instance to the load balancer
if [ "$RSTUDIO_TARGET_GROUP_ARN" != "none" ]; then
export EB_ENVIRONMENT=$(echo $EB_ENDPOINT | cut -d . -f1)
export EB_LB=$(aws elasticbeanstalk describe-environment-resources --environment-name $EB_ENVIRONMENT --query EnvironmentResources.LoadBalancers --output text)
export EB_LB_LISTENER=$(aws elbv2 describe-listeners --load-balancer-arn $EB_LB --query 'Listeners[0].ListenerArn' --output text)
aws elbv2 create-rule --listener-arn $EB_LB_LISTENER --priority 4 --conditions Field=host-header,Values='rstudio.*' --actions Type=forward,TargetGroupArn=$RSTUDIO_TARGET_GROUP_ARN
fi
cd /tmp
#Deploy the OMOP CDM Schema to Redshift
export PGPASSWORD=$DATABASE_PASSWORD
export REDSHIFTDDL=`ls ./CommonDataModel/Redshift/OMOP*`
#Some of the current Vocabulary data sets from Athena do not have values for these columns
if [ "$CDM_VERSION" = "v5.3.1" ]; then
sed -i '47s/.*/ concept_name VARCHAR(255) NULL ,/' "$REDSHIFTDDL"
sed -i '52s/.*/ concept_code VARCHAR(50) NULL ,/' "$REDSHIFTDDL"
sed -i '62s/.*/ vocabulary_reference VARCHAR(255) NULL,/' "$REDSHIFTDDL"
sed -i '63s/.*/ vocabulary_version VARCHAR(255) NULL,/' "$REDSHIFTDDL"
sed -i '226s/.*/ race_source_value VARCHAR(255) NULL,/' "$REDSHIFTDDL"
sed -i '340s/.*/ procedure_source_value VARCHAR(255) NULL ,/' "$REDSHIFTDDL"
sed -i '352s/.*/ drug_exposure_start_date DATE NULL,/' "$REDSHIFTDDL"
sed -i '354s/.*/ drug_exposure_end_date DATE NULL,/' "$REDSHIFTDDL"
sed -i '411s/.*/ condition_source_value VARCHAR(255) NULL,/' "$REDSHIFTDDL"
sed -i '413s/.*/ condition_status_source_value VARCHAR(255) NULL,/' "$REDSHIFTDDL"
sed -i '437s/.*/ measurement_source_value VARCHAR(255) NULL ,/' "$REDSHIFTDDL"
sed -i '440s/.*/ value_source_value VARCHAR(255) NULL/' "$REDSHIFTDDL"
sed -i '494s/.*/ value_as_string VARCHAR(255) NULL ,/' "$REDSHIFTDDL"
sed -i '546s/.*/ place_of_service_source_value VARCHAR(255) NULL/' "$REDSHIFTDDL"
sed -i '676s/.*/ dose_era_start_date DATE NULL,/' "$REDSHIFTDDL"
sed -i '677s/.*/ dose_era_end_date DATE NULL/' "$REDSHIFTDDL"
fi
#Insert Database Credentials into the scripts
sed -i 's!REDSHIFT_ENDPOINT!'$REDSHIFT_ENDPOINT'!' postgres_init_sources.sql
sed -i 's!DATABASE_PASSWORD!'$DATABASE_PASSWORD'!' postgres_init_sources.sql
sed -i 's!REDSHIFT_ENDPOINT!'$REDSHIFT_ENDPOINT'!' /tmp/achilles.r
sed -i 's!DATABASE_PASSWORD!'$DATABASE_PASSWORD'!' /tmp/achilles.r
SOURCECOUNT=0
SOURCEDAEMONCOUNT=0
SOURCEVOCABPRIORITY=0
SOURCERESULTSPRIORITY=0
for i in $(echo $SOURCES | sed "s/,/ /g")
do
export PGPASSWORD=$DATABASE_PASSWORD
cp "$REDSHIFTDDL" "$REDSHIFTDDL-$i"
sed -i "1s/^/SET search_path to $i;\n/" "$REDSHIFTDDL-$i"
psql -d mycdm --host=$REDSHIFT_ENDPOINT --port=5439 -U master -a -c "CREATE SCHEMA $i;"
psql -d mycdm --host=$REDSHIFT_ENDPOINT --port=5439 -U master -a -f "$REDSHIFTDDL-$i"
#Deploy the DDL with the appropriate source name and run it
aws s3 cp s3://$SOURCESBUCKET/$i.sql .
sed -i 's!RS_ROLE_ARN!'$RS_ROLE_ARN'!' $i.sql
psql -d mycdm --host=$REDSHIFT_ENDPOINT --port=5439 -U master -a -f $i.sql
#Wait for the WebAPI app to be deployed by Elastic Beanstalk and populate the tables in RDS Postrgres
while [ `curl ${Protocol}${RCDomainName}.${HostedZone} 1> /dev/null 2> /dev/null; echo $?` -ne 0 ]
do
sleep 5
done
#Get the Results Schema from WebAPI and apply the Results schema
wget -q "${Protocol}${RCDomainName}.${HostedZone}/WebAPI/ddl/results?dialect=redshift&schema=${!i}results" -O results_schema.sql
psql -d mycdm --host=$REDSHIFT_ENDPOINT --port=5439 -U master -a -c "CREATE SCHEMA ${!i}results;"
psql -d mycdm --host=$REDSHIFT_ENDPOINT --port=5439 -U master -a -f results_schema.sql
#Create a WebAPI Sources DDL for this Source
cp postgres_init_sources.sql postgres_init_sources-$i.sql
let SOURCECOUNT+=1
if [ "$SOURCECOUNT" = "1" ]; then
SOURCEVOCABPRIORITY=1
SOURCERESULTSPRIORITY=1
else
SOURCEVOCABPRIORITY=0
SOURCERESULTSPRIORITY=0
fi
sed -i 's!SOURCECOUNT!'$SOURCECOUNT'!' postgres_init_sources-$i.sql
let SOURCEDAEMONCOUNT+=1
sed -i 's!SOURCEDAEMONCOUNT1!'$SOURCEDAEMONCOUNT'!' postgres_init_sources-$i.sql
let SOURCEDAEMONCOUNT+=1
sed -i 's!SOURCEDAEMONCOUNT2!'$SOURCEDAEMONCOUNT'!' postgres_init_sources-$i.sql
let SOURCEDAEMONCOUNT+=1
sed -i 's!SOURCEDAEMONCOUNT3!'$SOURCEDAEMONCOUNT'!' postgres_init_sources-$i.sql
sed -i 's!SOURCEVOCABPRIORITY!'$SOURCEVOCABPRIORITY'!' postgres_init_sources-$i.sql
sed -i 's!SOURCERESULTSPRIORITY!'$SOURCERESULTSPRIORITY'!' postgres_init_sources-$i.sql
sed -i 's!SOURCENAME_PLACEHOLDER!'$i'!' postgres_init_sources-$i.sql
sed -i 's!SOURCENAME_PLACEHOLDER!'$i'!' postgres_init_sources-$i.sql
sed -i 's!CDM_PLACEHOLDER!'$i'!' postgres_init_sources-$i.sql
sed -i 's!RESULTS_PLACEHOLDER!'${!i}results'!' postgres_init_sources-$i.sql
#Load the sources reference table into the WebAPI Postgres database
export PGPASSWORD=$DATABASE_PASSWORD
psql -d OHDSI --host=$RDS_ENDPOINT --port=5432 -U ohdsi_admin_user -a -f postgres_init_sources-$i.sql
aws elasticbeanstalk restart-app-server --environment-name $(echo $EB_ENDPOINT | cut -d . -f1)
#Inject source information and run Achilles R script to enabled Data Source visualization
cp /tmp/achilles.r /tmp/achilles-$i.r
sed -i 's!SOURCENAME_PLACEHOLDER!'$i'!' /tmp/achilles-$i.r
sed -i 's!CDM_PLACEHOLDER!'$i'!' /tmp/achilles-$i.r
sed -i 's!RESULTS_PLACEHOLDER!'${!i}results'!' /tmp/achilles-$i.r
Rscript /tmp/achilles-$i.r
aws elasticbeanstalk restart-app-server --environment-name $(echo $EB_ENDPOINT | cut -d . -f1)
done
- { Protocol: !If [ DeployACM, 'https://', 'http://' ], RCDomainName: !If [DeployRoute53, !Ref DomainName, !Ref EBEndpoint], HostedZone: !If [DeployRoute53, !Ref HostedZoneName, !Join ['.', [!Ref 'AWS::Region', 'elasticbeanstalk.com']]] }
mode: 000777
owner: root
group: root
/tmp/postgres_init_master.sql:
content: |
CREATE ROLE ohdsi_admin
CREATEDB
VALID UNTIL 'infinity';
COMMENT ON ROLE ohdsi_admin
IS 'Administration group for OHDSI applications';
CREATE ROLE ohdsi_app
VALID UNTIL 'infinity';
COMMENT ON ROLE ohdsi_app
IS 'Application groupfor OHDSI applications';
CREATE ROLE ohdsi_admin_user LOGIN ENCRYPTED PASSWORD 'OHDSIADMINUSERPWHASH'
VALID UNTIL 'infinity';
-- password is admin1
GRANT ohdsi_admin TO ohdsi_admin_user;
COMMENT ON ROLE ohdsi_admin_user
IS 'Admin user account for OHDSI applications';
CREATE ROLE ohdsi_app_user LOGIN ENCRYPTED PASSWORD 'OHDSIAPPUSERPWHASH'
VALID UNTIL 'infinity';
-- password is app1
GRANT ohdsi_app TO ohdsi_app_user;
COMMENT ON ROLE ohdsi_app_user
IS 'Application user account for OHDSI applications';
ALTER USER ohdsi_admin_user CREATEDB;
mode: 000664
owner: root
group: root
/tmp/postgres_init_ohdsi.sql:
content: |
CREATE DATABASE "OHDSI"
WITH ENCODING='UTF8'
OWNER=ohdsi_admin
CONNECTION LIMIT=-1;
COMMENT ON DATABASE "OHDSI"
IS 'OHDSI database';
GRANT ALL ON DATABASE "OHDSI" TO GROUP ohdsi_admin;
GRANT CONNECT, TEMPORARY ON DATABASE "OHDSI" TO GROUP ohdsi_app;
\c OHDSI
CREATE SCHEMA webapi
AUTHORIZATION ohdsi_admin;
COMMENT ON SCHEMA webapi
IS 'Schema containing tables to support WebAPI functionality';
GRANT USAGE ON SCHEMA webapi TO public;
GRANT ALL ON SCHEMA webapi TO GROUP ohdsi_admin;
GRANT USAGE ON SCHEMA webapi TO GROUP ohdsi_app;
ALTER DEFAULT PRIVILEGES IN SCHEMA webapi
GRANT INSERT, SELECT, UPDATE, DELETE, REFERENCES, TRIGGER ON TABLES
TO ohdsi_app;
ALTER DEFAULT PRIVILEGES IN SCHEMA webapi
GRANT SELECT, USAGE ON SEQUENCES
TO ohdsi_app;
ALTER DEFAULT PRIVILEGES IN SCHEMA webapi
GRANT EXECUTE ON FUNCTIONS
TO ohdsi_app;
ALTER DEFAULT PRIVILEGES IN SCHEMA webapi
GRANT USAGE ON TYPES
TO ohdsi_app;
mode: 000664
owner: root
group: root
/tmp/postgres_init_sources.sql:
content: |
INSERT INTO webapi.source (source_id, source_name, source_key, source_connection, source_dialect) VALUES (SOURCECOUNT, 'SOURCENAME_PLACEHOLDER', 'SOURCENAME_PLACEHOLDER', 'jdbc:redshift://REDSHIFT_ENDPOINT:5439/mycdm?user=master&password=DATABASE_PASSWORD', 'redshift');
INSERT INTO webapi.source_daimon (source_daimon_id, source_id, daimon_type, table_qualifier, priority) VALUES (SOURCEDAEMONCOUNT1,SOURCECOUNT,0, 'CDM_PLACEHOLDER', 0);
INSERT INTO webapi.source_daimon (source_daimon_id, source_id, daimon_type, table_qualifier, priority) VALUES (SOURCEDAEMONCOUNT2,SOURCECOUNT,1, 'CDM_PLACEHOLDER', SOURCEVOCABPRIORITY);
INSERT INTO webapi.source_daimon (source_daimon_id, source_id, daimon_type, table_qualifier, priority) VALUES (SOURCEDAEMONCOUNT3,SOURCECOUNT,2, 'RESULTS_PLACEHOLDER', SOURCERESULTSPRIORITY);
mode: 000664
owner: root
group: root
/tmp/settings.xml:
content: !Sub |
<settings>
<profiles>
<profile>
<id>webapi-postgresql</id>
<properties>
<datasource.driverClassName>org.postgresql.Driver</datasource.driverClassName>
<datasource.url>jdbc:postgresql://${RDSEndpoint}:5432/OHDSI?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory</datasource.url>
<datasource.username>ohdsi_app_user</datasource.username>
<datasource.password>${DatabaseMasterPassword}</datasource.password>
<datasource.dialect>postgresql</datasource.dialect>
<datasource.ohdsi.schema>webapi</datasource.ohdsi.schema>
<flyway.datasource.driverClassName>${!datasource.driverClassName}</flyway.datasource.driverClassName>
<flyway.datasource.url>${!datasource.url}</flyway.datasource.url>
<flyway.datasource.username>ohdsi_admin_user</flyway.datasource.username>
<flyway.datasource.password>${DatabaseMasterPassword}</flyway.datasource.password>
<flyway.locations>classpath:db/migration/postgresql</flyway.locations>
<security.enabled>false</security.enabled>
<security.token.expiration>43200</security.token.expiration>
<security.origin>*</security.origin>
<security.ssl.enabled>false</security.ssl.enabled>
<security.oauth.callback.ui>http://localhost/atlas/#/welcome</security.oauth.callback.ui>
<security.oauth.callback.api>http://localhost:8080/WebAPI/user/oauth/callback</security.oauth.callback.api>
<security.oauth.google.apiKey></security.oauth.google.apiKey>
<security.oauth.google.apiSecret></security.oauth.google.apiSecret>
<security.oauth.facebook.apiKey></security.oauth.facebook.apiKey>
<security.oauth.facebook.apiSecret></security.oauth.facebook.apiSecret>
</properties>
</profile>
</profiles>
</settings>
mode: 000664
owner: root
group: root
/tmp/config-local.js:
content: !Sub
- |
define([], function () {
var configLocal = {};
configLocal.api = {
name: 'My Organization Name',
url: '${Protocol}${RCDomainName}.${HostedZone}/WebAPI/'
};
return configLocal;
});
- { Protocol: !If [ DeployACM, 'https://', 'http://' ], RCDomainName: !If [DeployRoute53, !Ref DomainName, !Ref EBEndpoint], HostedZone: !If [DeployRoute53, !Ref HostedZoneName, !Join ['.', [!Ref 'AWS::Region', 'elasticbeanstalk.com']]] }
mode: 000664
owner: root
group: root
/tmp/achilles.r:
content: !Sub |
install.packages("devtools",repos = "http://cran.us.r-project.org")
library(devtools)
devtools::install_github("ohdsi/SqlRender", ref = "${SqlRenderv}")
devtools::install_github("ohdsi/DatabaseConnector", ref = "${DatabaseConnectorv}")
devtools::install_github("ohdsi/DatabaseConnectorJars", ref = "${DatabaseConnectorJarsv}")
devtools::install_github("ohdsi/OhdsiRTools", ref = "${OhdsiRToolsv}")
devtools::install_github("ohdsi/Achilles", ref = "${Achillesv}")
library(Achilles)
connectionDetails <- createConnectionDetails(dbms="redshift", server="REDSHIFT_ENDPOINT/mycdm", user="master",
password='DATABASE_PASSWORD', schema="CDM_PLACEHOLDER", port="5439")
achillesResults <- achilles(connectionDetails, cdmDatabaseSchema="CDM_PLACEHOLDER",
resultsDatabaseSchema="RESULTS_PLACEHOLDER", sourceName="SOURCENAME_PLACEHOLDER",
cdmVersion = "5", vocabDatabaseSchema="CDM_PLACEHOLDER")
mode: 000664
owner: root
group: root
/tmp/.ebextensions/httpd/conf.d/ssl.conf:
content: |
LoadModule ssl_module modules/mod_ssl.so
Listen 443
<VirtualHost *:443>
<Proxy *>
Require all granted
</Proxy>
SSLEngine on
SSLCertificateFile "/etc/pki/tls/certs/server.crt"
SSLCertificateKeyFile "/etc/pki/tls/certs/server.key"
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLSessionTickets Off
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"