-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.tf
436 lines (429 loc) · 43.9 KB
/
main.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
# Create an SSH key. The SSH key surfaces in the SoftLayer console under Devices > Manage > SSH Keys.
resource "ibm_compute_ssh_key" "ssh_compute_key" {
label = "${var.ssh_key_label}_${var.softlayer_username}"
notes = "${var.ssh_key_note} ${var.softlayer_username}"
public_key = "${var.ssh_public_key}"
}
# Create virtual servers with the SSH key.
resource "ibm_compute_vm_instance" "nfsservers" {
hostname = "nfssvr${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "1"
memory = "2048"
count = "${var.failover_master ? var.private_vlan_id > 0 ? 0 : 1 : 0}"
user_metadata = "#!/bin/bash\n\nrole=nfsserver\nproduct=${var.product}\ndomain=${var.domain_name}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "nfsservers-vlan" {
hostname = "nfssvr${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "1"
memory = "2048"
count = "${var.failover_master ? var.private_vlan_id > 0 ? 1 : 0 : 0}"
user_metadata = "#!/bin/bash\n\nrole=nfsserver\nproduct=${var.product}\ndomain=${var.domain_name}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = false
}
# Create bare metal servers with the SSH key.
resource "ibm_compute_bare_metal" "masters" {
hostname = "${var.prefix_master}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference_bare_metal}"
fixed_config_preset = "${var.fixed_config_preset}"
datacenter = "${var.datacenter_bare_metal}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
count = "${var.master_use_bare_metal ? 1 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=false\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=master\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n"
post_install_script_uri = "${var.post_install_script_uri}"
private_network_only = false
}
# Create virtual servers with the SSH key.
resource "ibm_compute_vm_instance" "masters" {
hostname = "${var.prefix_master}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.master_use_bare_metal ? 0 : var.image_id > 0 ? 0 : var.private_vlan_id > 0 ? 0 : 1}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=master\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "masters-image" {
hostname = "${var.prefix_master}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
image_id = "${var.image_id}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.master_use_bare_metal ? 0 : var.private_vlan_id > 0 ? 0 : var.image_id > 0 ? 1 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=master\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "masters-vlan" {
hostname = "${var.prefix_master}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.master_use_bare_metal ? 0 : var.image_id > 0 ? 0 : var.private_vlan_id > 0 ? 1 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=master\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "masters-vlan-image" {
hostname = "${var.prefix_master}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
image_id = "${var.image_id}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.master_use_bare_metal ? 0 : var.image_id > 0 && var.private_vlan_id > 0 ? 1 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=master\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "failovers" {
hostname = "${var.prefix_master}${count.index + 1}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.failover_master ? var.master_use_bare_metal ? 0 : var.image_id > 0 ? 0 : var.private_vlan_id > 0 ? 0 : 1 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=failover\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname)))}\nmasterprivateipaddress=${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private)))}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "failovers-image" {
hostname = "${var.prefix_master}${count.index + 1}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
image_id = "${var.image_id}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.failover_master ? var.master_use_bare_metal ? 0 : var.private_vlan_id > 0 ? 0 : var.image_id > 0 ? 1 : 0 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=failover\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname)))}\nmasterprivateipaddress=${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private)))}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "failovers-vlan" {
hostname = "${var.prefix_master}${count.index + 1}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.failover_master ? var.master_use_bare_metal ? 0 : var.image_id > 0 ? 0 : var.private_vlan_id > 0 ? 1 : 0 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=failover\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname)))}\nmasterprivateipaddress=${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private)))}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "failovers-vlan-image" {
hostname = "${var.prefix_master}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
image_id = "${var.image_id}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_master}"
network_speed = "${var.network_speed_master}"
cores = "${var.core_of_master}"
memory = "${var.memory_in_mb_master}"
count = "${var.failover_master ? var.master_use_bare_metal ? 0 : var.image_id > 0 && var.private_vlan_id > 0 ? 1 : 0 : 0}"
user_metadata = "#!/bin/bash\n\ndeclare -i numbercomputes=${var.number_of_compute + var.number_of_compute_bare_metal}\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nnfsipaddress=${join(" ",compact(concat(ibm_compute_vm_instance.nfsservers.*.ipv4_address_private, ibm_compute_vm_instance.nfsservers-vlan.*.ipv4_address_private)))}\nproduct=${var.product}\nversion=${var.version}\nrole=failover\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname)))}\nmasterprivateipaddress=${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private)))}\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = false
}
resource "ibm_compute_bare_metal" "computes" {
hostname = "${var.prefix_compute_bare_metal}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference_bare_metal}"
fixed_config_preset = "${var.fixed_config_preset}"
datacenter = "${var.datacenter_bare_metal}"
hourly_billing = "${var.hourly_billing_compute}"
network_speed = "${var.network_speed_compute}"
count = "${var.number_of_compute_bare_metal}"
user_metadata = "#!/bin/bash\n\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=compute\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=\"${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname, ibm_compute_vm_instance.failovers.*.hostname, ibm_compute_vm_instance.failovers-image.*.hostname, ibm_compute_vm_instance.failovers-vlan.*.hostname, ibm_compute_vm_instance.failovers-vlan-image.*.hostname)))}\"\nmasterprivateipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers.*.ipv4_address_private, ibm_compute_vm_instance.failovers-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address_private)))}\"\nmasterpublicipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.public_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address, ibm_compute_vm_instance.masters-image.*.ipv4_address, ibm_compute_vm_instance.masters-vlan.*.ipv4_address, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address, ibm_compute_vm_instance.failovers.*.ipv4_address, ibm_compute_vm_instance.failovers-image.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address)))}\"\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n"
post_install_script_uri = "${var.post_install_script_uri}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "computes" {
hostname = "${var.prefix_compute}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_compute}"
network_speed = "${var.network_speed_compute}"
cores = "${var.core_of_compute}"
memory = "${var.memory_in_mb_compute}"
count = "${var.private_vlan_id > 0 ? 0 : var.image_id > 0 ? 0 : var.number_of_compute}"
user_metadata = "#!/bin/bash\n\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=compute\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=\"${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname, ibm_compute_vm_instance.failovers.*.hostname, ibm_compute_vm_instance.failovers-image.*.hostname, ibm_compute_vm_instance.failovers-vlan.*.hostname, ibm_compute_vm_instance.failovers-vlan-image.*.hostname)))}\"\nmasterprivateipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers.*.ipv4_address_private, ibm_compute_vm_instance.failovers-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address_private)))}\"\nmasterpublicipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.public_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address, ibm_compute_vm_instance.masters-image.*.ipv4_address, ibm_compute_vm_instance.masters-vlan.*.ipv4_address, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address, ibm_compute_vm_instance.failovers.*.ipv4_address, ibm_compute_vm_instance.failovers-image.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address)))}\"\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = "${var.master_use_bare_metal ? false : var.use_intranet}"
}
resource "ibm_compute_vm_instance" "computes-image" {
hostname = "${var.prefix_compute}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
image_id = "${var.image_id}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_compute}"
network_speed = "${var.network_speed_compute}"
cores = "${var.core_of_compute}"
memory = "${var.memory_in_mb_compute}"
count = "${var.private_vlan_id > 0 ? 0 : var.image_id > 0 ? var.number_of_compute : 0 }"
user_metadata = "#!/bin/bash\n\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=compute\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=\"${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname, ibm_compute_vm_instance.failovers.*.hostname, ibm_compute_vm_instance.failovers-image.*.hostname, ibm_compute_vm_instance.failovers-vlan.*.hostname, ibm_compute_vm_instance.failovers-vlan-image.*.hostname)))}\"\nmasterprivateipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers.*.ipv4_address_private, ibm_compute_vm_instance.failovers-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address_private)))}\"\nmasterpublicipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.public_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address, ibm_compute_vm_instance.masters-image.*.ipv4_address, ibm_compute_vm_instance.masters-vlan.*.ipv4_address, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address, ibm_compute_vm_instance.failovers.*.ipv4_address, ibm_compute_vm_instance.failovers-image.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address)))}\"\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = "${var.master_use_bare_metal ? false : var.use_intranet}"
}
resource "ibm_compute_vm_instance" "computes-vlan" {
hostname = "${var.prefix_compute}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_compute}"
network_speed = "${var.network_speed_compute}"
cores = "${var.core_of_compute}"
memory = "${var.memory_in_mb_compute}"
count = "${var.private_vlan_id > 0 ? var.image_id > 0 ? 0 : var.number_of_compute : 0}"
user_metadata = "#!/bin/bash\n\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=compute\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=\"${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname, ibm_compute_vm_instance.failovers.*.hostname, ibm_compute_vm_instance.failovers-image.*.hostname, ibm_compute_vm_instance.failovers-vlan.*.hostname, ibm_compute_vm_instance.failovers-vlan-image.*.hostname)))}\"\nmasterprivateipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers.*.ipv4_address_private, ibm_compute_vm_instance.failovers-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address_private)))}\"\nmasterpublicipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.public_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address, ibm_compute_vm_instance.masters-image.*.ipv4_address, ibm_compute_vm_instance.masters-vlan.*.ipv4_address, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address, ibm_compute_vm_instance.failovers.*.ipv4_address, ibm_compute_vm_instance.failovers-image.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address)))}\"\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = "${var.master_use_bare_metal ? false : var.use_intranet}"
}
resource "ibm_compute_vm_instance" "computes-vlan-image" {
hostname = "${var.prefix_compute}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
image_id = "${var.image_id}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_compute}"
network_speed = "${var.network_speed_compute}"
cores = "${var.core_of_compute}"
memory = "${var.memory_in_mb_compute}"
count = "${var.private_vlan_id > 0 ? var.image_id > 0 ? var.number_of_compute :0 : 0}"
user_metadata = "#!/bin/bash\n\nuseintranet=${var.use_intranet}\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=compute\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=\"${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname, ibm_compute_vm_instance.failovers.*.hostname, ibm_compute_vm_instance.failovers-image.*.hostname, ibm_compute_vm_instance.failovers-vlan.*.hostname, ibm_compute_vm_instance.failovers-vlan-image.*.hostname)))}\"\nmasterprivateipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers.*.ipv4_address_private, ibm_compute_vm_instance.failovers-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address_private)))}\"\nmasterpublicipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.public_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address, ibm_compute_vm_instance.masters-image.*.ipv4_address, ibm_compute_vm_instance.masters-vlan.*.ipv4_address, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address, ibm_compute_vm_instance.failovers.*.ipv4_address, ibm_compute_vm_instance.failovers-image.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address)))}\"\nentitlement=${base64encode(var.entitlement)}\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = "${var.master_use_bare_metal ? false : var.use_intranet}"
}
resource "ibm_compute_vm_instance" "dehosts" {
hostname = "${var.prefix_dehost}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_compute}"
network_speed = "${var.network_speed_compute}"
cores = "${var.core_of_compute}"
memory = "${var.memory_in_mb_compute}"
count = "${var.product == "symphony" ? var.private_vlan_id > 0 ? 0 : var.number_of_dehost : 0}"
user_metadata = "#!/bin/bash\n\nuseintranet=false\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=symde\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=\"${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname, ibm_compute_vm_instance.failovers.*.hostname, ibm_compute_vm_instance.failovers-image.*.hostname, ibm_compute_vm_instance.failovers-vlan.*.hostname, ibm_compute_vm_instance.failovers-vlan-image.*.hostname)))}\"\nmasterprivateipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers.*.ipv4_address_private, ibm_compute_vm_instance.failovers-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address_private)))}\"\nmasterpublicipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.public_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address, ibm_compute_vm_instance.masters-image.*.ipv4_address, ibm_compute_vm_instance.masters-vlan.*.ipv4_address, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address, ibm_compute_vm_instance.failovers.*.ipv4_address, ibm_compute_vm_instance.failovers-image.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address)))}\"\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_network_only = false
}
resource "ibm_compute_vm_instance" "dehosts-vlan" {
hostname = "${var.prefix_dehost}${count.index}"
domain = "${var.domain_name}"
ssh_key_ids = ["${ibm_compute_ssh_key.ssh_compute_key.id}"]
os_reference_code = "${var.os_reference}"
datacenter = "${var.datacenter}"
hourly_billing = "${var.hourly_billing_compute}"
network_speed = "${var.network_speed_compute}"
cores = "${var.core_of_compute}"
memory = "${var.memory_in_mb_compute}"
count = "${var.product == "symphony" ? var.private_vlan_id > 0 ? var.number_of_dehost : 0 : 0}"
user_metadata = "#!/bin/bash\n\nuseintranet=false\ndomain=${var.domain_name}\nproduct=${var.product}\nversion=${var.version}\nrole=symde\nclusteradmin=${var.cluster_admin}\nclustername=${var.cluster_name}\nmasterhostnames=\"${join(" ",compact(concat(ibm_compute_bare_metal.masters.*.hostname, ibm_compute_vm_instance.masters.*.hostname, ibm_compute_vm_instance.masters-image.*.hostname, ibm_compute_vm_instance.masters-vlan.*.hostname, ibm_compute_vm_instance.masters-vlan-image.*.hostname, ibm_compute_vm_instance.failovers.*.hostname, ibm_compute_vm_instance.failovers-image.*.hostname, ibm_compute_vm_instance.failovers-vlan.*.hostname, ibm_compute_vm_instance.failovers-vlan-image.*.hostname)))}\"\nmasterprivateipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.private_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address_private, ibm_compute_vm_instance.masters-image.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan.*.ipv4_address_private, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers.*.ipv4_address_private, ibm_compute_vm_instance.failovers-image.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address_private, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address_private)))}\"\nmasterpublicipaddress=\"${join(" ", compact(concat(ibm_compute_bare_metal.masters.*.public_ipv4_address, ibm_compute_vm_instance.masters.*.ipv4_address, ibm_compute_vm_instance.masters-image.*.ipv4_address, ibm_compute_vm_instance.masters-vlan.*.ipv4_address, ibm_compute_vm_instance.masters-vlan-image.*.ipv4_address, ibm_compute_vm_instance.failovers.*.ipv4_address, ibm_compute_vm_instance.failovers-image.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan.*.ipv4_address, ibm_compute_vm_instance.failovers-vlan-image.*.ipv4_address)))}\"\nfunctionsfile=${replace(var.post_install_script_uri, basename(var.post_install_script_uri), var.product)}.sh\nuri_file_entitlement=${var.uri_file_entitlement}\nuri_package_installer=${var.uri_package_installer}\nuri_package_additional=${var.uri_package_additional}\nuri_package_additional2=${var.uri_package_additional2}\n${file("scripts/ibm_spectrum_computing_deploy.sh")}"
private_vlan_id = "${var.private_vlan_id}"
private_network_only = false
}
##############################################################################
# Variables
##############################################################################
variable uri_file_entitlement {
description = "The URL to the entitlement file for the software product."
}
variable uri_package_installer {
description = "The URL to the product package installation file."
}
variable ssh_public_key {
description = "The public key contents for the SSH keypair to access cluster nodes."
}
variable uri_package_additional {
default = "http://url/to/additional"
description = "The URL to the product package supplement file."
}
variable uri_package_additional2 {
default = "http://url/to/additional2"
description = "The URL to an additional product package supplement file."
}
variable product {
default = "symphony"
description = "The cluster product to deploy: `symphony`, `cws`, or `lsf`."
}
variable version {
default = "latest"
description = "The version of the cluster product: `latest`, `7.2.0.0`, `2.2.0.0`, or `10.1`."
}
variable entitlement {
default = "paste your entitlement content if uri_file_entitlement is not set"
description = "Entitlement content that enables use of the cluster software."
}
variable os_reference {
default = "CENTOS_7_64"
description = "An operating system reference code that is used to provision the cluster nodes."
}
variable image_id {
default = 0
description = "specify the vm image id for the resource"
}
variable number_of_compute {
default = 2
description = "The number of VM compute nodes to deploy."
}
variable number_of_dehost {
default = 1
description = "The number of development nodes to depoy."
}
variable datacenter {
default = "dal12"
description = "The datacenter to create resources in."
}
variable private_vlan_id {
default = 0
description = "specify the vm vlan to place the resource"
}
variable ssh_key_label {
default = "ssh_compute_key"
description = "An identifying label to assign to the SSH key."
}
variable ssh_key_note {
default = "ssh key for cluster hosts"
description = "A description to assign to the SSH key."
}
variable cluster_admin {
default = "egoadmin"
description = "The administrator account of the cluster: `egoadmin` or `lsfadmin`."
}
variable cluster_name {
default = "cluster1"
description = "The name of the cluster."
}
variable cluster_web_admin_password {
default = "Admin"
description = "Password for web interface account Admin: `Admin` by default"
}
variable domain_name {
default = "domain.com"
description = "The name of the domain for the instance."
}
variable prefix_master {
default = "master"
description = "The hostname prefix for the master server."
}
variable prefix_compute {
default = "compute"
description = "The hostname prefix for compute nodes."
}
variable prefix_dehost {
default = "dehost"
description = "The hostname prefix for Symphony development nodes."
}
variable network_speed_master {
default = 1000
description = "The network interface speed for the master nodes."
}
variable network_speed_compute {
default = 1000
description = "The network interface speed for the compute nodes."
}
variable core_of_master {
default = 2
description = "The number of CPU cores to allocate to the master server."
}
variable core_of_compute {
default = 1
description = "The number of CPU cores to allocate to the compute server."
}
variable memory_in_mb_master {
default = 8192
description = "The amount of memory (in Mb) to allocate to the master server."
}
variable memory_in_mb_compute {
default = 4096
description = "The amount of memory (in Mb) to allocate to the compute server."
}
variable hourly_billing_master {
default = "true"
description = "When set to true, the master node is billed on hourly usage. Otherwise, the instance is billed on a monthly basis."
}
variable hourly_billing_compute {
default = "true"
description = "When set to true, the computing instance is billed on hourly usage. Otherwise, the instance is billed on a monthly basis."
}
variable post_install_script_uri {
default = "https://raw.githubusercontent.com/Cloud-Schematics/hpc-fss-cluster/master/scripts/ibm_spectrum_computing_deploy.sh"
description = "The URL for the deployment script."
}
variable use_intranet {
default = "true"
description = "Specifies whether the cluster resolves hostnames with intranet or internet IP addresses."
}
variable datacenter_bare_metal {
default = "tor01"
description = "The datacenter to create bare metal resources in."
}
variable os_reference_bare_metal {
default = "UBUNTU_16_64"
description = "An operating system reference code that is used to provision the bare metal server."
}
variable master_use_bare_metal {
default = "false"
description = "If set to `true`, bare metal masters are created. If set to `false`, VM masters are created."
}
variable fixed_config_preset {
default = "S1270_32GB_2X960GBSSD_NORAID"
description = "The bare metal hardware configuration."
}
variable number_of_compute_bare_metal {
default = 0
description = "The number of bare metal compute nodes to deploy"
}
variable prefix_compute_bare_metal {
default = "bmcompute"
description = "The hostname prefix for bare metal compute nodes."
}
variable failover_master {
default = "false"
description = "If set to `true`, enable failover for masters."
}