From: Tom Hughes Date: Sat, 15 Feb 2020 17:24:57 +0000 (+0000) Subject: Split out default munin plugin installation to a new recipe X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/ba65c5618d3113373c0f3306ce993917fc2af23a Split out default munin plugin installation to a new recipe Having split them out make sure the default recipe is included anywhere a munin_plugin resource is used, to ensure that munin is installed and make coupling explicit. --- diff --git a/.kitchen.yml b/.kitchen.yml index 9b9a4c03c..db9eb9680 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -94,18 +94,20 @@ suites: - recipe[incron::default] - name: letsencrypt run_list: - - role[letsencrypt] + - recipe[letsencrypt::default] attributes: apt: sources: - openstreetmap - name: memcached run_list: - - recipe[munin::default] - recipe[memcached::default] - name: munin run_list: - recipe[munin::default] + - name: munin-plugins + run_list: + - recipe[munin::plugins] - name: munin-server run_list: - recipe[munin::server] @@ -117,7 +119,6 @@ suites: - recipe[networking::default] - name: nginx run_list: - - recipe[munin::default] - recipe[nginx::default] attributes: networking: diff --git a/.travis.yml b/.travis.yml index 9387d3348..ded49335b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,7 +59,10 @@ jobs: - name: "Test Kitchen (munin)" script: - bundle exec kitchen test munin-ubuntu-1804 - - name: "Test Kitchen (munin-server)" + - name: "Test Kitchen (munin::plugins)" + script: + - bundle exec kitchen test munin-plugins-ubuntu-1804 + - name: "Test Kitchen (munin::server)" script: - bundle exec kitchen test munin-server-ubuntu-1804 - name: "Test Kitchen (mysql)" diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index 925dda5ad..59d45d09d 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -17,6 +17,7 @@ # limitations under the License. # +include_recipe "munin" include_recipe "ssl" package %w[ diff --git a/cookbooks/chef/recipes/server.rb b/cookbooks/chef/recipes/server.rb index 5eb30d0b6..f965592a1 100644 --- a/cookbooks/chef/recipes/server.rb +++ b/cookbooks/chef/recipes/server.rb @@ -18,6 +18,7 @@ # include_recipe "apache" +include_recipe "munin" # cache_dir = Chef::Config[:file_cache_path] # diff --git a/cookbooks/dev/metadata.rb b/cookbooks/dev/metadata.rb index b54b93f1d..766f3b5c6 100644 --- a/cookbooks/dev/metadata.rb +++ b/cookbooks/dev/metadata.rb @@ -11,6 +11,7 @@ depends "passenger" depends "geoipupdate" depends "git" depends "memcached" +depends "munin" depends "mysql" depends "nodejs" depends "postgresql" diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index d8309f336..693abecf2 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -25,6 +25,7 @@ include_recipe "passenger" include_recipe "geoipupdate" include_recipe "git" include_recipe "memcached" +include_recipe "munin" include_recipe "mysql" include_recipe "nodejs" include_recipe "postgresql" diff --git a/cookbooks/exim/metadata.rb b/cookbooks/exim/metadata.rb index 0c083b991..962e483c3 100644 --- a/cookbooks/exim/metadata.rb +++ b/cookbooks/exim/metadata.rb @@ -8,5 +8,6 @@ version "1.0.0" supports "ubuntu" depends "accounts" depends "apache" +depends "munin" depends "networking" depends "ssl" diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index 9aebb3d9f..e0fd75de3 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -17,6 +17,7 @@ # limitations under the License. # +include_recipe "munin" include_recipe "networking" package %w[ diff --git a/cookbooks/fail2ban/recipes/default.rb b/cookbooks/fail2ban/recipes/default.rb index 6213a3814..81bb4cd40 100644 --- a/cookbooks/fail2ban/recipes/default.rb +++ b/cookbooks/fail2ban/recipes/default.rb @@ -17,6 +17,8 @@ # limitations under the License. # +include_recipe "munin" + package "fail2ban" template "/etc/fail2ban/jail.d/00-default.conf" do diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 6c14fd873..7c7790d47 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -17,8 +17,8 @@ # limitations under the License. # -include_recipe "tools" include_recipe "munin" +include_recipe "tools" ohai_plugin "hardware" do template "ohai.rb.erb" diff --git a/cookbooks/memcached/recipes/default.rb b/cookbooks/memcached/recipes/default.rb index 8c1b427b1..1df2a7eb7 100644 --- a/cookbooks/memcached/recipes/default.rb +++ b/cookbooks/memcached/recipes/default.rb @@ -17,6 +17,8 @@ # limitations under the License. # +include_recipe "munin" + package "memcached" service "memcached" do diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index cf2b767ab..70d6f3050 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -48,284 +48,3 @@ template "/etc/munin/munin-node.conf" do variables :servers => servers notifies :restart, "service[munin-node]" end - -remote_directory "/usr/local/share/munin/plugins" do - source "plugins" - owner "root" - group "root" - mode 0o755 - files_owner "root" - files_group "root" - files_mode 0o755 - purge true -end - -remote_directory "/etc/munin/plugin-conf.d" do - source "plugin-conf.d" - owner "root" - group "munin" - mode 0o750 - files_owner "root" - files_group "root" - files_mode 0o644 - purge false - notifies :restart, "service[munin-node]" -end - -if Dir.glob("/proc/acpi/thermal_zone/*/temperature").empty? - munin_plugin "acpi" do - action :delete - end -else - munin_plugin "acpi" -end - -# apcpdu_ -munin_plugin "cpu" - -if File.exist?("/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state") - munin_plugin "cpuspeed" -else - munin_plugin "cpuspeed" do - action :delete - end -end - -munin_plugin_conf "df" do - template "df.erb" -end - -munin_plugin "df" -munin_plugin "df_inode" - -munin_plugin_conf "diskstats" do - template "diskstats.erb" -end - -munin_plugin "diskstats" -munin_plugin "entropy" -munin_plugin "forks" - -if node[:kernel][:modules].include?("nf_conntrack") - package "conntrack" - - munin_plugin "fw_conntrack" - munin_plugin "fw_forwarded_local" -else - munin_plugin "fw_conntrack" do - action :delete - end - - munin_plugin "fw_forwarded_local" do - action :delete - end -end - -if File.read("/proc/sys/net/ipv4/ip_forward").chomp == "1" - munin_plugin "fw_packets" -else - munin_plugin "fw_packets" do - action :delete - end -end - -if File.exist?("/sbin/hpasmcli") - munin_plugin "hpasmcli2_temp" do - target "hpasmcli2_" - end - - munin_plugin "hpasmcli2_fans" do - target "hpasmcli2_" - end -else - munin_plugin "hpasmcli2_temp" do - action :delete - end - - munin_plugin "hpasmcli2_fans" do - action :delete - end -end - -munin_plugin "hpasmcli_temp" do - action :delete -end - -munin_plugin "hpasmcli_fans" do - action :delete -end - -munin_plugin "http_loadtime" do - action :delete -end - -node[:network][:interfaces].each do |ifname, ifattr| - if ifattr[:flags]&.include?("UP") && !ifattr[:flags].include?("LOOPBACK") - if node[:hardware] && - node[:hardware][:network] && - node[:hardware][:network][ifname][:device] =~ /^virtio/ - munin_plugin_conf "if_#{ifname}" do - template "if.erb" - variables :ifname => ifname - end - else - munin_plugin_conf "if_#{ifname}" do - action :delete - end - end - - munin_plugin "if_err_#{ifname}" do - target "if_err_" - end - - munin_plugin "if_#{ifname}" do - target "if_" - end - else - munin_plugin "if_err_#{ifname}" do - action :delete - end - - munin_plugin "if_#{ifname}" do - action :delete - end - end -end - -munin_plugin "interrupts" -munin_plugin "iostat" -munin_plugin "iostat_ios" - -if Dir.glob("/dev/ipmi*").empty? - munin_plugin_conf "ipmi" do - action :delete - end - - munin_plugin "ipmi_fans" do - action :delete - end - - munin_plugin "ipmi_temp" do - action :delete - end - - munin_plugin "ipmi_power" do - action :delete - end -else - munin_plugin_conf "ipmi" do - template "ipmi.erb" - end - - munin_plugin "ipmi_fans" do - target "ipmi_" - end - - munin_plugin "ipmi_temp" do - target "ipmi_" - end - - munin_plugin "ipmi_power" do - target "ipmi_" - end -end - -munin_plugin "irqstats" -munin_plugin "load" -munin_plugin "memory" -munin_plugin "netstat" - -if node[:kernel][:modules].include?("nfsv3") - munin_plugin "nfs_client" -else - munin_plugin "nfs_client" do - action :delete - end -end - -if node[:kernel][:modules].include?("nfsv4") - munin_plugin "nfs4_client" -else - munin_plugin "nfs4_client" do - action :delete - end -end - -if node[:kernel][:modules].include?("nfsd") - munin_plugin "nfsd" - munin_plugin "nfsd4" -else - munin_plugin "nfsd" do - action :delete - end - - munin_plugin "nfsd4" do - action :delete - end -end - -munin_plugin "open_files" -munin_plugin "open_inodes" - -munin_plugin "postfix_mailqueue" do - action :delete -end - -munin_plugin "postfix_mailvolume" do - action :delete -end - -munin_plugin "processes" -munin_plugin "proc_pri" - -sensors_fan = false -sensors_temp = false -sensors_volt = false - -Dir.glob("/sys/class/hwmon/hwmon*").each do |hwmon| - hwmon = "#{hwmon}/device" unless File.exist?("#{hwmon}/name") - - sensors_fan = true unless Dir.glob("#{hwmon}/fan*_input").empty? - sensors_temp = true unless Dir.glob("#{hwmon}/temp*_input").empty? - sensors_volt = true unless Dir.glob("#{hwmon}/in*_input").empty? -end - -package "lm-sensors" if sensors_fan || sensors_temp || sensors_volt - -if sensors_fan - munin_plugin "sensors_fan" do - target "sensors_" - end -else - munin_plugin "sensors_fan" do - action :delete - end -end - -if sensors_temp - munin_plugin "sensors_temp" do - target "sensors_" - end -else - munin_plugin "sensors_temp" do - action :delete - end -end - -if sensors_volt - munin_plugin "sensors_volt" do - target "sensors_" - conf "sensors_volt.erb" - end -else - munin_plugin "sensors_volt" do - action :delete - end -end - -munin_plugin "swap" -munin_plugin "tcp" -munin_plugin "threads" -munin_plugin "uptime" -munin_plugin "users" -munin_plugin "vmstat" diff --git a/cookbooks/munin/recipes/plugins.rb b/cookbooks/munin/recipes/plugins.rb new file mode 100644 index 000000000..8f0eca1f2 --- /dev/null +++ b/cookbooks/munin/recipes/plugins.rb @@ -0,0 +1,301 @@ +# +# Cookbook:: munin +# Recipe:: default +# +# Copyright:: 2010, OpenStreetMap Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +include_recipe "munin" + +remote_directory "/usr/local/share/munin/plugins" do + source "plugins" + owner "root" + group "root" + mode 0o755 + files_owner "root" + files_group "root" + files_mode 0o755 + purge true +end + +remote_directory "/etc/munin/plugin-conf.d" do + source "plugin-conf.d" + owner "root" + group "munin" + mode 0o750 + files_owner "root" + files_group "root" + files_mode 0o644 + purge false + notifies :restart, "service[munin-node]" +end + +if Dir.glob("/proc/acpi/thermal_zone/*/temperature").empty? + munin_plugin "acpi" do + action :delete + end +else + munin_plugin "acpi" +end + +# apcpdu_ +munin_plugin "cpu" + +if File.exist?("/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state") + munin_plugin "cpuspeed" +else + munin_plugin "cpuspeed" do + action :delete + end +end + +munin_plugin_conf "df" do + template "df.erb" +end + +munin_plugin "df" +munin_plugin "df_inode" + +munin_plugin_conf "diskstats" do + template "diskstats.erb" +end + +munin_plugin "diskstats" +munin_plugin "entropy" +munin_plugin "forks" + +if node[:kernel][:modules].include?("nf_conntrack") + package "conntrack" + + munin_plugin "fw_conntrack" + munin_plugin "fw_forwarded_local" +else + munin_plugin "fw_conntrack" do + action :delete + end + + munin_plugin "fw_forwarded_local" do + action :delete + end +end + +if File.read("/proc/sys/net/ipv4/ip_forward").chomp == "1" + munin_plugin "fw_packets" +else + munin_plugin "fw_packets" do + action :delete + end +end + +if File.exist?("/sbin/hpasmcli") + munin_plugin "hpasmcli2_temp" do + target "hpasmcli2_" + end + + munin_plugin "hpasmcli2_fans" do + target "hpasmcli2_" + end +else + munin_plugin "hpasmcli2_temp" do + action :delete + end + + munin_plugin "hpasmcli2_fans" do + action :delete + end +end + +munin_plugin "hpasmcli_temp" do + action :delete +end + +munin_plugin "hpasmcli_fans" do + action :delete +end + +munin_plugin "http_loadtime" do + action :delete +end + +node[:network][:interfaces].each do |ifname, ifattr| + if ifattr[:flags]&.include?("UP") && !ifattr[:flags].include?("LOOPBACK") + if node[:hardware] && + node[:hardware][:network] && + node[:hardware][:network][ifname][:device] =~ /^virtio/ + munin_plugin_conf "if_#{ifname}" do + template "if.erb" + variables :ifname => ifname + end + else + munin_plugin_conf "if_#{ifname}" do + action :delete + end + end + + munin_plugin "if_err_#{ifname}" do + target "if_err_" + end + + munin_plugin "if_#{ifname}" do + target "if_" + end + else + munin_plugin "if_err_#{ifname}" do + action :delete + end + + munin_plugin "if_#{ifname}" do + action :delete + end + end +end + +munin_plugin "interrupts" +munin_plugin "iostat" +munin_plugin "iostat_ios" + +if Dir.glob("/dev/ipmi*").empty? + munin_plugin_conf "ipmi" do + action :delete + end + + munin_plugin "ipmi_fans" do + action :delete + end + + munin_plugin "ipmi_temp" do + action :delete + end + + munin_plugin "ipmi_power" do + action :delete + end +else + munin_plugin_conf "ipmi" do + template "ipmi.erb" + end + + munin_plugin "ipmi_fans" do + target "ipmi_" + end + + munin_plugin "ipmi_temp" do + target "ipmi_" + end + + munin_plugin "ipmi_power" do + target "ipmi_" + end +end + +munin_plugin "irqstats" +munin_plugin "load" +munin_plugin "memory" +munin_plugin "netstat" + +if node[:kernel][:modules].include?("nfsv3") + munin_plugin "nfs_client" +else + munin_plugin "nfs_client" do + action :delete + end +end + +if node[:kernel][:modules].include?("nfsv4") + munin_plugin "nfs4_client" +else + munin_plugin "nfs4_client" do + action :delete + end +end + +if node[:kernel][:modules].include?("nfsd") + munin_plugin "nfsd" + munin_plugin "nfsd4" +else + munin_plugin "nfsd" do + action :delete + end + + munin_plugin "nfsd4" do + action :delete + end +end + +munin_plugin "open_files" +munin_plugin "open_inodes" + +munin_plugin "postfix_mailqueue" do + action :delete +end + +munin_plugin "postfix_mailvolume" do + action :delete +end + +munin_plugin "processes" +munin_plugin "proc_pri" + +sensors_fan = false +sensors_temp = false +sensors_volt = false + +Dir.glob("/sys/class/hwmon/hwmon*").each do |hwmon| + hwmon = "#{hwmon}/device" unless File.exist?("#{hwmon}/name") + + sensors_fan = true unless Dir.glob("#{hwmon}/fan*_input").empty? + sensors_temp = true unless Dir.glob("#{hwmon}/temp*_input").empty? + sensors_volt = true unless Dir.glob("#{hwmon}/in*_input").empty? +end + +package "lm-sensors" if sensors_fan || sensors_temp || sensors_volt + +if sensors_fan + munin_plugin "sensors_fan" do + target "sensors_" + end +else + munin_plugin "sensors_fan" do + action :delete + end +end + +if sensors_temp + munin_plugin "sensors_temp" do + target "sensors_" + end +else + munin_plugin "sensors_temp" do + action :delete + end +end + +if sensors_volt + munin_plugin "sensors_volt" do + target "sensors_" + conf "sensors_volt.erb" + end +else + munin_plugin "sensors_volt" do + action :delete + end +end + +munin_plugin "swap" +munin_plugin "tcp" +munin_plugin "threads" +munin_plugin "uptime" +munin_plugin "users" +munin_plugin "vmstat" diff --git a/cookbooks/munin/resources/plugin.rb b/cookbooks/munin/resources/plugin.rb index e9387b1e7..bc58bf975 100644 --- a/cookbooks/munin/resources/plugin.rb +++ b/cookbooks/munin/resources/plugin.rb @@ -81,5 +81,5 @@ action_class do end def after_created - notifies :restart, "service[munin-node]" if restart_munin && node[:recipes].include?("munin") + notifies :restart, "service[munin-node]" if restart_munin end diff --git a/cookbooks/mysql/recipes/default.rb b/cookbooks/mysql/recipes/default.rb index bbbca3c61..a8f14a0ae 100644 --- a/cookbooks/mysql/recipes/default.rb +++ b/cookbooks/mysql/recipes/default.rb @@ -17,6 +17,8 @@ # limitations under the License. # +include_recipe "munin" + package "mysql-server" package "mysql-client" diff --git a/cookbooks/nginx/recipes/default.rb b/cookbooks/nginx/recipes/default.rb index 93aab5690..aec734c17 100644 --- a/cookbooks/nginx/recipes/default.rb +++ b/cookbooks/nginx/recipes/default.rb @@ -17,6 +17,8 @@ # limitations under the License. # +include_recipe "munin" + package "nginx" resolvers = node[:networking][:nameservers].map do |resolver| diff --git a/cookbooks/nominatim/metadata.rb b/cookbooks/nominatim/metadata.rb index 5909c6caf..71c3ee93c 100644 --- a/cookbooks/nominatim/metadata.rb +++ b/cookbooks/nominatim/metadata.rb @@ -7,7 +7,8 @@ description "Installs and configures nominatim servers" version "1.0.0" supports "ubuntu" depends "apache" -depends "postgresql" -depends "git" depends "fail2ban" +depends "git" +depends "munin" +depends "postgresql" depends "python" diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 1cd8d767e..0a245969c 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -17,6 +17,8 @@ # limitations under the License. # +include_recipe "munin" + basedir = data_bag_item("accounts", "nominatim")["home"] email_errors = data_bag_item("accounts", "lonvia")["email"] diff --git a/cookbooks/ntp/recipes/default.rb b/cookbooks/ntp/recipes/default.rb index dd4a04ebf..1f875cdcc 100644 --- a/cookbooks/ntp/recipes/default.rb +++ b/cookbooks/ntp/recipes/default.rb @@ -17,6 +17,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +include_recipe "munin" + package %w[ chrony tzdata diff --git a/cookbooks/passenger/recipes/default.rb b/cookbooks/passenger/recipes/default.rb index a9ef419a0..03412e2ff 100644 --- a/cookbooks/passenger/recipes/default.rb +++ b/cookbooks/passenger/recipes/default.rb @@ -18,6 +18,7 @@ # include_recipe "apache" +include_recipe "munin" package "ruby#{node[:passenger][:ruby_version]}" package "ruby#{node[:passenger][:ruby_version]}-dev" diff --git a/cookbooks/planet/recipes/default.rb b/cookbooks/planet/recipes/default.rb index d8ec3bd3c..b72d4d1c5 100644 --- a/cookbooks/planet/recipes/default.rb +++ b/cookbooks/planet/recipes/default.rb @@ -19,6 +19,7 @@ include_recipe "accounts" include_recipe "apache" +include_recipe "munin" package %w[ perl diff --git a/cookbooks/postgresql/metadata.rb b/cookbooks/postgresql/metadata.rb index 47927729e..aca2267b7 100644 --- a/cookbooks/postgresql/metadata.rb +++ b/cookbooks/postgresql/metadata.rb @@ -6,4 +6,5 @@ description "Installs and configures postgresql" version "1.0.0" supports "ubuntu" +depends "munin" depends "ohai" diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index a79cde84d..9b17fae2a 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -17,6 +17,8 @@ # limitations under the License. # +include_recipe "munin" + package "locales-all" package "postgresql-common" diff --git a/cookbooks/squid/recipes/default.rb b/cookbooks/squid/recipes/default.rb index a5af78090..457228fee 100644 --- a/cookbooks/squid/recipes/default.rb +++ b/cookbooks/squid/recipes/default.rb @@ -18,6 +18,7 @@ # include_recipe "apt" +include_recipe "munin" if node[:squid][:version] >= 3 apt_package "squid" do diff --git a/cookbooks/tile/metadata.rb b/cookbooks/tile/metadata.rb index 8c995d11e..716401065 100644 --- a/cookbooks/tile/metadata.rb +++ b/cookbooks/tile/metadata.rb @@ -8,6 +8,7 @@ version "1.0.0" supports "ubuntu" depends "apache" depends "git" +depends "munin" depends "nodejs" depends "postgresql" depends "python" diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 971e95384..c1327d811 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -19,6 +19,7 @@ include_recipe "apache" include_recipe "git" +include_recipe "munin" include_recipe "nodejs" include_recipe "postgresql" include_recipe "python" diff --git a/cookbooks/tilecache/metadata.rb b/cookbooks/tilecache/metadata.rb index a20748624..b5e65dc1a 100644 --- a/cookbooks/tilecache/metadata.rb +++ b/cookbooks/tilecache/metadata.rb @@ -6,8 +6,8 @@ description "Installs and configures a tile cache" version "1.0.0" supports "ubuntu" -depends "ssl" -depends "squid" -depends "nginx" -depends "munin" depends "fail2ban" +depends "munin" +depends "nginx" +depends "squid" +depends "ssl" diff --git a/cookbooks/tilecache/recipes/default.rb b/cookbooks/tilecache/recipes/default.rb index 63de8a529..1cf0e7b2e 100644 --- a/cookbooks/tilecache/recipes/default.rb +++ b/cookbooks/tilecache/recipes/default.rb @@ -19,10 +19,11 @@ require "ipaddr" -include_recipe "ssl" -include_recipe "squid" -include_recipe "nginx" include_recipe "fail2ban" +include_recipe "munin" +include_recipe "nginx" +include_recipe "squid" +include_recipe "ssl" package "apache2" do action :remove diff --git a/cookbooks/web/metadata.rb b/cookbooks/web/metadata.rb index 65a55181a..81096e2f1 100644 --- a/cookbooks/web/metadata.rb +++ b/cookbooks/web/metadata.rb @@ -6,14 +6,15 @@ description "Installs and configures www.openstreetmap.org servers" version "1.0.1" supports "ubuntu" +depends "accounts" depends "apache" -depends "passenger" +depends "apt" +depends "geoipupdate" depends "git" depends "memcached" -depends "nodejs" -depends "tools" +depends "munin" depends "nfs" -depends "accounts" -depends "apt" +depends "nodejs" +depends "passenger" depends "systemd" -depends "geoipupdate" +depends "tools" diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index a6af8715f..c007d8e5d 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -24,6 +24,7 @@ include_recipe "apache" include_recipe "passenger" include_recipe "geoipupdate" include_recipe "git" +include_recipe "munin" include_recipe "nodejs" web_passwords = data_bag_item("web", "passwords") diff --git a/roles/base.rb b/roles/base.rb index bc08d820c..771901def 100644 --- a/roles/base.rb +++ b/roles/base.rb @@ -91,7 +91,7 @@ run_list( "recipe[chef]", "recipe[devices]", "recipe[hardware]", - "recipe[munin]", + "recipe[munin::plugins]", "recipe[networking]", "recipe[exim]", "recipe[ntp]",