-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
374 lines (313 loc) · 8.22 KB
/
variables.tf
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
variable "create" {
description = "Boolean to make module or not"
type = bool
default = true
}
variable "create_ansible" {
description = "Boolean to make module or not"
type = bool
default = true
}
########
# Label
########
variable "name" {
description = "The name of the deployment"
type = string
default = "polkadot-api"
}
variable "environment" {
description = "The environment"
type = string
default = ""
}
variable "namespace" {
description = "The namespace to deploy into"
type = string
default = ""
}
variable "stage" {
description = "The stage of the deployment"
type = string
default = ""
}
variable "network_name" {
description = "The network name, ie kusama / mainnet"
type = string
default = ""
}
variable "owner" {
description = "Owner of the infrastructure"
type = string
default = ""
}
variable "node_purpose" {
description = "What type of node are you deploying? (validator/library/truth)"
type = string
default = "library"
// validation {
// condition = var.node_purpose == "validator" || var.node_purpose == "library" || var.node_purpose == "truth"
// error_message = "The node_purpose value must be one of \"validator\", \"library\", or \"truth\"."
// }
}
#########
# Network
#########
variable "subnet_id" {
description = "The id of the subnet."
type = string
default = ""
}
variable "security_group_id" {
description = "The id of the security group to run in"
type = string
}
#####
# ec2
#####
variable "node_name" {
description = "Name of the node"
type = string
default = ""
}
variable "monitoring" {
description = "Boolean for cloudwatch"
type = bool
default = false
}
//variable "ebs_volume_size" {
// description = "EBS volume size"
// type = string
// default = 0
//}
variable "root_volume_size" {
description = "Root volume size"
type = string
default = 0
}
variable "instance_type" {
description = "Instance type"
type = string
default = "t2.micro"
}
//variable "volume_path" {
// description = "Volume path"
// type = string
// default = "/dev/xvdf"
//}
variable "public_key" {
description = "The public ssh key. key_name takes precidence"
type = string
default = ""
}
variable "private_key_path" {
description = "Path to private key"
type = string
default = ""
}
variable "key_name" {
description = "The name of the preexisting key to be used instead of the local public_key_path"
type = string
default = ""
}
variable "storage_driver_type" {
description = "Type of EBS storage the instance is using (nitro/standard)"
type = string
default = "standard"
}
variable "mount_volumes" {
description = "Bool to enable non-root volume mounting"
type = bool
default = false
}
#########
# Ansible
#########
variable "ssh_user" {
description = "Username for SSH"
type = string
default = "ubuntu"
}
## Enable flags
variable "node_exporter_enabled" {
description = "Bool to enable node exporter"
type = bool
default = true
}
variable "health_check_enabled" {
description = "Bool to enable client health check agent"
type = bool
default = true
}
variable "consul_enabled" {
description = "Bool to enable Consul"
type = bool
default = true
}
variable "source_of_truth_enabled" {
description = "Bool to enable SoT sync (for use with library nodes)"
type = bool
default = false
}
# Node exporter
variable "node_exporter_user" {
description = "User for node exporter"
type = string
default = "node_exporter_user"
}
variable "node_exporter_password" {
description = "Password for node exporter"
type = string
default = "node_exporter_password"
}
variable "node_exporter_url" {
description = "URL to Node Exporter binary"
type = string
default = "https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz"
}
variable "node_exporter_hash" {
description = "SHA256 hash of Node Exporter binary"
type = string
default = "b2503fd932f85f4e5baf161268854bf5d22001869b84f00fd2d1f57b51b72424"
}
# Client
variable "network_settings" {
description = "Map of network settings to apply. Use either this or set individual variables."
type = map(map(string))
default = null
}
variable "network_stub" {
description = "The stub name of the Polkadot chain (polkadot = polkadot, kusama = ksmcc3)"
type = string
default = "ksmcc3"
}
variable "polkadot_client_url" {
description = "URL to Polkadot client binary"
type = string
default = "https://github.com/w3f/polkadot/releases/download/v0.8.23/polkadot"
}
variable "polkadot_client_hash" {
description = "SHA256 hash of Polkadot client binary"
type = string
default = "cdf31d39ed54e66489d1afe74ed7549d5bcdf8ff479759e8fc476d17d069901e"
}
variable "polkadot_restart_enabled" {
description = "Bool to enable client restart cron job"
type = bool
default = false
}
variable "polkadot_restart_minute" {
description = "Client cron restart minute"
type = string
default = ""
}
variable "polkadot_restart_hour" {
description = "Client cron restart hour"
type = string
default = ""
}
variable "polkadot_restart_day" {
description = "Client cron restart day"
type = string
default = ""
}
variable "polkadot_restart_month" {
description = "Client cron restart month"
type = string
default = ""
}
variable "polkadot_restart_weekday" {
description = "Client cron restart weekday"
type = string
default = ""
}
variable "chain" {
description = "Which Polkadot chain to join"
type = string
default = "polkadot"
}
variable "chain_stub" {
description = "Short-name of the Polkadot chain to join, i.e. kusama = ksmm3, polkadot = polkadot."
type = string
default = "polkadot"
}
variable "sync_aws_access_key_id" {
description = "AWS access key ID for SoT sync"
type = string
default = ""
}
variable "sync_aws_secret_access_key" {
description = "AWS access key for SoT sync"
type = string
default = ""
}
variable "sync_region" {
description = "AWS region for SoT sync"
type = string
default = ""
}
variable "sync_bucket_uri" {
description = "S3 bucket URI for SoT sync"
type = string
default = null
}
variable "project" {
description = "Name of the project for node name"
type = string
default = "project"
}
variable "instance_count" {
description = "Iteration number for this instance"
type = string
default = "0"
}
variable "logging_filter" {
description = "String for polkadot logging filter"
type = string
default = "sync=trace,afg=trace,babe=debug"
}
variable "telemetry_url" {
description = "WSS URL for telemetry"
type = string
default = ""
}
variable "default_telemetry_enabled" {
description = "Bool to enable telemetry submission to telemetry.polkadot.io"
type = bool
default = false
}
variable "base_path" {
description = "Alternate base path for Polkadot client"
type = string
default = ""
}
variable "polkadot_additional_common_flags" {
description = "Optional common flags for Polkadot client"
type = string
default = ""
}
variable "polkadot_additional_validator_flags" {
description = "Optional validator flags for Polkadot client"
type = string
default = ""
}
variable "rpc_api_port" {
description = "Port number for the JSON RPC API"
type = string
default = "9933"
}
variable "wss_api_port" {
description = "Port number for the Websockets API"
type = string
default = "9944"
}
variable "health_check_port" {
description = "Port number for the health check"
type = string
default = "5500"
}
variable "polkadot_prometheus_port" {
description = "Port number for the Prometheus Metrics exporter built into the Polkadot client"
type = string
default = "9610"
}