Page MenuHomePhabricator

Support vector tile pre-generation
Closed, ResolvedPublic

Description

Context

We currently heavily rely on tile pre-generation in our map request flow.
Tegola allows cache seeding which can be used in a similar manner with our current pre-generation architecture.

Acceptance criteria
  • We have a setup to trigger batched tile seeding

Event Timeline

Jgiannelos renamed this task from Tile pre-generation to Support vector tile pre-generation.Dec 15 2020, 12:17 PM
Jgiannelos created this task.

Change 712375 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/software/tegola@wmf/v0.14.x] scripts: Fix reading default value for env var

https://gerrit.wikimedia.org/r/712375

Change 712375 merged by jenkins-bot:

[operations/software/tegola@wmf/v0.14.x] scripts: Fix reading default value for env var

https://gerrit.wikimedia.org/r/712375

Change 713904 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/puppet@production] maps: Install kafkacat on maps masters

https://gerrit.wikimedia.org/r/713904

Change 713904 merged by Hnowlan:

[operations/puppet@production] maps: Install kafkacat on osm master nodes

https://gerrit.wikimedia.org/r/713904

On tegola staging (k8s) we managed to have a couple of succesful runs of the cronjob defined here: https://github.com/wikimedia/operations-software-tegola/blob/wmf/v0.14.x/scripts/pregenerate-maps-tiles.sh

  • This verified that we can succesfuly consume kafka messages with expired tiles as payload.
  • When topic is empty job exits gracefully

There is a parsing issue for input with format:

{"tile": "15/11987/17639"}
{"tile": "15/8350/12771"}
{"tile": "15/24032/11194"}
{"tile": "15/15532/10901"}
{"tile": "15/17662/11303"}
{"tile": "15/23112/12439"}
{"tile": "15/22702/12313"}
{"tile": "15/15802/10706"}
{"tile": "15/23433/12278"}
{"tile": "15/22868/12148"}

Tegola raised this error:

2021-08-20 14:06:18 [INFO] root.go:62: Loading config file: /etc/tegola/config.toml
2021-08-20 14:06:18 [INFO] config.go:306: loading local config (/etc/tegola/config.toml)
2021-08-20 14:06:18 [INFO] providers.go:82: registering provider(type): osm (mvt_postgis)
2021-08-20 14:06:19 [INFO] tile_list.go:91: zoom list: []
2021-08-20 14:06:19 [INFO] cache.go:204: waiting for workers to finish up
2021-08-20 14:06:19 [INFO] cache.go:214: all workers are done
2021-08-20 14:06:19 [INFO] provider.go:256: cleaning up providers
2021/08/20 14:06:19 postgis.go:853: cleaning up postgis providers
Error: error seeding tile ({Z:15 X:22702 Y:12313}): ERROR: syntax error at or near ")" (SQLSTATE 42601)
error seeding tile ({Z:15 X:22702 Y:12313}): ERROR: syntax error at or near ")" (SQLSTATE 42601)
Usage:
  tegola cache seed tile-list filename|- [flags]

Examples:
  tile-list my-tile-list.txt

Flags:
      --format string   4 character string where the first character is a non-numeric delimiter followed by 'z', 'x' and 'y' defining the coordinate order (default "/zxy")
  -h, --help            help for tile-list
      --max-zoom uint   max zoom to seed cache to
      --min-zoom uint   min zoom to seed cache from
Global Flags:
      --concurrency int   the amount of concurrency to use. defaults to the number of CPUs on the machine (default 40)
      --config string     path to config file (default "config.toml")
      --map string        map name as defined in the config
      --overwrite         overwrite the cache if a tile already exists (default false)

Hopefully this is going to be easily reproducible on the local setup to avoid the complexity of trying to debug the jobs on k8s.

Change 722825 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/puppet@production] Add script to send tile invalidation events

https://gerrit.wikimedia.org/r/722825

Change 726522 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/software/tegola@wmf/v0.14.x] tile-pregeneration: Exclude canary test events

https://gerrit.wikimedia.org/r/726522

Change 726522 merged by jenkins-bot:

[operations/software/tegola@wmf/v0.14.x] tile-pregeneration: Exclude canary test events

https://gerrit.wikimedia.org/r/726522

Change 722825 merged by Hnowlan:

[operations/puppet@production] maps: Add script to send tile invalidation events

https://gerrit.wikimedia.org/r/722825

Change 737898 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[operations/puppet@production] maps: Add cronjob to send tile invalidation events

https://gerrit.wikimedia.org/r/737898

Jgiannelos updated the task description. (Show Details)

Currently we only have a way to send batched tiles but because of eventgate triggering a single tile is a matter of a curl command based on the template json we already maintain in the maps masters.

Change 737898 merged by Hnowlan:

[operations/puppet@production] maps: Add cronjob to send tile invalidation events

https://gerrit.wikimedia.org/r/737898