forked from SUSE/ha-sap-terraform-deployments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
522 lines (439 loc) · 16 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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
#
# Libvirt related variables
#
variable "qemu_uri" {
description = "URI to connect with the qemu-service."
default = "qemu:///system"
}
variable "storage_pool" {
description = "libvirt storage pool name for VM disks"
type = string
default = "default"
}
variable "network_name" {
description = "Already existing virtual network name. If it's not provided a new one will be created"
type = string
default = ""
}
variable "iprange" {
description = "IP range of the isolated network (it must be provided even when the network_name is given, due to terraform-libvirt-provider limitations we cannot get the current network data)"
type = string
}
variable "isolated_network_bridge" {
description = "A name for the isolated virtual network bridge device. It must be no longer than 15 characters. Leave empty to have it auto-generated by libvirt."
type = string
default = ""
}
variable "source_image" {
description = "Source image used to boot the machines (qcow2 format). It's possible to specify the path to a local (relative to the machine running the terraform command) image or a remote one. Remote images have to be specified using HTTP(S) urls for now. Specific node images have preference over this value"
type = string
default = ""
}
variable "volume_name" {
description = "Already existing volume name used to boot the machines. It must be in the same storage pool. It's only used if source_image is not provided. Specific node images have preference over this value"
type = string
default = ""
}
variable "public_key_location" {
description = "Path to a SSH public key used to connect to the created machines"
type = string
default = "~/.ssh/id_rsa.pub"
}
# Deployment variables
#
variable "reg_code" {
description = "If informed, register the product using SUSEConnect"
default = ""
}
variable "reg_email" {
description = "Email used for the registration"
default = ""
}
# The module format must follow SUSEConnect convention:
# <module_name>/<product_version>/<architecture>
# Example: Suggested modules for SLES for SAP 15
# - sle-module-basesystem/15/x86_64
# - sle-module-desktop-applications/15/x86_64
# - sle-module-server-applications/15/x86_64
# - sle-ha/15/x86_64 (Need the same regcode as SLES for SAP)
# - sle-module-sap-applications/15/x86_64
variable "reg_additional_modules" {
description = "Map of the modules to be registered. Module name = Regcode, when needed."
type = map(string)
default = {}
}
# Repository url used to install development versions of HA/SAP deployment packages
# The latest RPM packages can be found at:
# https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:devel/{YOUR SLE VERSION}
# Contains the salt formulas rpm packages.
variable "ha_sap_deployment_repo" {
description = "Repository url used to install development versions of HA/SAP deployment packages. If the SLE version is not present in the URL, it will be automatically detected"
type = string
default = ""
}
variable "additional_packages" {
description = "extra packages which should be installed"
type = list
default = []
}
variable "provisioner" {
description = "Used provisioner option. Available options: salt. Let empty to not use any provisioner"
default = "salt"
}
variable "provisioning_log_level" {
description = "Provisioning process log level. For salt: https://docs.saltstack.com/en/latest/ref/configuration/logging/index.html"
type = string
default = "error"
}
variable "background" {
description = "Run the provisioner execution in background if set to true finishing terraform execution"
type = bool
default = false
}
#
# Hana related variables
variable "hana_count" {
description = "Number of hana nodes"
type = number
default = 2
}
variable "hana_source_image" {
description = "Source image used to boot the hana machines (qcow2 format). It's possible to specify the path to a local (relative to the machine running the terraform command) image or a remote one. Remote images have to be specified using HTTP(S) urls for now."
type = string
default = ""
}
variable "hana_volume_name" {
description = "Already existing volume name used to boot the hana machines. It must be in the same storage pool. It's only used if source_image is not provided"
type = string
default = ""
}
variable "hana_node_vcpu" {
description = "Number of CPUs for the HANA machines"
type = number
default = 4
}
variable "hana_node_memory" {
description = "Memory (in MBs) for the HANA machines"
type = number
default = 32678
}
variable "hana_node_disk_size" {
description = "Disk size (in bytes) for the HANA machines"
type = number
default = 68719476736
}
variable "hana_ips" {
description = "ip addresses to set to the hana nodes"
type = list(string)
default = []
}
variable "hana_inst_media" {
description = "URL of the NFS share where the SAP HANA software installer is stored. This media shall be mounted in `hana_inst_folder`"
type = string
}
variable "hana_inst_folder" {
description = "Folder where SAP HANA installation files are mounted"
type = string
default = "/sapmedia/HANA"
}
variable "hana_platform_folder" {
description = "Path to the hana platform media, relative to the 'hana_inst_media' mounting point"
type = string
default = ""
}
variable "hana_sapcar_exe" {
description = "Path to the sapcar executable, relative to the 'hana_inst_media' mounting point"
type = string
default = ""
}
variable "hana_archive_file" {
description = "Path to the HANA database server installation SAR archive or HANA platform archive file in zip or rar format, relative to the 'hana_inst_master' mounting point. Use this parameter if the hana media archive is not already extracted"
type = string
default = ""
}
variable "hana_extract_dir" {
description = "Absolute path to folder where SAP HANA archive will be extracted"
type = string
default = "/sapmedia/HANA"
}
variable "hana_fstype" {
description = "Filesystem type to use for HANA"
type = string
default = "xfs"
}
variable "hana_cluster_vip" {
description = "IP address used to configure the hana cluster floating IP"
type = string
default = ""
}
variable "hana_cluster_sbd_enabled" {
description = "Enable sbd usage in the hana HA cluster"
type = bool
default = true
}
variable "hana_ha_enabled" {
description = "Enable HA cluster in top of HANA system replication"
type = bool
default = true
}
variable "hana_active_active" {
description = "Enable an Active/Active HANA system replication setup"
type = bool
default = false
}
variable "hana_cluster_vip_secondary" {
description = "IP address used to configure the hana cluster floating IP for the secondary node in an Active/Active mode. Let empty to use an auto generated address"
type = string
default = ""
}
variable "scenario_type" {
description = "Deployed scenario type. Available options: performance-optimized, cost-optimized"
default = "performance-optimized"
}
# SBD related variables
# In order to enable SBD, an ISCSI server is needed as right now is the unique option
# All the clusters will use the same mechanism
variable "sbd_storage_type" {
description = "Choose the SBD storage type. Options: iscsi, shared-disk"
type = string
default = "shared-disk"
}
variable "iscsi_vcpu" {
description = "Number of CPUs for the iSCSI server"
type = number
default = 2
}
variable "iscsi_memory" {
description = "Memory size (in MBs) for the iSCSI server"
type = number
default = 4096
}
variable "sbd_disk_size" {
description = "Disk size (in bytes) for the SBD disk. It's used to create the ISCSI server disk too"
type = number
default = 10737418240
}
variable "iscsi_lun_count" {
description = "Number of LUN (logical units) to serve with the iscsi server. Each LUN can be used as a unique sbd disk"
default = 3
}
variable "iscsi_source_image" {
description = "Source image used to boot the iscsi machines (qcow2 format). It's possible to specify the path to a local (relative to the machine running the terraform command) image or a remote one. Remote images have to be specified using HTTP(S) urls for now."
type = string
default = ""
}
variable "iscsi_volume_name" {
description = "Already existing volume name used to boot the iscsi machines. It must be in the same storage pool. It's only used if iscsi_source_image is not provided"
type = string
default = ""
}
variable "iscsi_srv_ip" {
description = "iSCSI server address (only used if shared_storage_type is iscsi)"
type = string
default = ""
}
#
# Monitoring related variables
#
variable "monitoring_enabled" {
description = "Enable the host to be monitored by exporters, e.g node_exporter"
type = bool
default = false
}
variable "monitoring_source_image" {
description = "Source image used to boot the monitoring machines (qcow2 format). It's possible to specify the path to a local (relative to the machine running the terraform command) image or a remote one. Remote images have to be specified using HTTP(S) urls for now."
type = string
default = ""
}
variable "monitoring_volume_name" {
description = "Already existing volume name used to boot the monitoring machines. It must be in the same storage pool. It's only used if monitoring_source_image is not provided"
type = string
default = ""
}
variable "monitoring_vcpu" {
description = "Number of CPUs for the monitor machine"
type = number
default = 4
}
variable "monitoring_memory" {
description = "Memory (in MBs) for the monitor machine"
type = number
default = 4096
}
variable "monitoring_srv_ip" {
description = "Monitoring server address"
type = string
default = ""
}
#
# Netweaver related variables
#
variable "netweaver_enabled" {
description = "Enable SAP Netweaver deployment"
type = bool
default = false
}
variable "netweaver_source_image" {
description = "Source image used to boot the netweaver machines (qcow2 format). It's possible to specify the path to a local (relative to the machine running the terraform command) image or a remote one. Remote images have to be specified using HTTP(S) urls for now."
type = string
default = ""
}
variable "netweaver_volume_name" {
description = "Already existing volume name used to boot the netweaver machines. It must be in the same storage pool. It's only used if netweaver_source_image is not provided"
type = string
default = ""
}
variable "netweaver_node_vcpu" {
description = "Number of CPUs for the NetWeaver machines"
type = number
default = 4
}
variable "netweaver_node_memory" {
description = "Memory (in MBs) for the NetWeaver machines"
type = number
default = 8192
}
variable "netweaver_shared_disk_size" {
description = "Shared disk size (in bytes) for the NetWeaver machines"
type = number
default = 68719476736
}
variable "netweaver_ips" {
description = "IP addresses of the netweaver nodes"
type = list(string)
default = []
}
variable "netweaver_virtual_ips" {
description = "IP addresses of the netweaver nodes"
type = list(string)
default = []
}
variable "netweaver_cluster_sbd_enabled" {
description = "Enable sbd usage in the netweaver HA cluster"
type = bool
default = true
}
variable "netweaver_nfs_share" {
description = "URL of the NFS share where /sapmnt and /usr/sap/{sid}/SYS will be mounted. This folder must have the sapmnt and usrsapsys folders"
type = string
default = ""
}
variable "netweaver_product_id" {
description = "Netweaver installation product. Even though the module is about Netweaver, it can be used to install other SAP instances like S4/HANA"
type = string
default = "NW750.HDB.ABAPHA"
}
variable "netweaver_inst_media" {
description = "URL of the NFS share where the SAP Netweaver software installer is stored. This media shall be mounted in `netweaver_inst_folder`"
type = string
default = ""
}
variable "netweaver_inst_folder" {
description = "Folder where SAP Netweaver installation files are mounted"
type = string
default = "/sapmedia/NW"
}
variable "netweaver_extract_dir" {
description = "Extraction path for Netweaver media archives of SWPM and netweaver additional dvds"
type = string
default = "/sapmedia/NW"
}
variable "netweaver_swpm_folder" {
description = "Netweaver software SWPM folder, path relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_sapcar_exe" {
description = "Path to sapcar executable, relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_swpm_sar" {
description = "SWPM installer sar archive containing the installer, path relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_sapexe_folder" {
description = "Software folder where needed sapexe `SAR` executables are stored (sapexe, sapexedb, saphostagent), path relative from the `netweaver_inst_media` mounted point"
type = string
default = ""
}
variable "netweaver_additional_dvds" {
description = "Software folder with additional SAP software needed to install netweaver (NW export folder and HANA HDB client for example), path relative from the `netweaver_inst_media` mounted point"
type = list
default = []
}
variable "netweaver_ha_enabled" {
description = "Enable HA cluster in top of Netweaver ASCS and ERS instances"
type = bool
default = true
}
#
# DRBD related variables
#
variable "drbd_enabled" {
description = "Enable the drbd cluster for nfs"
type = bool
default = false
}
variable "drbd_source_image" {
description = "Source image used to bot the drbd machines (qcow2 format). It's possible to specify the path to a local (relative to the machine running the terraform command) image or a remote one. Remote images have to be specified using HTTP(S) urls for now."
type = string
default = ""
}
variable "drbd_volume_name" {
description = "Already existing volume name boot to create the drbd machines. It must be in the same storage pool. It's only used if drbd_source_image is not provided"
type = string
default = ""
}
variable "drbd_node_vcpu" {
description = "Number of CPUs for the DRBD machines"
type = number
default = 1
}
variable "drbd_node_memory" {
description = "Memory (in MBs) for the DRBD machines"
type = number
default = 1024
}
variable "drbd_disk_size" {
description = "Disk size (in bytes) for the DRBD machines"
type = number
default = 10737418240
}
variable "drbd_ips" {
description = "IP addresses of the drbd nodes"
type = list(string)
default = []
}
variable "drbd_cluster_vip" {
description = "IP address used to configure the drbd cluster floating IP. It must be in other subnet than the machines!"
type = string
default = ""
}
variable "drbd_cluster_sbd_enabled" {
description = "Enable sbd usage in the drbd HA cluster"
type = bool
default = true
}
#
# Specific QA variables
#
variable "qa_mode" {
description = "Enable test/qa mode (disable extra packages usage not coming in the image)"
type = bool
default = false
}
variable "hwcct" {
description = "Execute HANA Hardware Configuration Check Tool to bench filesystems"
type = bool
default = false
}
#
# Pre deployment
#
variable "pre_deployment" {
description = "Enable pre deployment local execution. Only available for clients running Linux"
type = bool
default = false
}