forked from logicalclocks/ndb-chef
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadata.rb
executable file
·474 lines (358 loc) · 16.3 KB
/
metadata.rb
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
name "ndb"
maintainer "Jim Dowling"
maintainer_email "[email protected]"
license "AGPL v3"
description "Installs/Configures NDB (MySQL Cluster)"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "2.3.0"
source_url "https://github.com/logicalclocks/ndb-chef"
issues_url "https://github.com/logicalclocks/ndb-chef/issues"
depends "kagent"
depends "consul"
depends "ulimit"
recipe "ndb::install", "Installs MySQL Cluster binaries"
recipe "ndb::mgmd", "Installs a MySQL Cluster management server (ndb_mgmd)"
recipe "ndb::ndbd", "Installs a MySQL Cluster data node (ndbd)"
recipe "ndb::mysqld", "Installs a MySQL Server connected to the MySQL Cluster (mysqld)"
recipe "ndb::mysqld_tls", "Configure TLS for MySQL servers using host certificates"
recipe "ndb::purge", "Removes all data and all binaries related to a MySQL Cluster installation"
supports 'ubuntu', ">= 14.04"
supports 'rhel', ">= 7.0"
supports 'centos', ">= 7.0"
#
# Required Attributes
#
attribute "ndb/majorVersion",
:description => "RonDB major version",
:type => 'string'
attribute "ndb/minorVersion",
:description => "RonDB minor version",
:type => 'string'
attribute "ndb/patchVersion",
:description => "RonDB patch version",
:type => 'string'
attribute "ndb/url",
:description => "Download URL for MySQL Cluster binaries",
:type => 'string'
attribute "ndb/MaxNoOfExecutionThreads",
:description => "Number of execution threads for MySQL Cluster",
:type => 'string'
attribute "ndb/configuration/type",
:description => "Control RonDB configuration. auto | manual Default: auto",
:type => 'string'
attribute "ndb/configuration/profile",
:description => "Predefined configurations. unlimited | tiny Default: unlimited",
:type => 'string'
attribute "ndb/DataMemory",
:description => "Data memory for each MySQL Cluster Data Node",
:type => 'string',
:required => "required"
attribute "ndb/version",
:description => "MySQL Cluster Version",
:type => 'string'
attribute "ndb/user",
:description => "User that runs ndb database",
:type => 'string'
attribute "ndb/group",
:description => "Group that runs ndb database",
:type => 'string'
attribute "ndb/user-home",
:description => "Home directory of ndb user",
:type => 'string'
attribute "ndb/BackupDataDir",
:description => "Directory to store mysql cluster backups in",
:type => 'string'
attribute "ndb/remote_backup_host",
:description => "Hostname of the machine where the backups will be stored",
:type => 'string'
attribute "ndb/remote_backup_user",
:description => "User on the remote backup machine. SSH access should be configured",
:type => 'string'
attribute "ndb/remote_backup_dir",
:description => "Directory on the remote backup machine that the archives will be stored",
:type => 'string'
attribute "ndb/local_backup_dir",
:description => "Directory on the local MGM machine where backups will temporarily be stored",
:type => 'string'
attribute "ndb/ndbd_backup_retention",
:description => "How many n*24 hours are the backup files in NDB Data Nodes going to stay until they are removed",
:type => 'string'
attribute "ndb/diskdata_dir",
:description => "Directory on the NDBD machines where the on-disk columns will be stored. This should be a NVMe disk for best performance.",
:type => 'string'
attribute "ndb/DiskPageBufferEntries",
:description => "Number of page entries (page references) to allocate.",
:type => 'string'
attribute "ndb/DiskIOThreadPool",
:description => "Default is (2). Increase for higher throughput.",
:type => 'string'
attribute "ndb/SharedGlobalMemory",
:description => "Default is 128M, increase to 512M for higher throughput.",
:type => 'string'
attribute "ndb/DiskPageBufferMemory",
:description => "Default is 64M, increase to 512M for higher throughput.",
:type => 'string'
attribute "mysql/user",
:description => "User that runs mysql server",
:required => "required",
:type => 'string'
attribute "mysql/password",
:description => "Password for hop mysql user",
:required => "required",
:type => 'string'
attribute "mysql/initialize",
:description => "Initialize the MySQL Servers (Default: true)",
:type => "string"
attribute "mysql/dir",
:description => "Directory in which to install MySQL Binaries",
:type => 'string'
attribute "mysql/localhost",
:description => "MySQL server binds to localhost (not a public/private network interface)",
:type => 'string'
attribute "mysql/replication_enabled",
:description => "Enable replication for the mysql server",
:type => 'string'
attribute "mysql/onlinefs",
:description => "Set true to use this MySQL server as online feature store (default: true)",
:type => 'string'
attribute "mysql/tls",
:description => "Enable TLS/SSL for the mysql server",
:type => 'string'
attribute "ndb/wait_startup",
:description => "Max amount of time a MySQL server should wait for the ndb nodes to be up",
:type => 'string'
attribute "ndb/mgm_server/port",
:description => "Port used by Mgm servers in MySQL Cluster",
:type => 'string'
attribute "ndb/NoOfReplicas",
:description => "Num of replicas of the MySQL Cluster Data Nodes",
:type => 'string'
attribute "ndb/FragmentLogFileSize",
:description => "FragmentLogFileSize",
:type => 'string'
attribute "ndb/MaxNoOfAttributes",
:description => "MaxNoOfAttributes",
:type => 'string'
attribute "ndb/MaxNoOfConcurrentIndexOperations",
:description => "Increase for higher throughput at the cost of more memory",
:type => 'string'
attribute "ndb/MaxNoOfConcurrentScans",
:description => "Increase for higher throughput at the cost of more memory",
:type => 'string'
attribute "ndb/MaxNoOfConcurrentOperations",
:description => "Increase for higher throughput at the cost of more memory",
:type => 'string'
attribute "ndb/MaxNoOfTables",
:description => "MaxNoOfTables",
:type => 'string'
attribute "ndb/MaxNoOfOrderedIndexes",
:description => "MaxNoOfOrderedIndexes",
:type => 'string'
attribute "ndb/MaxNoOfUniqueHashIndexes",
:description => "MaxNoOfUniqueHashIndexes",
:type => 'string'
attribute "ndb/MaxDMLOperationsPerTransaction",
:description => "MaxDMLOperationsPerTransaction",
:type => 'string'
attribute "ndb/TransactionBufferMemory",
:description => "TransactionBufferMemory",
:type => 'string'
attribute "ndb/MaxParallelScansPerFragment",
:description => "MaxParallelScansPerFragment",
:type => 'string'
attribute "ndb/MaxDiskWriteSpeed",
:description => "MaxDiskWriteSpeed",
:type => 'string'
attribute "ndb/MaxDiskWriteSpeedOtherNodeRestart",
:description => "MaxDiskWriteSpeedOtherNodeRestart",
:type => 'string'
attribute "ndb/MaxDiskWriteSpeedOwnRestart",
:description => "MaxDiskWriteSpeedOwnRestart",
:type => 'string'
attribute "ndb/MinDiskWriteSpeed",
:description => "MinDiskWriteSpeed",
:type => 'string'
attribute "ndb/DiskSyncSize",
:description => "DiskSyncSize",
:type => 'string'
attribute "ndb/RedoBuffer",
:description => "RedoBuffer",
:type => 'string'
attribute "ndb/LongMessageBuffer",
:description => "LongMessageBuffer",
:type => 'string'
attribute "ndb/MaxFKBuildBatchSize",
:description => "MaxFKBuildBatchSize",
:type => 'string'
attribute "ndb/MaxReorgBuildBatchSize",
:description => "MaxReorgBuildBatchSize",
:type => 'string'
attribute "ndb/EnablePartialLcp",
:description => "EnablePartialLcp",
:type => 'string'
attribute "ndb/RecoveryWork",
:description => "RecoveryWork",
:type => 'string'
attribute "ndb/InsertRecoveryWork",
:description => "InsertRecoveryWork",
:type => 'string'
attribute "ndb/TransactionInactiveTimeout",
:description => "TransactionInactiveTimeout",
:type => 'string'
attribute "ndb/TransactionDeadlockDetectionTimeout",
:description => "TransactionDeadlockDetectionTimeout",
:type => 'string'
attribute "ndb/LockPagesInMainMemory",
:description => "LockPagesInMainMemory",
:type => 'string'
attribute "ndb/RealTimeScheduler",
:description => "RealTimeScheduler",
:type => 'string'
attribute "ndb/SchedulerSpinTimer",
:description => "SchedulerSpinTimer",
:type => 'string'
attribute "ndb/BuildIndexThreads",
:description => "BuildIndexThreads",
:type => 'string'
attribute "ndb/CompressedLCP",
:description => "CompressedLCP",
:type => 'string'
attribute "ndb/CompressedBackup",
:description => "CompressedBackup",
:type => 'string'
attribute "ndb/BackupMaxWriteSize",
:description => "BackupMaxWriteSize",
:type => 'string'
attribute "ndb/BackupLogBufferSize",
:description => "BackupLogBufferSize",
:type => 'string'
attribute "ndb/BackupDataBufferSize",
:description => "BackupDataBufferSize",
:type => 'string'
attribute "ndb/MaxAllocate",
:description => "MaxAllocate",
:type => 'string'
attribute "ndb/DefaultHashMapSize",
:description => "DefaultHashMapSize",
:type => 'string'
attribute "ndb/ODirect",
:description => "ODirect",
:type => 'string'
attribute "ndb/SpinMethod",
:description => "SpinMethod",
:type => 'string'
attribute "ndb/NumCPUs",
:description => "If configuration type is set to auto controls how many CPUs will be available to ndbmtd. Default: -1 (use all CPUs)",
:type => 'string'
attribute "ndb/TotalMemoryConfig",
:description => "This configuration defines the amount of memory used by ndbmtd when AutomaticMemoryConfig is turned on. Minimum is 3G",
:type => 'string'
attribute "ndb/TotalSendBufferMemory",
:description => "TotalSendBufferMemory in MBs",
:type => 'string'
attribute "ndb/OverloadLimit",
:description => "Overload for Send/Recv TCP Buffers in MBs",
:type => 'string'
attribute "kagent/enabled",
:description => "Install kagent",
:type => 'string',
:required => "optional"
attribute "ndb/NoOfFragmentLogParts",
:description => "One per ldm thread. Valid values: 4, 8, 16. Should match the number of CPUs in ThreadConfig's ldm threads.",
:type => 'string'
attribute "ndb/NoOfFragmentLogFiles",
:description => "Number of fragment logfiles for writing LCPS.",
:type => 'string'
attribute "ndb/bind_cpus",
:description => "Isolate interrupts from cpus, turn off balance_irqs",
:type => 'string'
attribute "ndb/TcpBind_INADDR_ANY",
:description => "Set to TRUE so that any IP addr can be used on any node. Default is FALSE.",
:type => 'string'
attribute "ndb/aws_enhanced_networking",
:description => "Set to true if you want the ixgbevf module to be installed that is needed for AWS enhanced networking.",
:type => 'string'
attribute "ndb/interrupts_isolated_to_single_cpu",
:description => "Set to true if you want to setup your linux kernal to handle interrupts on a single CPU.",
:type => 'string'
attribute "ndb/ThreadConfig",
:description => "Decide which threads bind to which cores: Threadconfig=main={cpubind=0},ldm={count=8,cpubind=1,2,3,4,13,14,15,16},io={count=4,cpubind=5,6,17,18},rep={cpubind=7},recv={count=2,cpubind=8,19}k",
:type => 'string'
attribute "ndb/dir",
:description => "Directory in which to install mysql-cluster",
:type => 'string'
attribute "ndb/cron_backup",
:description => "Default is 'false'. To turn on, set to 'true'",
:type => 'string'
attribute "ndb/backup_frequency",
:description => "Options are 'daily', 'weekly'. Default is 'daily'",
:type => 'string'
attribute "ndb/backup_time",
:description => "Time in 24-hour clock of when to make the regular backup. Default: 03:00 (in the morning)",
:type => 'string'
attribute "ndb/MaxNoOfConcurrentTransactions",
:description => "Maximum number of concurrent transactions (higher consumes more memory)",
:type => 'string'
attribute "ndb/mgmd/private_ips",
:description => "Ips for ndb_mgmds",
:type => 'array'
attribute "ndb/mysqld/private_ips",
:description => "Ips for mysql servers",
:type => 'array'
attribute "ndb/ndbd/private_ips",
:description => "Ips for ndb data nodes",
:type => 'array'
attribute "ndb/ndbd/ips_ids",
:description => "The format should be ['ip1:id1', 'ip2:id2', ...] for the ndbd section in the config.ini file. If no value is supplied, one will be assigned by default.",
:type => 'array'
attribute "ndb/ndbd/systemctl_timeout_sec",
:description => "Systemctl start timeout for datanode in seconds",
:type => 'string'
attribute "ndb/mysqld/ips_ids",
:description => "The format should be ['ip1:id1', 'ip2:id2', ...] for the mysql section in the config.ini file. If no value is supplied, one will be assigned by default.",
:type => 'array'
attribute "ndb/EnableRedoControl",
:description => "Control disk read/write speeds automatically for LCPs (default '1', to turn off - set to '0'",
:type => 'string'
attribute "ndb/mgmd/private_ips_domainIds",
:description => "private_ips to LocationDomainIds for ndb_mgmds",
:type => 'array'
attribute "ndb/ndbd/private_ips_domainIds",
:description => "private_ips to LocationDomainIds for ndb data nodes",
:type => 'hash'
attribute "ndb/mysqld/private_ips_domainIds",
:description => "private_ips to LocationDomainIds mapping for mysql servers",
:type => 'hash'
attribute "ndb/ndbapi/private_ips_domainIds",
:description => "LocationDomainIds for ndb api nodes (namenodes)",
:type => 'hash'
attribute "ndb/mysql_socket",
:description => "Location of the MySQL unix socket",
:type => "string"
attribute "ndb/mysql_port",
:description => "Port on which the MySQL server binds to",
:type => "string"
attribute "services/enabled",
:description => "Default 'false'. Set to 'true' to enable daemon services, so that they are started on a host restart.",
:type => "string"
attribute "ndb/nvme/devices",
:description => "Array of strings for NVMe devices (e.g., ['/dev/nvme0n1', '/dev/nvme0n2']) to use for the on on-disk data.",
:type => "array"
attribute "ndb/nvme/format",
:description => "Default 'false'. Set to 'true' to format the NVMe disks specified in ndb/nvme/disks.",
:type => "string"
attribute "ndb/nvme/logfile_size",
:description => "Amount of extra disk space to use on the NVMe disks for NDB.",
:type => "string"
attribute "ndb/nvme/undofile_size",
:description => "Amount of extra disk space to use for log files on the NVMe disks for NDB.",
:type => "string"
attribute "ndb/num_ndb_slots_per_client",
:description => "Number of NDB connection slots per api node",
:type => "string"
attribute "ndb/num_ndb_slots_per_mysqld",
:description => "Number of NDB connection slots per mysqld node",
:type => "string"
attribute "ndb/num_ndb_open_slots",
:description => "Number of slots open for new clients to connect.",
:type => "string"