forked from weka/terraform-azure-weka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
299 lines (258 loc) · 7.34 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
variable "prefix" {
type = string
description = "The prefix for all the resource names. For example, the prefix for your system name."
default = "weka"
}
variable "rg_name" {
type = string
description = "A predefined resource group in the Azure subscription."
}
variable "vnet_rg_name" {
type = string
description = "Resource group name of vnet"
}
variable "vm_username" {
type = string
description = "The user name for logging in to the virtual machines."
default = "weka"
}
variable "instance_type" {
type = string
description = "The virtual machine type (sku) to deploy."
default = "Standard_L8s_v3"
}
variable "vnet_name" {
type = string
description = "The virtual network name."
}
variable "subnet_name" {
type = string
description = "The subnet name."
}
variable "cluster_size" {
type = number
description = "The number of virtual machines to deploy."
default = 6
validation {
condition = var.cluster_size >= 6
error_message = "Cluster size should be at least 6."
}
}
variable "source_image_id" {
type = string
default = "/communityGalleries/WekaIO-d7d3f308-d5a1-4c45-8e8a-818aed57375a/images/ubuntu20.04/versions/latest"
description = "Use weka custom image, ubuntu 20.04 with kernel 5.4 and ofed 5.8-1.1.2.1"
}
variable "sg_id" {
type = string
description = "The security group id."
}
variable "subnet_delegation" {
type = string
description = "Subnet delegation enables you to designate a specific subnet for an Azure PaaS service"
}
variable "weka_version" {
type = string
description = "The Weka version to deploy."
default = "4.2.0.142"
}
variable "get_weka_io_token" {
type = string
description = "The token to download the Weka release from get.weka.io."
default = ""
sensitive = true
}
variable "cluster_name" {
type = string
description = "The cluster name."
default = "poc"
}
variable "tags_map" {
type = map(string)
default = {"env": "dev", "creator": "tf"}
description = "A map of tags to assign the same metadata to all resources in the environment. Format: key:value."
}
variable "ssh_public_key" {
type = string
description = "The path to the VM public key. If it is not set, the key is auto-generated. If it is set, also set the ssh_private_key."
default = null
}
variable "ssh_private_key" {
type = string
description = "The path to the VM private key. If it is not set, the key is auto-generated. If it is set, also set the ssh_private_key. The private key used for connecting to the deployed virtual machines to initiate the clusterization of Weka."
default = null
}
variable "private_network" {
type = bool
default = false
description = "Determines whether to enable a private or public network. The default is public network."
}
variable "install_weka_url" {
type = string
description = "The URL of the Weka release download tar file."
default = ""
}
variable "apt_repo_url" {
type = string
description = "The URL of the apt private repository."
default = ""
}
variable "private_dns_zone_name" {
type = string
description = "The private DNS zone name."
default = null
}
variable "obs_name" {
type = string
default = ""
description = "Name of existing obs storage account"
}
variable "obs_container_name" {
type = string
default = ""
description = "Name of existing obs conatiner name"
}
variable "set_obs_integration" {
type = bool
default = false
description = "Determines whether to enable object stores integration with the Weka cluster. Set true to enable the integration."
}
variable "blob_obs_access_key" {
type = string
description = "The access key of the existing Blob object store container."
sensitive = true
default = ""
}
variable "tiering_ssd_percent" {
type = number
default = 20
description = "When set_obs_integration is true, this variable sets the capacity percentage of the filesystem that resides on SSD. For example, for an SSD with a total capacity of 20GB, and the tiering_ssd_percent is set to 20, the total available capacity is 100GB."
}
variable "container_number_map" {
type = map(object({
compute = number
drive = number
frontend = number
nvme = number
nics = number
memory = string
}))
description = "Maps the number of objects and memory size per machine type."
default = {
Standard_L8s_v3 = {
compute = 1
drive = 1
frontend = 1
nvme = 1
nics = 4
memory = "31GB"
},
Standard_L16s_v3 = {
compute = 4
drive = 2
frontend = 1
nvme = 2
nics = 8
memory = "72GB"
},
Standard_L32s_v3 = {
compute = 4
drive = 2
frontend = 1
nvme = 4
nics = 8
memory = "189GB"
},
Standard_L48s_v3 = {
compute = 3
drive = 3
frontend = 1
nvme = 6
nics = 8
memory = "306GB"
},
Standard_L64s_v3 = {
compute = 4
drive = 2
frontend = 1
nvme = 8
nics = 8
memory = "418GB"
}
}
}
variable "default_disk_size" {
type = number
default = 48
description = "The default disk size."
}
variable "traces_per_ionode" {
default = 10
type = number
description = "The number of traces per ionode. Traces are low-level events generated by Weka processes and are used as troubleshooting information for support purposes."
}
variable "subscription_id" {
type = string
description = "The subscription id for the deployment."
}
variable "protection_level" {
type = number
default = 2
description = "Cluster data protection level."
validation {
condition = var.protection_level == 2 || var.protection_level == 4
error_message = "Allowed protection_level values: [2, 4]."
}
}
variable "stripe_width" {
type = number
default = -1
description = "Stripe width = cluster_size - protection_level - 1 (by default)."
validation {
condition = var.stripe_width == -1 || var.stripe_width >= 3 && var.stripe_width <= 16
error_message = "The stripe_width value can take values from 3 to 16."
}
}
variable "hotspare" {
type = number
default = 1
description = "Hot-spare value."
}
variable "function_app_log_level" {
type = number
default = 1
description = "Log level for function app (from -1 to 5). See https://github.com/rs/zerolog#leveled-logging"
validation {
condition = var.function_app_log_level >= -1 && var.function_app_log_level <= 5
error_message = "Allowed values for log level are from -1 to 5."
}
}
variable "function_app_storage_account_prefix" {
type = string
description = "Weka storage account name prefix"
default = "weka"
}
variable "function_app_storage_account_container_prefix" {
type = string
description = "Weka storage account container name prefix"
default = "weka-tf-functions-deployment-"
}
variable "function_app_version" {
type = string
description = "Function app code version (hash)"
default = "caff19ed8651de36891b0c99e330c006"
}
variable "function_app_dist" {
type = string
description = "Function app code dist"
default = "release"
validation {
condition = contains(["dev", "release"], var.function_app_dist)
error_message = "Valid value is one of the following: dev, release."
}
}
variable "install_cluster_dpdk" {
type = bool
default = true
description = "Install weka cluster with DPDK"
}