owner "root"
group "root"
mode "755"
- variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :config_path => "#{shortbread_config}", :diff_size => "1000", :tiles_file => "/srv/vector.openstreetmap.org/data/tiles.txt", :post_processing => "/usr/local/bin/tiles-rerender"
+ variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :config_path => "#{shortbread_config}", :diff_size => "1000", :expiry_dir => "/srv/vector.openstreetmap.org/data/", :post_processing => "/usr/local/bin/tiles-rerender"
end
template "/usr/local/bin/tiles-rerender" do
owner "root"
group "root"
mode "755"
- variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :storage_database => "tiles", :config_path => "#{shortbread_config}", :tiles_file => "/srv/vector.openstreetmap.org/data/tiles.txt", :update_threads => 4
+ variables :tilekiln_bin => "#{tilekiln_directory}/bin/tilekiln", :source_database => "spirit", :storage_database => "tiles", :config_path => "#{shortbread_config}", :expiry_dir => "/srv/vector.openstreetmap.org/data/", :update_threads => 4
end
systemd_service "replicate" do
set -e
-export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;/srv/vector.openstreetmap.org/spirit/?.lua;;'
+export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;;'
# Import the osm2pgsql file specified as an argument, using the locations for spirit
osm2pgsql \
#!/bin/sh
set -eu
-<%= @tilekiln_bin %> generate tiles \
+
+cd "<%= @expiry_dir %>"
+
+wc -l z*.txt
+cat z*.txt | <%= @tilekiln_bin %> generate tiles \
--source-dbname "<%= @source_database %>" \
--storage-dbname "<%= @storage_database %>" \
--num-threads "<%= node[:vectortile][:replication][:threads] %>" \
---config <%= @config_path %> < <%= @tiles_file %>
+--config <%= @config_path %>
#!/bin/sh
# Usage
-# sudo -u tilekiln vector-update
+# sudo -u tileupdate vector-update
set -eu
-export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;/srv/vector.openstreetmap.org/spirit/?.lua;;'
+export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;;'
+cd "<%= @expiry_dir %>"
osm2pgsql-replication update \
-d "<%= @source_database %>" \
--max-diff-size "<%= @diff_size %>"
set -eu
-export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;/srv/vector.openstreetmap.org/spirit/?.lua;;'
+export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;;'
+cd "<%= @expiry_dir %>"
osm2pgsql-replication update \
-d "<%= @source_database %>" \
--max-diff-size "<%= @diff_size %>" \
- --post-processing "<%= @post_processing %>" \
- -- --expire-tiles=10-14 \
- --expire-output="<%= @tiles_file %>"
+ --post-processing "<%= @post_processing %>"
},
:external => {
:zone => "dub",
+ :inet => {
+ :rules => [
+ { :to => "10.0.0.0/8", :table => "main", :priority => 50 },
+ { :to => "172.16.0.0/12", :table => "main", :priority => 50 },
+ { :to => "192.168.0.0/16", :table => "main", :priority => 50 }
+ ]
+ },
:inet6 => {
:rules => [
{ :to => "2600:9000::/28", :table => 150, :priority => 100 }