Skip to content

Commit

Permalink
update osm-seed version
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Aug 17, 2023
1 parent 69f6108 commit d4d72c6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
15 changes: 8 additions & 7 deletions images/tiler-server/rm_tegola_ps.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash
set -e
if [[ -n "${CLEAN_CACHE_MANUALLY}" && "${CLEAN_CACHE_MANUALLY}" == "true" && "${TILER_CACHE_TYPE}" && "${TILER_CACHE_TYPE}" == "s3" ]]; then
if [[ -n "${KILL_PROCESS}" && "${KILL_PROCESS}" == "manually" ]]; then
while true; do
NUM_PS_TEGOLA=$(ps | grep ${CACHE_PROCESS_NAME} | grep -v grep | wc -l)
if [[ $NUM_PS_TEGOLA -gt $MAX_PS_TEGOLA ]]; then
aws s3 rm s3://${TILER_CACHE_BUCKET}/mnt/data/osm/ --recursive
echo "${CACHE_PROCESS_NAME} processes"
ps aux | grep ${CACHE_PROCESS_NAME} | grep -v grep
NUM_PS=$(ps | grep ${PROCESS_NAME} | grep -v grep | wc -l)
if [[ $NUM_PS -gt $MAX_NUM_PS ]]; then
echo "${PROCESS_NAME} processes"
ps aux | grep ${PROCESS_NAME} | grep -v grep
# After clearing the S3 cache, terminate all 'tegola' processes.
killall ${CACHE_PROCESS_NAME}
killall ${PROCESS_NAME}
# Clean cache manually from s3
aws s3 rm s3://${TILER_CACHE_BUCKET}/mnt/data/osm/ --recursive
fi
sleep 600
done
Expand Down
2 changes: 1 addition & 1 deletion ohm/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: osm-seed
version: '0.1.0-n766.h8aa9c96'
version: '0.1.0-n767.hc4ce55f'
repository: https://devseed.com/osm-seed-chart/
6 changes: 3 additions & 3 deletions values.production.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ osm-seed:
memory: "10Gi"
cpu: "2"
env:
CLEAN_CACHE_MANUALLY: true
MAX_PS_TEGOLA: 5
CACHE_PROCESS_NAME: tegola
KILL_PROCESS: manually
MAX_NUM_PS: 5
PROCESS_NAME: tegola
autoscaling:
enabled: false
minReplicas: 1
Expand Down
6 changes: 3 additions & 3 deletions values.staging.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ osm-seed:
memory: "10Gi"
cpu: "2"
env:
CLEAN_CACHE_MANUALLY: true
MAX_PS_TEGOLA: 5
CACHE_PROCESS_NAME: tegola
KILL_PROCESS: manually
MAX_NUM_PS: 3
PROCESS_NAME: bash
autoscaling:
enabled: false
minReplicas: 1
Expand Down

0 comments on commit d4d72c6

Please sign in to comment.