-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheks_rds_zabbix.yaml
292 lines (255 loc) · 9.82 KB
/
eks_rds_zabbix.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
tosca_definitions_version: cloudify_dsl_1_3
description: >
Level3 AV POC - install EKS, RDS, and Zabbix on top and connect them
together. Use an existing VPC and other relevant network resources.
imports:
- http://cloudify.co/spec/cloudify/6.3.0/types.yaml
inputs:
aws_region:
type: string
display_label: AWS Region
description: The AWS region to create the VPC and resources in
default: us-west-1
constraints:
- valid_values:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- eu-central-1
- eu-west-1
- eu-west-2
- eu-south-1
- eu-west-3
- eu-north-1
- af-south-1
- ap-east-1
- ap-south-1
- ap-northeast-3
- ap-northeast-2
- ap-southeast-1
- ap-southeast-2
- ap-northeast-1
- ca-central-1
- cn-north-1
- cn-northwest-1
- me-south-1
- sa-east-1
primary_availability_zone:
type: string
display_label: Primary availability zone
description: The primary availability zone to deploy primary public and private subnets in
default: { concat: [ { get_input: aws_region }, 'a' ] }
secondary_availability_zone:
type: string
display_label: Secondary availability zone
description: The secondary availability zone to deploy secondary public and private subnets in
default: { concat: [ { get_input: aws_region }, 'c' ] }
vpc_id:
type: string
display_label: VPC ID ARN
description: The ARN of the VPC which the resources will be deployed to
primary_private_subnet_id:
type: string
display_label: Primary Private Subnet ID
description: The ID of primary private subnet of VPC
secondary_private_subnet_id:
type: string
display_label: Secondary Private Subnet ID
description: The ID of secondary private subnet of VPC
primary_public_subnet_id:
type: string
display_label: Primary Public Subnet ID
description: The ID of primary public subnet of VPC
secondary_public_subnet_id:
type: string
display_label: Secondary Public Subnet ID
description: The ID of secondary public subnet of VPC
primary_public_subnet_cidr:
type: string
display_label: Primary public subnet CIDR
description: The CIDR network for the primary public subnet
default: "10.0.1.0/24"
secondary_public_subnet_cidr:
type: string
display_label: Secondary public subnet CIDR
description: The CIDR network for the secondary public subnet
default: "10.0.2.0/24"
primary_private_subnet_cidr:
type: string
display_label: Primary private subnet CIDR
description: The CIDR network for the primary private subnet
default: "10.0.11.0/24"
secondary_private_subnet_cidr:
type: string
display_label: Secondary private subnet CIDR
description: The CIDR network for the secondary private subnet
default: "10.0.12.0/24"
gateway_management_security_group_id:
type: string
display_label: Gateway Management Security Group ID
description: The ID of a Gateway Management Security Group
customer_name:
type: string
display_label: Customer Name
description: The name of the customer. Used to tag resources in AWS.
default: Acme
eks_cluster_name:
type: string
display_label: EKS Cluster Name
description: The name of EKS cluster to be created
default: { concat: [ { get_input: customer_name }, "-cluster"] }
eks_nodegroup_name:
type: string
display_label: EKS NodeGroup Name
description: The name of EKS NodeGroup to be created
default: { concat: [ { get_input: customer_name }, "-ng"] }
kubernetes_version:
type: string
display_label: Kubernetes Version
description: The version of Kubernetes used for EKS cluster
default: '1.21'
service_account_name:
type: string
display_label: EKS Service Account Name
description: The name of EKS Cluster Service Account to be created
default: { string_lower: { concat: [ { get_input: customer_name }, "-sa"] } }
service_account_namespace:
type: string
display_label: EKS Service Account Namespace
description: The name of EKS Cluster Service Account namespace
default: default
rds_name:
type: string
display_label: RDS Instance Name
description: >
The name of RDS instance to be created.
Identifiers must begin with a letter; must contain only ASCII
letters, digits, and hyphens; and must not end with a hyphen or
contain two consecutive hyphens.
default: { concat: [ { get_input: customer_name }, "Rds"] }
vpc_subnet_1_cidr:
type: string
display_label: Subnet 1 CIDR
description: CIDR of Subnet 1 to be created for RDS
default: "10.0.3.0/24"
vpc_subnet_2_cidr:
type: string
display_label: Subnet 2 CIDR
description: CIDR of Subnet 2 to be created for RDS
default: "10.0.4.0/24"
rds_storage:
type: string
display_label: RDS Storage
description: The storage of RDS instance in GiB
default: 20
rds_master_username:
type: string
display_label: RDS Master Username
description: Master User name of RDS instance database
default: root
rds_master_user_password:
type: string
display_label: RDS Master User Password
description: Master User password of RDS instance database
default: StR0nGp4sSw0rD
zabbix_namespace:
type: string
display_label: Zabbix Namespace
default: monitoring
description: The namespace to install Zabbix into
node_templates:
# AWS EKS deployment
eks:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
external_resource: false
id: eks
blueprint_archive: https://github.com/Cloudify-PS/level3av-poc/archive/refs/heads/main.zip
main_file_name: eks.yaml
deployment:
id: eks
auto_inc_suffix: false
inputs:
customer_name: { get_input: customer_name }
aws_region: { get_input: aws_region }
eks_cluster_name: { get_input: eks_cluster_name }
eks_nodegroup_name: { get_input: eks_nodegroup_name }
kubernetes_version: { get_input: kubernetes_version }
service_account_name: { get_input: service_account_name }
service_account_namespace: { get_input: service_account_namespace }
private_subnet_01_id: { get_input: primary_private_subnet_id }
private_subnet_02_id: { get_input: secondary_private_subnet_id }
public_subnet_01_id: { get_input: primary_public_subnet_id }
public_subnet_02_id: { get_input: secondary_public_subnet_id }
security_group_id: { get_input: gateway_management_security_group_id }
# AWS RDS deployment
rds:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
external_resource: false
id: rds
blueprint_archive: https://github.com/Cloudify-PS/level3av-poc/archive/refs/heads/main.zip
main_file_name: rds.yaml
deployment:
id: rds
auto_inc_suffix: false
inputs:
customer_name: { get_input: customer_name }
aws_region: { get_input: aws_region }
rds_name: { get_input: rds_name }
vpc_id: { get_input: vpc_id }
vpc_subnet_1_cidr: { get_input: vpc_subnet_1_cidr }
vpc_subnet_1_az: { get_input: primary_availability_zone }
vpc_subnet_2_cidr: { get_input: vpc_subnet_2_cidr }
vpc_subnet_2_az: { get_input: secondary_availability_zone }
rds_availability_zone: { get_input: primary_availability_zone }
rds_storage: { get_input: rds_storage }
rds_master_username: { get_input: rds_master_username }
rds_master_user_password: { get_input: rds_master_user_password }
k8s_primary_public_subnet_cidr: { get_input: primary_public_subnet_cidr }
k8s_secondary_public_subnet_cidr: { get_input: secondary_public_subnet_cidr }
k8s_primary_private_subnet_cidr: { get_input: primary_private_subnet_cidr }
k8s_secondary_private_subnet_cidr: { get_input: secondary_private_subnet_cidr }
# Zabbix deployment
zabbix:
type: cloudify.nodes.ServiceComponent
properties:
resource_config:
blueprint:
external_resource: false
id: zabbix
blueprint_archive: https://github.com/Cloudify-PS/level3av-poc/archive/refs/heads/main.zip
main_file_name: zabbix.yaml
deployment:
id: zabbix
auto_inc_suffix: false
inputs:
namespace: { get_input: zabbix_namespace }
database_endpoint: { get_capability: [{ get_attribute: [rds, deployment, id] }, endpoint_address] }
kubernetes_endpoint: { get_capability: [{ get_attribute: [eks, deployment, id] }, endpoint] }
kubernetes_token: { get_capability: [{ get_attribute: [eks, deployment, id] }, token] }
kubernetes_ca: { get_capability: [{ get_attribute: [eks, deployment, id] }, ca_certificate] }
relationships:
- type: cloudify.relationships.depends_on
target: eks
- type: cloudify.relationships.depends_on
target: rds
outputs:
rds_endpoint:
description: RDS endpoint address
value:
concat:
- { get_capability: [{ get_attribute: [rds, deployment, id] }, endpoint_address] }
- ":"
- { get_capability: [{ get_attribute: [rds, deployment, id] }, endpoint_port] }
eks_endpoint:
description: EKS endpoint address
value: { get_capability: [{ get_attribute: [eks, deployment, id] }, endpoint] }
zabbix_endpoint:
description: The HTTP endpoint for accessing the Zabbix web interface
value: { get_capability: [{ get_attribute: [zabbix, deployment, id] }, zabbix_endpoint] }