-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathsingle-node.yaml
118 lines (118 loc) · 2.83 KB
/
single-node.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
AWSTemplateFormatVersion: 2010-09-09
Description: Serves JIRA Standalone with DB running on separate machine.
Parameters:
KeyName:
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance
Type: AWS::EC2::KeyPair::KeyName
ConstraintDescription: must be the name of an existing EC2 KeyPair.
InstanceProfile:
Type: String
Ami:
Type: String
JiraInstanceType:
Type: String
JiraVolumeSize:
Type: Number
DatabaseInstanceType:
Type: String
DatabaseVolumeSize:
Type: Number
Vpc:
Type: String
Subnet:
Type: String
Resources:
Database:
Type: AWS::EC2::Instance
Properties:
InstanceType: !Ref DatabaseInstanceType
SubnetId:
Ref: Subnet
SecurityGroupIds:
- Ref: SshSecurityGroup
- Ref: MySqlSecurityGroup
- Ref: PostgresSecurityGroup
KeyName:
Ref: KeyName
ImageId: !Ref Ami
Tags:
-
Key: jpt-database
Value: true
IamInstanceProfile: !Ref InstanceProfile
BlockDeviceMappings:
-
DeviceName: /dev/sda1
Ebs:
VolumeSize: !Ref DatabaseVolumeSize
VolumeType: gp2
JIRA:
Type: AWS::EC2::Instance
Properties:
InstanceType: !Ref JiraInstanceType
SubnetId:
Ref: Subnet
SecurityGroupIds:
- Ref: SshSecurityGroup
- Ref: TomcatSecurityGroup
KeyName:
Ref: KeyName
ImageId: !Ref Ami
Tags:
-
Key: jpt-jira
Value: true
IamInstanceProfile: !Ref InstanceProfile
BlockDeviceMappings:
-
DeviceName: /dev/sda1
Ebs:
VolumeSize: !Ref JiraVolumeSize
VolumeType: gp2
SshSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: Vpc
GroupDescription: Enables SSH access
SecurityGroupIngress:
-
IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 0.0.0.0/0
TomcatSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: Vpc
GroupDescription: Enables Tomcat HTTP access
SecurityGroupIngress:
-
IpProtocol: tcp
FromPort: 8080
ToPort: 8080
CidrIp: 0.0.0.0/0
MySqlSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: Vpc
GroupDescription: Enables MySql access
SecurityGroupIngress:
-
IpProtocol: tcp
FromPort: 3306
ToPort: 3306
CidrIp: 0.0.0.0/0
PostgresSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: Vpc
GroupDescription: Enables Postgres access
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 5432
ToPort: 5432
CidrIp: 0.0.0.0/0