-
Notifications
You must be signed in to change notification settings - Fork 0
/
metadata.json
227 lines (194 loc) · 8.96 KB
/
metadata.json
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
{
"providing": {
},
"attributes": {
"mysql/server_root_password": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "randomly generated",
"type": "string",
"recipes": [
],
"description": "Randomly generated password for the mysqld root user",
"display_name": "MySQL Server Root Password"
},
"mysql/tunable/max_heap_table_size": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "32M",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tunable Max Heap Table Size"
},
"mysql/datadir": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "/var/lib/mysql",
"type": "string",
"recipes": [
],
"description": "Location of mysql databases",
"display_name": "MySQL Data Directory"
},
"mysql/bind_address": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "ipaddress",
"type": "string",
"recipes": [
],
"description": "Address that mysqld should listen on",
"display_name": "MySQL Bind Address"
},
"mysql/tunable/back_log": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "128",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tunable Back Log"
},
"mysql/tunable/wait_timeout": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "180",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tunable Wait Timeout"
},
"mysql/tunable/net_read_timeout": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "30",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tunable Net Read Timeout"
},
"mysql/tunable/max_connections": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "800",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tunable Max Connections"
},
"mysql/tunable/table_cache": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "128",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tunable Table Cache"
},
"mysql/tunable": {
"required": "optional",
"calculated": false,
"choice": [
],
"type": "hash",
"recipes": [
],
"description": "Hash of MySQL tunable attributes",
"display_name": "MySQL Tunables"
},
"mysql/ec2_path": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "/mnt/mysql",
"type": "string",
"recipes": [
],
"description": "Location of mysql directory on EC2 instance EBS volumes",
"display_name": "MySQL EC2 Path"
},
"mysql/tunable/net_write_timeout": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "30",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tunable Net Write Timeout"
},
"mysql/tunable/key_buffer": {
"required": "optional",
"calculated": false,
"choice": [
],
"default": "250M",
"type": "string",
"recipes": [
],
"display_name": "MySQL Tuntable Key Buffer"
}
},
"replacing": {
},
"dependencies": {
"openssl": [
]
},
"groupings": {
},
"recommendations": {
},
"platforms": {
"debian": [
],
"fedora": [
],
"centos": [
],
"suse": [
],
"ubuntu": [
],
"redhat": [
]
},
"license": "Apache 2.0",
"version": "0.23.1",
"maintainer": "Opscode, Inc.",
"suggestions": {
},
"recipes": {
"mysql": "Includes the client recipe to configure a client",
"mysql::client": "Installs packages required for mysql clients using run_action magic",
"mysql::server_ec2": "Performs EC2-specific mountpoint manipulation",
"mysql::server": "Installs packages required for mysql servers w/o manual intervention"
},
"maintainer_email": "[email protected]",
"name": "mysql",
"conflicting": {
},
"description": "Installs and configures mysql for client or server",
"long_description": "= DESCRIPTION:\n\nInstalls and configures MySQL client or server.\n\n= REQUIREMENTS:\n\n== Platform:\n\nBest tested on Ubuntu 9.04,9.10. On EC2, requires platform that supports -o bind option for the 'mount' command.\n\n== Cookbooks:\n\nRequires Opscode's openssl cookbook for secure password generation.\n\n= ATTRIBUTES: \n\n* mysql[:server_root_password] - Set the server's root password with this, default is a randomly generated password with OpenSSL::Random.random_bytes.\n* mysql[:server_repl_password] - Set the replication user 'repl' password with this, default is a randomly generated password with OpenSSL::Random.random_bytes.\n* mysql[:server_debian_password] - Set the debian-sys-maint user password with this, default is a randomly generated password with OpenSSL::Random.random_bytes.\n* mysql[:bind_address] - Listen address for MySQLd, default is node's ipaddress.\n* mysql[:datadir] - Location for mysql data directory, default is \"/var/lib/mysql\" \n* mysql[:ec2_path] - location of mysql datadir on EC2 nodes, default \"/mnt/mysql\" \n\nPerformance tuning attributes, each corresponds to the same-named parameter in my.cnf; default values listed\n\n* mysql[:tunable][:key_buffer] = \"250M\"\n* mysql[:tunable][:max_connections] = \"800\" \n* mysql[:tunable][:wait_timeout] = \"180\" \n* mysql[:tunable][:net_write_timeout] = \"30\" \n* mysql[:tunable][:net_write_timeout] = \"30\" \n* mysql[:tunable][:back_log] = \"128\" \n* mysql[:tunable][:table_cache] = \"128\" \n* mysql[:tunable][:max_heap_table_size] = \"32M\" \n\n= USAGE:\n\nOn client nodes,\n\n include_recipe \"mysql::client\"\n \nAs the common use case is on systems with Ruby, we also install the MySQL RubyGem. Because we may want to be able to use the gem within another Chef recipe, we make sure the mysql development package and gem are installed first. The key is this:\n\n r = package ... do\n action :nothing\n end\n \n r.run_action(:install)\n \nThis creates a resource object for the package and does the installation before other recipes are parsed. You'll need to have the C compiler and such (ie, build-essential on Ubuntu) before running the recipes, but we already do that when installing Chef :-). If you want to be able to access a MySQL database via Ruby within another recipe, you could do so, like so:\n\n Gem.clear_paths # needed for Chef to find the gem...\n require 'mysql' # requires the mysql gem\n\n execute \"create #{node[:railsapp][:db][:database]} database\" do\n command \"/usr/bin/mysqladmin -u root -p#{node[:mysql][:server_root_password]} create #{node[:railsapp][:db][:database]}\"\n not_if do\n m = Mysql.new(\"localhost\", \"root\", @node[:mysql][:server_root_password])\n m.list_dbs.include?(@node[:railsapp][:db][:database])\n end\n end\n\nOn server nodes, \n\n include_recipe \"mysql::server\"\n \nOn Debian/Ubuntu this will preseed the MySQL package with the randomly generated root password. You can of course change the password afterward, but this makes sure that there's a good password set. You can view it in the node data in the Chef Server webui. Sets a new password for debian-sys-maint user as well.\n\nAlso sets up 'repl' user grants for replication slaves.\n\nOn EC2 nodes,\n\n include_recipe \"mysql::server_ec2\"\n \nWhen the ec2_path doesn't exist we look for a mounted filesystem (eg, EBS) and move the datadir there.\n\nThe client recipe is already included by server and 'default' recipes.\n\n= LICENSE and AUTHOR:\n \nAuthor:: Joshua Timberman (<[email protected]>)\nAuthor:: AJ Christensen (<[email protected]>)\n\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
}