From 6964a9a54628f951c6c3e5c70003d2483409aba5 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 25 Nov 2024 13:33:56 -0500 Subject: [PATCH] Update cronjob - tiler --- images/tiler-cache/seed.py | 2 +- ohm/templates/tiler-cache-seed/cronjob.yaml | 20 ++++++++++---------- values.staging.template.yaml | 7 ++++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/images/tiler-cache/seed.py b/images/tiler-cache/seed.py index 0841487f..7a30a7db 100644 --- a/images/tiler-cache/seed.py +++ b/images/tiler-cache/seed.py @@ -32,7 +32,7 @@ @click.option( "--zoom-levels", help="Comma-separated list of zoom levels", - default="8,9,10", + default="6,7,8,9", ) @click.option( "--concurrency", diff --git a/ohm/templates/tiler-cache-seed/cronjob.yaml b/ohm/templates/tiler-cache-seed/cronjob.yaml index b55f82a8..ee1a4810 100644 --- a/ohm/templates/tiler-cache-seed/cronjob.yaml +++ b/ohm/templates/tiler-cache-seed/cronjob.yaml @@ -30,16 +30,6 @@ spec: - | set -x - echo "Seeding tiler from 0 to 4 zoom levels" - # tegola cache seed \ - # --config=/opt/tegola_config/config.toml \ - # --map=osm \ - # --min-zoom=0 \ - # --max-zoom=4 \ - # --bounds=-180,-85.05112878,180,85.05112878 \ - # --concurrency=4 \ - # --overwrite=true - echo "Seeding tiler for $ZOOM_LEVELS zoom levels" python seed.py --geojson-url "$GEOJSON_URL" \ --feature-type "$FEATURE_TYPE" \ @@ -48,6 +38,16 @@ spec: --s3-bucket "$S3_BUCKET" \ --log-file "$OUTPUT_FILE" + echo "Seeding tiler from 0 to 5 zoom levels" + tegola cache seed \ + --config=/opt/tegola_config/config.toml \ + --map=osm \ + --min-zoom=0 \ + --max-zoom=5 \ + --bounds=-180,-85.05112878,180,85.05112878 \ + --concurrency=32 \ + --overwrite=true + {{- if .Values.ohm.tilerCacheSeed.resources.enabled }} resources: requests: diff --git a/values.staging.template.yaml b/values.staging.template.yaml index 07d4a83b..53811eda 100644 --- a/values.staging.template.yaml +++ b/values.staging.template.yaml @@ -968,7 +968,7 @@ ohm: MAX_ACTIVE_JOBS: 2 # Maximum number of active jobs in high concurrency queue DELETE_OLD_JOBS_AGE: 600 # Age in seconds to delete old jobs MIN_ZOOM: 8 # Minimum zoom level to clean and seed cache - MAX_ZOOM: 16 # Maximum zoom level to clean and seed cache + MAX_ZOOM: 15 # Maximum zoom level to clean and seed cache resources: enabled: false requests: @@ -982,13 +982,14 @@ ohm: label_key: nodegroup_type label_value: web_large + # Tiler seed by default is giong to seet tiles from 0-5 zoom level tilerCacheSeed: enabled: true - schedule: '* * * * *' + schedule: '0 * * * *' # testing every hour env: GEOJSON_URL: https://gist.githubusercontent.com/Rub21/9aaf349d74d974c0393700af8eeeb43d/raw/9f8fa0dde911705208141a4ff941e2e5b51e245b/eu.geojson FEATURE_TYPE: Polygon - ZOOM_LEVELS: '5,6,7' + ZOOM_LEVELS: '6,7,8,9' CONCURRENCY: 32 S3_BUCKET: osmseed-dev OUTPUT_FILE: /logs/tiler_benchmark.log