include_recipe "postgresql"
include_recipe "prometheus"
include_recipe "python"
+include_recipe "ruby"
include_recipe "tools"
blocks = data_bag_item("tile", "blocks")
package %w[
python3-cairo
python3-mapnik
+ python3-pyproj
python3-setuptools
]
python_version "3"
end
-package %w[
+unifont = if node[:lsb][:release].to_f < 22.04
+ "ttf-unifont"
+ else
+ "fonts-unifont"
+ end
+
+package %W[
fonts-noto-cjk
fonts-noto-hinted
fonts-noto-unhinted
fonts-hanazono
- ttf-unifont
+ #{unifont}
]
["NotoSansArabicUI-Regular.ttf", "NotoSansArabicUI-Bold.ttf"].each do |font|
package %w[
osm2pgsql
- ruby
osmium-tool
pyosmium
python3-pyproj
]
-gem_package "apachelogregex"
-gem_package "file-tail"
-gem_package "lru_redux"
+gem_package "apachelogregex" do
+ gem_binary node[:ruby][:gem]
+end
+
+gem_package "file-tail" do
+ gem_binary node[:ruby][:gem]
+end
+
+gem_package "lru_redux" do
+ gem_binary node[:ruby][:gem]
+end
remote_directory "/usr/local/bin" do
source "bin"
systemd_timer "render-lowzoom" do
description "Render low zoom tiles"
- on_calendar "Sun *-*~07/1 01:00:00"
+ on_calendar "Fri *-*-* 23:00:00 UTC"
end
service "render-lowzoom.timer" do
munin_plugin "replication_delay"
+package "ruby-webrick"
+
prometheus_exporter "modtile" do
port 9494
end