-
Notifications
You must be signed in to change notification settings - Fork 6
/
metadata.rb
291 lines (253 loc) · 11.9 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
# frozen_string_literal: true
name 'rs-mysql'
maintainer 'RightScale, Inc.'
maintainer_email '[email protected]'
license 'Apache 2.0'
description 'Installs and configures a MySQL server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.0.3'
issues_url 'https://github.com/rightscale-cookbooks/rs-mysql/issues' if respond_to?(:issues_url)
source_url 'https://github.com/rightscale-cookbooks/rs-mysql' if respond_to?(:source_url)
chef_version '>= 12.0' if respond_to?(:chef_version)
depends 'chef_handler'
depends 'marker'
depends 'database'
depends 'mysql2_chef_gem'
depends 'mysql'
depends 'yum-mysql-community'
depends 'collectd'
depends 'rightscale_tag'
depends 'filesystem', '>= 0.11.1'
depends 'ephemeral_lvm', '>= 3.0'
depends 'lvm'
depends 'rightscale_volume'
depends 'rightscale_backup'
depends 'build-essential'
depends 'rs-base', '>= 2.0'
depends 'dns'
recipe 'rs-mysql::default', 'Sets up a standalone MySQL server'
recipe 'rs-mysql::collectd', 'Sets up collectd monitoring for MySQL server'
recipe 'rs-mysql::master', 'Sets up a MySQL master server'
recipe 'rs-mysql::slave', 'Sets up a MySQL slave server'
recipe 'rs-mysql::volume', 'Creates a volume, attaches it to the server, and moves the MySQL data to the volume'
recipe 'rs-mysql::stripe', 'Creates volumes, attaches them to the server, sets up a striped LVM, and moves the MySQL' \
' data to the volume'
recipe 'rs-mysql::backup', description: 'Creates a backup', thread: 'storage_backup'
recipe 'rs-mysql::decommission', 'Destroys LVM conditionally, detaches and destroys volumes. This recipe should' \
' be used as a decommission recipe in a RightScale ServerTemplate.'
recipe 'rs-mysql::schedule', 'Enable/disable periodic backups based on rs-mysql/schedule/enable'
recipe 'rs-mysql::slave_monitors', 'enables slave scripts'
attribute 'rs-mysql/server_usage',
display_name: 'Server Usage',
description: "The Server Usage method. It is either 'dedicated' or 'shared'. In a 'dedicated' server all" \
" server resources are dedicated to MySQL. In a 'shared' server, MySQL utilizes only half of the resources." \
" Example: 'dedicated'",
default: 'dedicated',
required: 'optional',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/bind_network_interface',
display_name: 'MySQL Bind Network Interface',
description: 'The network interface to use for MySQL bind. It can be either' \
" 'private' or 'public' interface.",
default: 'private',
choice: %w(public private),
required: 'optional',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/server_root_password',
display_name: 'MySQL Root Password',
description: 'The root password for MySQL server. Example: cred:MYSQL_ROOT_PASSWORD',
required: 'required',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/application_username',
display_name: 'MySQL Application Username',
description: 'The username of the application user. Example: cred:MYSQL_APPLICATION_USERNAME',
required: 'optional',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/application_password',
display_name: 'MySQL Application Password',
description: 'The password of the application user. Example: cred:MYSQL_APPLICATION_PASSWORD',
required: 'optional',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/application_user_privileges',
display_name: 'MySQL Application User Privileges',
description: 'The privileges given to the application user. This can be an array of mysql privilege types.' \
' Example: select, update, insert',
required: 'optional',
type: 'array',
default: [:select, :update, :insert],
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/application_database_name',
display_name: 'MySQL Database Name',
description: 'The name of the application database. Example: mydb',
required: 'optional',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/server_repl_password',
display_name: 'MySQL Slave Replication Password',
description: 'The replication password set on the master database and used by the slave to authenticate and' \
' connect. If not set, rs-mysql/server_root_password will be used. Example cred:MYSQL_REPLICATION_PASSWORD',
required: 'optional',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave']
attribute 'rs-mysql/device/count',
display_name: 'Device Count',
description: 'The number of devices to create and use in the Logical Volume. If this value is set to more than' \
' 1, it will create the specified number of devices and create an LVM on the devices.',
default: '2',
recipes: ['rs-mysql::stripe', 'rs-mysql::decommission'],
required: 'recommended'
attribute 'rs-mysql/device/mount_point',
display_name: 'Device Mount Point',
description: 'The mount point to mount the device on. Example: /mnt/storage',
default: '/mnt/storage',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe', 'rs-mysql::decommission'],
required: 'recommended'
attribute 'rs-mysql/device/nickname',
display_name: 'Device Nickname',
description: 'Nickname for the device. rs-mysql::volume uses this for the filesystem label, which is' \
' restricted to 12 characters. If longer than 12 characters, the filesystem label will be set to the' \
' first 12 characters. Example: data_storage',
default: 'data_storage',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe', 'rs-mysql::decommission'],
required: 'recommended'
attribute 'rs-mysql/device/volume_size',
display_name: 'Device Volume Size',
description: 'Size of the volume or logical volume to create (in GB). Example: 10',
default: '10',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe'],
required: 'recommended'
attribute 'rs-mysql/device/iops',
display_name: 'Device IOPS',
description: 'IO Operations Per Second to use for the device. Currently this value is only used on AWS clouds.' \
' Example: 100',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe'],
required: 'optional'
attribute 'rs-mysql/device/volume_type',
display_name: 'Volume Type',
description: 'Volume Type to use for creating volumes. Example: gp2',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe'],
required: 'optional'
attribute 'rs-mysql/device/filesystem',
display_name: 'Device Filesystem',
description: 'The filesystem to be used on the device. Defaults are based on OS and determined in' \
' attributes/volume.rb. Example: ext4',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe'],
required: 'optional'
attribute 'rs-mysql/device/detach_timeout',
display_name: 'Detach Timeout',
description: 'Amount of time (in seconds) to wait for a single volume to detach at decommission. Example: 300',
default: '300',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe'],
required: 'optional'
attribute 'rs-mysql/device/destroy_on_decommission',
display_name: 'Destroy on Decommission',
description: 'If set to true, the devices will be destroyed on decommission.',
default: 'false',
recipes: ['rs-mysql::decommission'],
required: 'recommended'
attribute 'rs-mysql/backup/lineage',
display_name: 'Backup Lineage',
description: 'The prefix that will be used to name/locate the backup of the MySQL database server.',
required: 'required',
recipes: ['rs-mysql::default', 'rs-mysql::master', 'rs-mysql::slave', 'rs-mysql::backup']
attribute 'rs-mysql/restore/lineage',
display_name: 'Restore Lineage',
description: 'The lineage name to restore backups. Example: staging',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe'],
required: 'recommended'
attribute 'rs-mysql/restore/timestamp',
display_name: 'Restore Timestamp',
description: 'The timestamp (in seconds since UNIX epoch) to select a backup to restore from.' \
' The backup selected will have been created on or before this timestamp. Example: 1391473172',
recipes: ['rs-mysql::volume', 'rs-mysql::stripe'],
required: 'recommended'
attribute 'rs-mysql/backup/keep/dailies',
display_name: 'Backup Keep Dailies',
description: 'Number of daily backups to keep. Example: 14',
default: '14',
recipes: ['rs-mysql::backup'],
required: 'optional'
attribute 'rs-mysql/backup/keep/weeklies',
display_name: 'Backup Keep Weeklies',
description: 'Number of weekly backups to keep. Example: 6',
default: '6',
recipes: ['rs-mysql::backup'],
required: 'optional'
attribute 'rs-mysql/backup/keep/monthlies',
display_name: 'Backup Keep Monthlies',
description: 'Number of monthly backups to keep. Example: 12',
default: '12',
recipes: ['rs-mysql::backup'],
required: 'optional'
attribute 'rs-mysql/backup/keep/yearlies',
display_name: 'Backup Keep Yearlies',
description: 'Number of yearly backups to keep. Example: 2',
default: '2',
recipes: ['rs-mysql::backup'],
required: 'optional'
attribute 'rs-mysql/backup/keep/keep_last',
display_name: 'Backup Keep Last Snapshots',
description: 'Number of snapshots to keep. Example: 60',
default: '60',
recipes: ['rs-mysql::backup'],
required: 'optional'
attribute 'rs-mysql/schedule/enable',
display_name: 'Backup Schedule Enable',
description: 'Enable or disable periodic backup schedule',
default: 'false',
choice: %w(true false),
recipes: ['rs-mysql::schedule'],
required: 'recommended'
attribute 'rs-mysql/schedule/hour',
display_name: 'Backup Schedule Hour',
description: "The hour to schedule the backup on. This value should abide by crontab syntax. Use '*' for taking" \
' backups every hour. Example: 23',
recipes: ['rs-mysql::schedule'],
required: 'required'
attribute 'rs-mysql/schedule/minute',
display_name: 'Backup Schedule Minute',
description: 'The minute to schedule the backup on. This value should abide by crontab syntax. Example: 30',
recipes: ['rs-mysql::schedule'],
required: 'required'
attribute 'rs-mysql/dns/master_fqdn',
display_name: 'MySQL Database FQDN',
description: 'The fully qualified domain name of the MySQL master database server.',
required: 'optional',
recipes: ['rs-mysql::master']
attribute 'rs-mysql/dns/user_key',
display_name: 'DNS User Key',
description: 'The user key to access/modify the DNS records.',
required: 'optional',
recipes: ['rs-mysql::master']
attribute 'rs-mysql/dns/secret_key',
display_name: 'DNS Secret Key',
description: 'The secret key to access/modify the DNS records.',
required: 'optional',
recipes: ['rs-mysql::master']
attribute 'rs-mysql/import/private_key',
display_name: 'Import Secret Key',
description: 'The private key to access the repository via SSH. Example: Cred:DB_IMPORT_KEY',
required: 'optional',
recipes: ['rs-mysql::dump_import']
attribute 'rs-mysql/import/repository',
display_name: 'Import Repository URL',
description: 'The repository location containing the database dump file to import.' \
' Example: git://example.com/dbfiles/database_dumpfiles.git',
required: 'optional',
recipes: ['rs-mysql::dump_import']
attribute 'rs-mysql/import/revision',
display_name: 'Import Repository Revision',
description: 'The revision of the database dump file to import.' \
' Example: master',
required: 'optional',
recipes: ['rs-mysql::dump_import']
attribute 'rs-mysql/import/dump_file',
display_name: 'Import Filename',
description: 'Filename of the database dump file to import.' \
' Example: dumpfile_20140102.gz',
required: 'optional',
recipes: ['rs-mysql::dump_import']
attribute 'rs-mysql/startup-timeout',
display_name: 'MySQL Server Startup Timeout',
description: 'MySQL Server Startup Timeout',
required: 'optional',
default: 300,
recipes: ['rs-mysql::default']