-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path2-nodes-dc.yaml
209 lines (209 loc) · 5.04 KB
/
2-nodes-dc.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
AWSTemplateFormatVersion: 2010-09-09
Description: Serves a Jira Data Center cluster without a load balancer
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:
jira1:
Type: AWS::EC2::Instance
Properties:
SecurityGroupIds:
- Ref: SshSecurityGroup
- Ref: RmiSecurityGroup
- Ref: TomcatSecurityGroup
- Ref: SubnetSecurityGroup
InstanceType: !Ref JiraInstanceType
SubnetId:
Ref: Subnet
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
jira2:
Type: AWS::EC2::Instance
Properties:
SecurityGroupIds:
- Ref: SshSecurityGroup
- Ref: RmiSecurityGroup
- Ref: TomcatSecurityGroup
- Ref: SubnetSecurityGroup
InstanceType: !Ref JiraInstanceType
SubnetId:
Ref: Subnet
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
SharedHome:
Type: AWS::EC2::Instance
Properties:
SecurityGroupIds:
- Ref: SshSecurityGroup
- Ref: SubnetSecurityGroup
InstanceType: !Ref JiraInstanceType
SubnetId:
Ref: Subnet
KeyName:
Ref: KeyName
ImageId: !Ref Ami
Tags:
-
Key: jpt-shared-home
Value: true
IamInstanceProfile: !Ref InstanceProfile
BlockDeviceMappings:
-
DeviceName: /dev/sda1
Ebs:
VolumeSize: !Ref JiraVolumeSize
VolumeType: gp2
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
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
RmiSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: Vpc
GroupDescription: Enables RMI access
SecurityGroupIngress:
-
IpProtocol: tcp
FromPort: 40001
ToPort: 40001
CidrIp: 0.0.0.0/0
-
IpProtocol: tcp
FromPort: 40011
ToPort: 40011
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
MountTargetSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: Vpc
GroupDescription: Security group for mount target
SecurityGroupIngress:
-
IpProtocol: tcp
FromPort: 2049
ToPort: 2049
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
SubnetSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId:
Ref: Vpc
GroupDescription: Enable communication between nodes
SecurityGroupIngress:
-
IpProtocol: tcp
FromPort: 0
ToPort: 65535
CidrIp: 10.0.0.0/24