Skip to content

Commit

Permalink
Update cronjob - tiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Nov 25, 2024
1 parent 09c292e commit 6964a9a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion images/tiler-cache/seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
20 changes: 10 additions & 10 deletions ohm/templates/tiler-cache-seed/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 6964a9a

Please sign in to comment.