-
Notifications
You must be signed in to change notification settings - Fork 11
Render Database Load
Grant edited this page Aug 17, 2025
·
26 revisions
- Chef up server using the tile role if necessary
- Create a temporary directory for the planet file under
/store/tmp - Download planet.pbf and check the md5sum
- Stop chef-client, apache2, renderd and replicate services
- Check the drive has space free with
df -h /var/lib/postgresql/*/main - Load planet with
sudo -u tile osm2pgsql --slim --database=gis --cache=80000 --flat-nodes=/store/database/nodes --number-processes=16 --multi-geometry --hstore --style=/srv/tile.openstreetmap.org/styles/default/openstreetmap-carto.style --tag-transform-script=/srv/tile.openstreetmap.org/styles/default/openstreetmap-carto.lua planet-latest.osm.pbf - Create additional indexes using
sudo -u tile psql -d gis -f /srv/tile.openstreetmap.org/styles/default/indexes.sql - Initialise replication -
sudo -u tile osm2pgsql-replication init -d gis - Run chef-client which should fix the database permissions and start apache2, renderd and the replication service
- Let replication bring the database up to date
- Render low zoom tiles with
sudo -u tile render_list --all --force --tile-dir=/srv/tile.openstreetmap.org/tiles --socket=/var/run/renderd/renderd.sock --num-threads=N --max-load=70 --min-zoom=0 --max-zoom=12
- Check server is responding to HTTP with
https://<servername>.openstreetmap.org/andhttps://<servername>.openstreetmap.org/0/0/0.png - PR adding the server
tile_backendsin https://github.com/openstreetmap/opentofu-fastly/blob/main/tile.tf and add the server and initial low weight in https://github.com/openstreetmap/opentofu-fastly/blob/main/snippets/tile.openstreetmap.org/init/define-directors.vcl (Merged PRs deploy). GitHub repo is private.