forked from chhatbarjignesh/reportportal-aws-cfn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreportportal-cfn.yml
666 lines (665 loc) · 21 KB
/
reportportal-cfn.yml
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
AWSTemplateFormatVersion: "2010-09-09"
Description: "A template to deploy reportportal"
Parameters:
ReportPortalVersion: # Version of ReportPortal you want to Deploy
Type: String
Default: '5.6.3'
AllowedValues:
- '5.0.0'
- '5.1.0'
- '5.2.0'
- '5.2.1'
- '5.2.2'
- '5.2.3'
- '5.3.0'
- '5.3.1'
- '5.3.2'
- '5.3.3'
- '5.3.4'
- '5.3.5'
- '5.4.0'
- '5.5.0'
- '5.6.3'
EnvironmentSize: # Environment size (Small, Medium, Large)
Type: String
Default: SMALL
AllowedValues:
- SMALL
- MEDIUM
- LARGE
Description: Select Environment Size (S,M,L)
DBEngineVersion: # PostgreSQL Database Version
Type: String
Default: "11.6"
Description: Postgres DB engine version
DBAllocatedStorage: # Database Storage size
Type: Number
Default: 10
Description: Storage size in GiB for Postgres DB
DBName: # Database Name
Type: String
Default: reportportal
Description: Name for Postgres DB
DBUser: # Database user name
Type: String
Default: reportportal
Description: Username for Postgres DB master account
DBPassword: # Datbase password (Can be stored in AWS SSM)
Type: String
Default: reportportal
NoEcho: True
Description: Password for Postgres DB master account
S3BucketName: # S3Bucket Name where you want to store your binary data it has to be existing bucket
Type: String
Default: reportportal-ropen
Description: Name for S3 bucket
ReportPortalEBSSize: # EBS Size, to store index data generated by auto analyzer
Type: String
Default: 10
Description: Size of EBS Volume to be mounted for elasticsearch Index storage
KeyName: # KeyName in case you want to SSH in your host (has to be existing key)
Description: EC2 KeyPair for SSH access to the Host instance
Type: AWS::EC2::KeyPair::KeyName
Default: "ReportPortal"
ConstraintDescription: must be the name of an existing EC2 KeyPair
ReportPortalDeploymentType: # How you want to deploy HTTP or HTTPS (HTTPS only available with Domain Name)
Type: String
Default: "HTTP"
Description: Deployment type, HTTP or HTTPS
AllowedValues:
- HTTP
- HTTPS
DeployWithDomain: # You want to deploy with Domain
Description: Deploy with Domain, Yes or No
Type: String
Default: "No"
AllowedValues:
- "Yes"
- "No"
ConstraintDescription: If you select Yes then you have to enter DomianName and ReportPortalDomain.
DomainName: # Domain Name (Domain must be active in Route53 with one hosted zone)
Description: Domain where you want to deploy ReportPortal
Type: String
Default: yourdomain.com
ConstraintDescription: Domain must be active in Route53 with One Hosted zone.
ReportPortalDomain: # Reportportal sub domain e.g. reportportal.yourdomain.com
Description: URL with subdomain where you want to deploy ReportPortal e.g. reportportal.yourdomaion.com
Type: String
Default: reportportal.yourdomain.com
ReportPortalCert: # ReportPortal certificate ARN (Must be a valid certificate ARN that is registered with ReportPortal Domain URL)
Description: ReportPortal SSL Certificate ARN
Type: String
Default: mydefaultcertificatefromawscrn
ConstraintDescription: Must be a valid Certificate ARN that is registered with above URL
Conditions:
DeployWithSSL: !Equals [ !Ref ReportPortalDeploymentType, HTTPS ]
DeployWithoutSSL: !Equals [ !Ref ReportPortalDeploymentType, HTTP ]
DeployWithDomain: !Equals [ !Ref DeployWithDomain, "Yes" ]
DeployWithoutDomain: !Equals [ !Ref DeployWithDomain, "No" ]
DeployWithSSLAndDomain: !And
- !Condition DeployWithSSL
- !Condition DeployWithDomain
DeployWithoutSSLAndWithoutDomain: !And
- !Condition DeployWithoutSSL
- !Condition DeployWithoutDomain
DeployWithoutSSLAndWithDomain: !And
- !Condition DeployWithoutSSL
- !Condition DeployWithDomain
Mappings:
SubnetConfig:
VPC:
CIDR: 10.0.0.0/16
PublicOne:
CIDR: 10.0.0.0/24
PublicTwo:
CIDR: 10.0.1.0/24
PrivateOne:
CIDR: 10.0.2.0/24
PrivateTwo:
CIDR: 10.0.3.0/24
RegionMap:
us-east-1:
AMALINUX: ami-0c293f3f676ec4f90
us-east-2:
AMALINUX: ami-08b6f2a5c291246a0
us-west-1:
AMALINUX: ami-051317f1184dd6e92
us-west-2:
AMALINUX: ami-0b9f27b05e1de14e9
sa-east-1:
AMALINUX: ami-06a6cd930c86feb26
ca-central-1:
AMALINUX: ami-0ba438e27012de9af
eu-west-1:
AMALINUX: ami-080af029940804103
eu-west-2:
AMALINUX: ami-060c4f2d72966500a
eu-west-3:
AMALINUX: ami-01d14e0ab732be0e4
eu-central-1:
AMALINUX: ami-00e76d391403fc721
ap-southeast-1:
AMALINUX: ami-0abb8f6b71e7614d5
ap-southeast-2:
AMALINUX: ami-089e8a52c00cede0b
ap-northeast-1:
AMALINUX: ami-07b4f72c4c356c19d
ap-northeast-2:
AMALINUX: ami-0029dbeb91e3b0f5f
ap-south-1:
AMALINUX: ami-076754bea03bde973
eu-north-1:
AMALINUX: ami-06077dff17d5cd454
InstanceSize:
SMALL:
"EC2": "t2.medium"
"DB": "db.t2.micro"
MEDIUM:
"EC2": "t2.large"
"DB": "db.t2.small"
LARGE:
"EC2": "t2.xlarge"
"DB": "db.t2.medium"
Resources:
# VPC in which containers will be networked.
# It has two public subnets, and two private subnets.
# We distribute the subnets across the first two available subnets
# for the region, for high availability.
VPC:
Type: "AWS::EC2::VPC"
Properties:
EnableDnsSupport: true
EnableDnsHostnames: true
CidrBlock: !FindInMap
- SubnetConfig
- VPC
- CIDR
PublicSubnetOne:
Type: "AWS::EC2::Subnet"
Properties:
AvailabilityZone:
"Fn::Select":
- 0
- "Fn::GetAZs":
Ref: "AWS::Region"
VpcId: !Ref VPC
CidrBlock: !FindInMap
- SubnetConfig
- PublicOne
- CIDR
MapPublicIpOnLaunch: true
PublicSubnetTwo:
Type: "AWS::EC2::Subnet"
Properties:
AvailabilityZone:
"Fn::Select":
- 1
- "Fn::GetAZs":
Ref: "AWS::Region"
VpcId: !Ref VPC
CidrBlock: !FindInMap
- SubnetConfig
- PublicTwo
- CIDR
MapPublicIpOnLaunch: true
# Two private subnets where containers will only have private
# IP addresses, and will only be reachable by other members of the
# VPC
PrivateSubnetOne:
Type: "AWS::EC2::Subnet"
Properties:
AvailabilityZone:
"Fn::Select":
- 0
- "Fn::GetAZs":
Ref: "AWS::Region"
VpcId: !Ref VPC
CidrBlock: !FindInMap
- SubnetConfig
- PrivateOne
- CIDR
PrivateSubnetTwo:
Type: "AWS::EC2::Subnet"
Properties:
AvailabilityZone:
"Fn::Select":
- 1
- "Fn::GetAZs":
Ref: "AWS::Region"
VpcId: !Ref VPC
CidrBlock: !FindInMap
- SubnetConfig
- PrivateTwo
- CIDR
# Setup networking resources for the public subnets.
# Containers in the public subnets havepublic IP addresses and the routing table
# sends network traffic via the internet gateway.
InternetGateway:
Type: "AWS::EC2::InternetGateway"
GatewayAttachement:
Type: "AWS::EC2::VPCGatewayAttachment"
Properties:
VpcId: !Ref VPC
InternetGatewayId: !Ref InternetGateway
PublicRouteTable:
Type: "AWS::EC2::RouteTable"
Properties:
VpcId: !Ref VPC
PublicRoute:
Type: "AWS::EC2::Route"
DependsOn: GatewayAttachement
Properties:
RouteTableId: !Ref PublicRouteTable
DestinationCidrBlock: 0.0.0.0/0
GatewayId: !Ref InternetGateway
PublicSubnetOneRouteTableAssociation:
Type: "AWS::EC2::SubnetRouteTableAssociation"
Properties:
SubnetId: !Ref PublicSubnetOne
RouteTableId: !Ref PublicRouteTable
PublicSubnetTwoRouteTableAssociation:
Type: "AWS::EC2::SubnetRouteTableAssociation"
Properties:
SubnetId: !Ref PublicSubnetTwo
RouteTableId: !Ref PublicRouteTable
# Setup networking resources for the private subnets.
# Containers in these subnets have only private IP addresses, and must use a NAT
# gateway to talk to the internet. We launch two NAT gateways, one for each private subnet.
NatGatewayOneAttachment:
Type: "AWS::EC2::EIP"
DependsOn: GatewayAttachement
Properties:
Domain: vpc
NatGatewayTwoAttachment:
Type: "AWS::EC2::EIP"
DependsOn: GatewayAttachement
Properties:
Domain: vpc
NatGatewayOne:
Type: "AWS::EC2::NatGateway"
Properties:
AllocationId: !GetAtt
- NatGatewayOneAttachment
- AllocationId
SubnetId: !Ref PublicSubnetOne
NatGatewayTwo:
Type: "AWS::EC2::NatGateway"
Properties:
AllocationId: !GetAtt
- NatGatewayTwoAttachment
- AllocationId
SubnetId: !Ref PublicSubnetTwo
PrivateRouteTableOne:
Type: "AWS::EC2::RouteTable"
Properties:
VpcId: !Ref VPC
PrivateRouteOne:
Type: "AWS::EC2::Route"
Properties:
RouteTableId: !Ref PrivateRouteTableOne
DestinationCidrBlock: 0.0.0.0/0
NatGatewayId: !Ref NatGatewayOne
PrivateRouteTableOneAssociation:
Type: "AWS::EC2::SubnetRouteTableAssociation"
Properties:
RouteTableId: !Ref PrivateRouteTableOne
SubnetId: !Ref PrivateSubnetOne
PrivateRouteTableTwo:
Type: "AWS::EC2::RouteTable"
Properties:
VpcId: !Ref VPC
PrivateRouteTwo:
Type: "AWS::EC2::Route"
Properties:
RouteTableId: !Ref PrivateRouteTableTwo
DestinationCidrBlock: 0.0.0.0/0
NatGatewayId: !Ref NatGatewayTwo
PrivateRouteTableTwoAssociation:
Type: "AWS::EC2::SubnetRouteTableAssociation"
Properties:
RouteTableId: !Ref PrivateRouteTableTwo
SubnetId: !Ref PrivateSubnetTwo
# Security Group for SSH and 8080 Port from the VPC only
SSHSecurityGroup:
Type: "AWS::EC2::SecurityGroup"
Properties:
VpcId: !Ref VPC
GroupDescription: "Allows SSH access"
GroupName: "Allows SSH access"
SecurityGroupIngress:
- CidrIp: "10.0.0.0/16"
Description: "SSH from public-instance within VPC"
FromPort: 22
ToPort: 22
IpProtocol: tcp
- CidrIp: "10.0.0.0/16"
Description: "8080 port for load balancer"
FromPort: 8080
ToPort: 8080
IpProtocol: tcp
# ReportPortal EBS Volume for Data storage
ReportPortalEBS:
Type: "AWS::EC2::Volume"
DeletionPolicy: Snapshot
Properties:
AvailabilityZone:
"Fn::Select":
- 0
- "Fn::GetAZs":
Ref: "AWS::Region"
Size: !Ref ReportPortalEBSSize
Tags:
-
Key: Name
Value: "ReportPortalEBS"
VolumeType: gp2
# ReportPortal Main EC2 Instance
ReportPortalEC2:
Type: "AWS::EC2::Instance"
DeletionPolicy: Delete
DependsOn: ReportPortalDB
Properties:
ImageId: !FindInMap [RegionMap, !Ref "AWS::Region", AMALINUX] # Dynamic mapping + Pseudo Parameter
InstanceType: !FindInMap [InstanceSize, !Ref EnvironmentSize, EC2]
KeyName: !Ref KeyName
Volumes:
-
Device: "/dev/sdf"
VolumeId: !Ref ReportPortalEBS
NetworkInterfaces:
- GroupSet:
- !Ref SSHSecurityGroup
DeviceIndex: "0"
DeleteOnTermination: true
SubnetId: !Ref PrivateSubnetOne
Tags:
- Key: Name
Value: "ReportPortal EC2"
UserData:
"Fn::Base64": !Sub |
#!/bin/bash
yum update -y aws-cfn-bootstrap # good practice - always do this.
yum update -y
pvcreate /dev/xvdf
vgcreate vg0 /dev/xvdf
lvcreate -l 100%FREE -n data vg0
mkfs.ext4 /dev/vg0/data
mkdir /var/data
echo "/dev/mapper/vg0-data /var/data ext4 defaults 0 2" >> /etc/fstab
mount -a
/opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource ReportPortalEC2 --configsets reportportal --region ${AWS::Region}
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource ReportPortalEC2 --region ${AWS::Region}
CreationPolicy:
ResourceSignal:
Count: "1"
Timeout: PT15M
Metadata:
AWS::CloudFormation::Init:
configSets:
reportportal:
- "configure-cfn"
- "install_docker"
- "config_reportportal"
- "install_reportportal"
configure-cfn:
files:
/etc/cfn/hooks.d/cfn-auto-reloader.conf:
content: !Sub |
[cfn-auto-reloader-hook]
triggers=post.update
path=Resources.ReportPortalEC2.Metadata.AWS::CloudFormation::Init
action=/opt/aws/bin/cfn-init -v --stack ${AWS::StackName} --resource ReportPortalEC2 --configsets reportportal --region ${AWS::Region}
mode: "000400"
owner: root
group: root
/etc/cfn/cfn-hup.conf:
content: !Sub |
[main]
stack=${AWS::StackId}
region=${AWS::Region}
verbose=true
interval=5
mode: "000400"
owner: root
group: root
services:
sysvinit:
cfn-hup:
enabled: "true"
ensureRunning: "true"
files:
- "/etc/cfn/cfn-hup.conf"
- "/etc/cfn/hooks.d/cfn-auto-reloader.conf"
install_docker:
packages:
yum:
docker: []
commands:
docker_for_ec2_user:
command: usermod -a -G docker ec2-user
services:
sysvinit:
docker:
enabled: "true"
ensureRunning: "true"
config_reportportal:
files:
/home/ec2-user/reportportal/.env:
content: !Sub |
DB_HOST=${ReportPortalDB.Endpoint.Address}
DATABASE_NAME=${DBName}
DATABASE_USER=${DBUser}
DATABASE_PASSWORD=${DBPassword}
BUCKET_URL=https://${S3BucketName}.s3.${AWS::Region}.amazonaws.com
SHORT_BUCKET_HOST=${S3BucketName}.s3.${AWS::Region}.amazonaws.com
AWS_REGION=${AWS::Region}
BUCKET_ACCESS_KEY=${S3UserKey}
BUCKET_SECRET_KEY=${S3UserKey.SecretAccessKey}
mode: "000400"
owner: root
group: root
install_reportportal:
files:
/home/ec2-user/reportportal/reportportal.sh:
content: !Sub |
#!/bin/bash
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
sysctl -w vm.max_map_count=262144
curl https://raw.githubusercontent.com/chhatbarjignesh/reportportal-aws-cfn/v${ReportPortalVersion}/docker-compose.yml -o docker-compose.yml
sudo mkdir -p /var/data/elasticsearch/
sudo chmod g+rwx /var/data/elasticsearch/
chown -R 1000:1000 /var/data/elasticsearch/
docker-compose -p reportportal up -d --force-recreate
mode: "000400"
owner: root
group: root
commands:
run_rp:
cwd: /home/ec2-user/reportportal
command: sudo sh reportportal.sh
# Subnet Group for RDS instance
DBSubnetGroup:
Properties:
DBSubnetGroupDescription: DBSubnetGroup for RDS instances
SubnetIds:
- Ref: PrivateSubnetOne
- Ref: PrivateSubnetTwo
Type: AWS::RDS::DBSubnetGroup
# Security Group for RDS and 5432 Port from the VPC only
DBSecurityGroup:
Type: "AWS::EC2::SecurityGroup"
Properties:
VpcId: !Ref VPC
GroupDescription: "Allows RDS access"
GroupName: "Allows RDS access"
SecurityGroupIngress:
- CidrIp: "10.0.0.0/16"
Description: "Access RDS from within VPC"
FromPort: 5432
ToPort: 5432
IpProtocol: tcp
# ReportPortal RDS postgres DB
ReportPortalDB:
Type: "AWS::RDS::DBInstance"
DependsOn: S3User
Properties:
DBInstanceIdentifier: "reportportal-db"
DBName: !Ref DBName
AllocatedStorage: !Ref DBAllocatedStorage
DBInstanceClass: !FindInMap [InstanceSize, !Ref EnvironmentSize, DB]
StorageType: "gp2"
Engine: "postgres"
EngineVersion: !Ref DBEngineVersion
MasterUsername: !Ref DBUser
MasterUserPassword: !Ref DBPassword
Tags:
- Key: Name
Value: "ReportPortal RDS PostgreSQL"
VPCSecurityGroups:
- !Ref DBSecurityGroup
DBSubnetGroupName: !Ref DBSubnetGroup
# ReportPortal S3 Access Role
ReportPortalS3Role:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service:
- s3.amazonaws.com
Action:
- "sts:AssumeRole"
# ReportPortal S3 Username
S3User:
Type: "AWS::IAM::User"
DependsOn: ReportPortalS3Role
S3UserKey:
Type: "AWS::IAM::AccessKey"
Properties:
UserName: !Ref S3User
# ReportPortal S3 policy
S3ReportPortalPolicy:
Type: "AWS::IAM::Policy"
Properties:
PolicyName: S3RPPolicy
PolicyDocument:
Statement:
- Effect: Allow
Action:
- "s3:*"
Resource:
- !Join ['', ['arn:aws:s3:::', !Ref S3BucketName]]
- !Join ['', ['arn:aws:s3:::', !Ref S3BucketName, '/*']]
Roles:
- !Ref ReportPortalS3Role
Users:
- !Ref S3User
# Security Group for Application Load Balancer
ALBSecurityGroup:
Type: "AWS::EC2::SecurityGroup"
Properties:
VpcId: !Ref VPC
GroupDescription: Enable HTTP/HTTPS access
SecurityGroupIngress:
- IpProtocol: tcp
CidrIp: 0.0.0.0/0
FromPort: 443
ToPort: 443
- IpProtocol: tcp
CidrIp: 0.0.0.0/0
FromPort: 80
ToPort: 80
Tags:
- Key: Name
Value: "ReportPortal ALB SG"
# ReportPortal Application Load Balancer
WebAppALB:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
IpAddressType: ipv4
Scheme: internet-facing
SecurityGroups:
- !Ref ALBSecurityGroup
Subnets:
- !Ref PublicSubnetOne
- !Ref PublicSubnetTwo
Tags:
- Key: Name
Value: "ReportPortal ALB"
Type: application
# ReportPortal ALB Target Group for HTTP
WebAppTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
Port: 8080
Protocol: "HTTP"
VpcId: !Ref VPC
Targets:
- Id: !Ref ReportPortalEC2
HealthCheckIntervalSeconds: 30
HealthCheckPath: /ui/
HealthCheckPort: "8080"
HealthCheckProtocol: HTTP
HealthCheckTimeoutSeconds: 5
HealthyThresholdCount: 2
Tags:
- Key: Name
Value: "ReportPortal ALB TG HTTP"
# ReportPortal ALB Listener for HTTP
Listener:
Type: AWS::ElasticLoadBalancingV2::Listener
Condition: DeployWithoutSSL
Properties:
DefaultActions:
- Type: forward
TargetGroupArn:
Ref: WebAppTargetGroup
LoadBalancerArn:
Ref: WebAppALB
Port: 80
Protocol: HTTP
# #ReportPortal ALB Listener for HTTPS
SecureListener:
Type: AWS::ElasticLoadBalancingV2::Listener
Condition: DeployWithSSL
Properties:
DefaultActions:
- Type: forward
TargetGroupArn:
Ref: WebAppTargetGroup
LoadBalancerArn:
Ref: WebAppALB
Port: 443
Protocol: HTTPS
Certificates:
- CertificateArn: !Ref ReportPortalCert
DnsRecord:
Type: AWS::Route53::RecordSet
Condition: DeployWithDomain
Properties:
Comment: DNS name for my instance.
HostedZoneName: !Sub '${DomainName}.'
Name: !Ref ReportPortalDomain
Type: CNAME
TTL: '60'
ResourceRecords:
- !GetAtt WebAppALB.DNSName
Outputs:
ReportPortalEndPointSSL: # Output if Enpoint is SSL with Domain Name
Condition: DeployWithSSLAndDomain
Description: Access URL for Reportportal
Value: !Join ["", ["https://", !Ref ReportPortalDomain]]
ReportPortalEndPointWithoutDomain: # Output if Endpont is with Domain name and not SSL
Condition: DeployWithoutSSLAndWithoutDomain
Description: Access URL for Reportportal
Value: !Join ["", ["http://", !GetAtt WebAppALB.DNSName]]
ReportPortalEndPointWithoutSSL: # Output if it is without domain and withouth SSL
Condition: DeployWithoutSSLAndWithDomain
Description: Access URL for Reportportal
Value: !Join ["", ["http://", !Ref ReportPortalDomain]]
LoginCredentials: # Login credentials are the default one
Description: Login Credentials
Value: "UserName: superadmin, password: erebus"