default[:nominatim][:revision] = "master"
default[:nominatim][:enable_backup] = false
default[:nominatim][:enable_git_updates] = true
+default[:nominatim][:enable_qa_tiles] = false
default[:nominatim][:ui_repository] = "https://git.openstreetmap.org/public/nominatim-ui.git"
default[:nominatim][:ui_revision] = "master"
+default[:nominatim][:qa_repository] = "https://github.com/osm-search/Nominatim-Data-Analyser"
+default[:nominatim][:qa_revision] = "main"
default[:nominatim][:fpm_pools] = {
"nominatim.openstreetmap.org" => {
source_directory = "#{basedir}/nominatim"
build_directory = "#{basedir}/bin"
ui_directory = "#{basedir}/ui"
+qa_bin_directory = "#{basedir}/Nominatim-Data-Analyser"
+qa_data_directory = "#{basedir}/qa-data"
directory build_directory do
owner "nominatim"
maxretry 20
ignoreips frontend_addresses.flatten.sort
end
+
+### QA tile generation
+
+if node[:nominatim][:enable_qa_tiles]
+ git qa_bin_directory do
+ repository node[:nominatim][:qa_repository]
+ revision node[:nominatim][:qa_revision]
+ enable_submodules true
+ user "nominatim"
+ group "nominatim"
+ notifies :run, "execute[compile_qa]"
+ end
+
+ execute "compile_nominatim" do
+ action :nothing
+ user "nominatim"
+ cwd "#{qa_bin_directory}/clustering-vt"
+ command "make"
+ end
+
+ directory qa_data_directory do
+ owner "nominatim"
+ group "nominatim"
+ mode "755"
+ recursive true
+ end
+
+ template "#{qa_bin_directory}/analyser/config/config.yaml" do
+ source "qa_config.erb"
+ owner "nominatim"
+ group "nominatim"
+ mode "755"
+ variables :outputdir => "#{qa_data_directory}/new"
+ end
+
+
+end
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+#Data source name for the database connection.
+Dsn: 'dbname=<%= node[:nominatim][:dbname] %>'
+
+#Path to the folder where rules data are stored (geojson, vector tiles, etc).
+RulesFolderPath: '<%= @outputdir %>'
+
+#Prefix path of the web URL to access the rules data (ex: https://nominatim.org/QA-data).
+WebPrefixPath: 'https://<%= node[:fqdn] %>/qa-data'
:state => "standalone",
:enable_backup => false,
:enable_git_updates => true,
+ :enable_qa_tiles => true,
:dbadmins => %w[lonvia tomh],
:dbcluster => "12/main",
:postgis => "2.5",