Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/statsmaster/templates/sitescripts.ini.erb

Issue 6580840486141952: Issue 2661 - Auto-generate subscription and notification mirrors in statsmaster sitescripts.ini (Closed)
Patch Set: Created June 8, 2015, 10:23 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/statsmaster/manifests/downloads.pp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/statsmaster/templates/sitescripts.ini.erb
diff --git a/modules/statsmaster/templates/sitescripts.ini.erb b/modules/statsmaster/templates/sitescripts.ini.erb
new file mode 100644
index 0000000000000000000000000000000000000000..5473e61c754da4e4cf973286ab27fb6a233f01e5
--- /dev/null
+++ b/modules/statsmaster/templates/sitescripts.ini.erb
@@ -0,0 +1,37 @@
+<%
+servers = scope.function_hiera('servers', {})
+filter_servers = servers.select { |hostname, record| record.fetch('role', nil) == 'filterserver' }
+fqdn = lambda { |hostname, record| record.fetch 'dns', "#{hostname}.adblockplus.org" }
+-%>
+[stats]
+geoip_db=/usr/share/GeoIP/GeoIP.dat
+geoipv6_db=/usr/share/GeoIP/GeoIPv6.dat
+
+# Subscription mirrors accumulated via Puppet
+<% filter_servers.each do |hostname, record| -%>
+mirror_<%= hostname %>=subscription ssh://stats@<%= fqdn.call(hostname, record) %>/access_log_easylist_downloads.1.gz
+<% end -%>
+
+# Notification mirrors accumulated via Puppet
+<% filter_servers.each do |hostname, record| -%>
+mirror_n_<%= hostname %>=notification ssh://stats@<%= fqdn.call(hostname, record) %>/access_log_notification.1.gz
+<% end -%>
+
+mirror_download1=download ssh://stats@download1.adblockplus.org/access_log_downloads.1.gz
+mirror_download2=download ssh://stats@download2.adblockplus.org/access_log_downloads.1.gz
+mirror_download3=download ssh://stats@download3.adblockplus.org/access_log_downloads.1.gz
+mirror_download4=download ssh://stats@download4.adblockplus.org/access_log_downloads.1.gz
+mirror_download5=download ssh://stats@download5.adblockplus.org/access_log_downloads.1.gz
+mirror_update1=update ssh://stats@update1.adblockplus.org/access_log_update.1.gz
+
+baseURL_subscription=https://easylist-downloads.adblockplus.org/
+baseURL_download=https://downloads.adblockplus.org/
+baseURL_update=https://update.adblockplus.org/
+baseURL_notification=https://notification.adblockplus.org/
+
+dataDirectory=/var/www/statsdata
+outputDirectory=/var/www/stats
+
+mainPageTemplate=stats/template/main.html
+fileOverviewTemplate=stats/template/fileOverview.html
+filePageTemplate=stats/template/fileStats.html
« no previous file with comments | « modules/statsmaster/manifests/downloads.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld