]> git.openstreetmap.org Git - chef.git/blob - cookbooks/mysql/recipes/default.rb
f9d2e2d0330f6ce0e6f6b66317e4fe3a5930cfe2
[chef.git] / cookbooks / mysql / recipes / default.rb
1 #
2 # Cookbook Name:: mysql
3 # Recipe:: default
4 #
5 # Copyright 2013, OpenStreetMap Foundation
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #     http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19
20 package "mysql-server"
21 package "mysql-client"
22
23 service "mysql" do
24   action [ :enable, :start ]
25   supports :status => true, :restart => true, :reload => true
26 end
27
28 template "/etc/mysql/conf.d/chef.cnf" do
29   source "my.cnf.erb"
30   owner "root"
31   group "root"
32   mode 0644
33   notifies :reload, "service[mysql]"
34 end
35
36 package "libdbd-mysql-perl"
37 package "libcache-cache-perl"
38
39 munin_plugin "mysql_bin_relay_log" do
40   target "mysql_"
41 end
42
43 munin_plugin "mysql_commands" do
44   target "mysql_"
45 end
46
47 munin_plugin "mysql_connections" do
48   target "mysql_"
49 end
50
51 munin_plugin "mysql_files_tables" do
52   target "mysql_"
53 end
54
55 munin_plugin "mysql_innodb_bpool" do
56   target "mysql_"
57 end
58
59 munin_plugin "mysql_innodb_bpool_act" do
60   target "mysql_"
61 end
62
63 munin_plugin "mysql_innodb_insert_buf" do
64   target "mysql_"
65 end
66
67 munin_plugin "mysql_innodb_io" do
68   target "mysql_"
69 end
70
71 munin_plugin "mysql_innodb_io_pend" do
72   target "mysql_"
73 end
74
75 munin_plugin "mysql_innodb_log" do
76   target "mysql_"
77 end
78
79 munin_plugin "mysql_innodb_rows" do
80   target "mysql_"
81 end
82
83 munin_plugin "mysql_innodb_semaphores" do
84   target "mysql_"
85 end
86
87 munin_plugin "mysql_innodb_tnx" do
88   target "mysql_"
89 end
90
91 munin_plugin "mysql_myisam_indexes" do
92   target "mysql_"
93 end
94
95 munin_plugin "mysql_network_traffic" do
96   target "mysql_"
97 end
98
99 munin_plugin "mysql_qcache" do
100   target "mysql_"
101 end
102
103 munin_plugin "mysql_qcache_mem" do
104   target "mysql_"
105 end
106
107 munin_plugin "mysql_replication" do
108   target "mysql_"
109 end
110
111 munin_plugin "mysql_select_types" do
112   target "mysql_"
113 end
114
115 munin_plugin "mysql_slow" do
116   target "mysql_"
117 end
118
119 munin_plugin "mysql_sorts" do
120   target "mysql_"
121 end
122
123 munin_plugin "mysql_table_locks" do
124   target "mysql_"
125 end
126
127 munin_plugin "mysql_tmp_tables" do
128   target "mysql_"
129 end