]> git.openstreetmap.org Git - chef.git/blob - cookbooks/vectortile/templates/default/import-planet.erb
vectortile: update spirit
[chef.git] / cookbooks / vectortile / templates / default / import-planet.erb
1 #!/bin/sh
2
3 # Usage
4 # sudo -u tileupdate import-planet osmfile.osm.pbf
5 # sudo -u tileupdate import-planet --cache 50000 osmfile.osm.pbf
6 # This script sets the appropriate Lua and style paths for the osm2pgsql import
7
8 set -e
9
10 export LUA_PATH='/srv/vector.openstreetmap.org/osm2pgsql-themepark/lua/?.lua;;'
11 export PGAPPNAME='import-planet'
12
13 # Import the osm2pgsql file specified as an argument, using the locations for spirit
14 osm2pgsql \
15   --output flex \
16   --style '/srv/vector.openstreetmap.org/spirit/shortbread.lua' \
17   --slim \
18   <%= @node_store_options %> \
19   -d spirit \
20   $@
21
22 # Set up replication. This doesn't specify the replication server, so it will use planet.osm.org on extracts
23 osm2pgsql-replication init \
24   -d spirit \
25   --server '<%= node[:vectortile][:replication][:url] %>'