X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/688d76785983dce5093e2eab5fd5244358113a81..f4706c8a1efe2449a641f7c362447b2fa6475af1:/cookbooks/db/recipes/master.rb diff --git a/cookbooks/db/recipes/master.rb b/cookbooks/db/recipes/master.rb index 6ba23cb50..5d2c096ad 100644 --- a/cookbooks/db/recipes/master.rb +++ b/cookbooks/db/recipes/master.rb @@ -117,13 +117,13 @@ CGIMAP_PERMISSIONS = { "way_nodes" => [:select, :insert], "way_tags" => [:select, :insert], "ways" => [:select, :insert] -} +}.freeze PLANETDUMP_PERMISSIONS = { "note_comments" => :select, "notes" => :select, "users" => :select -} +}.freeze PLANETDIFF_PERMISSIONS = { "changeset_comments" => :select, @@ -138,7 +138,11 @@ PLANETDIFF_PERMISSIONS = { "way_nodes" => :select, "way_tags" => :select, "ways" => :select -} +}.freeze + +PROMETHEUS_PERMISSIONS = { + "delayed_jobs" => :select +}.freeze %w[ acls @@ -205,6 +209,7 @@ PLANETDIFF_PERMISSIONS = { "cgimap" => CGIMAP_PERMISSIONS[table], "planetdump" => PLANETDUMP_PERMISSIONS[table], "planetdiff" => PLANETDIFF_PERMISSIONS[table], + "prometheus" => PROMETHEUS_PERMISSIONS[table], "backup" => [:select] end end @@ -267,6 +272,7 @@ systemd_service "monthly-reindex" do user "postgres" sandbox true restrict_address_families "AF_UNIX" + remove_ipc false end systemd_timer "monthly-reindex" do @@ -290,6 +296,7 @@ systemd_service "yearly-reindex" do user "postgres" sandbox true restrict_address_families "AF_UNIX" + remove_ipc false end systemd_timer "yearly-reindex" do @@ -300,3 +307,10 @@ end service "yearly-reindex.timer" do action [:enable, :start] end + +template "/etc/prometheus/exporters/sql_rails.collector.yml" do + source "sql_rails.yml.erb" + owner "root" + group "root" + mode "0644" +end