include_recipe "postgresql"
+postgresql_version = node[:nominatim][:dbcluster].split("/").first
+
package "postgis"
+package "postgresql-#{postgresql_version}-postgis-2.3"
node[:nominatim][:dbadmins].each do |user|
postgresql_user user do
## Nominatim backend
include_recipe "git"
+include_recipe "python"
package "build-essential"
package "cmake"
package "libboost-dev"
package "libboost-system-dev"
package "libboost-filesystem-dev"
+package "libboost-python-dev"
package "libexpat1-dev"
package "zlib1g-dev"
package "libxml2-dev"
package "libproj-dev"
package "osmosis"
+python_package "osmium"
+
source_directory = "#{basedir}/nominatim"
build_directory = "#{basedir}/bin"
end
end
+remote_file "#{source_directory}/data/country_osm_grid.sql.gz" do
+ action :create_if_missing
+ source "http://www.nominatim.org/data/country_grid.sql.gz"
+ owner "nominatim"
+ group "nominatim"
+ mode 0o644
+end
+
template "/etc/cron.d/nominatim" do
action node[:nominatim][:state] == :off ? :delete : :create
source "nominatim.cron.erb"
package "php-pgsql"
package "php-pear"
package "php-db"
+package "php-intl"
apache_module "rewrite"
apache_module "proxy"