Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/chartpress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- 'main'
- 'staging'
- 'test_deploy'
- 'clean_tiler_cache'
jobs:
build:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
OHM_SLACK_WEBHOOK_URL: ${{ secrets.OHM_SLACK_WEBHOOK_URL }}
################ Staging secrets ################
- name: Staging - substitute secrets
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/test_deploy'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/clean_tiler_cache'
uses: bluwy/substitute-string-action@v1
with:
_input-file: 'values.staging.template.yaml'
Expand Down Expand Up @@ -189,14 +189,14 @@ jobs:
PRODUCTION_OPENSTREETMAP_AUTH_SECRET: ${{ secrets.PRODUCTION_OPENSTREETMAP_AUTH_SECRET }}

- name: AWS Credentials
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test_deploy'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/clean_tiler_cache'
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Setup Kubectl and Helm Dependencies
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test_deploy'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/clean_tiler_cache'
run: |
sudo pip install awscli --ignore-installed six
sudo curl -L -o /usr/bin/kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.7/2020-07-08/bin/linux/amd64/kubectl
Expand All @@ -210,22 +210,22 @@ jobs:
helm version

- name: Update kube-config staging
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/test_deploy'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/clean_tiler_cache'
run: aws eks --region us-east-1 update-kubeconfig --name osmseed-staging
- name: Update kube-config prod
if: github.ref == 'refs/heads/main'
run: aws eks --region us-east-1 update-kubeconfig --name osmseed-production-v2
- name: Add Helm repository
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test_deploy'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/clean_tiler_cache'
run: |
helm repo add osm-seed https://osm-seed.github.io/osm-seed-chart/
helm repo update
- name: Install helm dependencies for
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/test_deploy'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/clean_tiler_cache'
run: cd ohm && helm dep up
# Staging
- name: Staging - helm deploy
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/test_deploy'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/clean_tiler_cache'
run: helm upgrade --install staging --wait ohm/ -f values.staging.yaml -f ohm/values.yaml
# Production
- name: Production - helm deploy
Expand Down
4 changes: 2 additions & 2 deletions hetzner/tiler/tiler.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:

tiler_sqs_cleaner:
container_name: tiler_sqs_cleaner
image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3245.hffaf924
image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3305.h849ebdec
environment:
- PORT=8000
env_file:
Expand All @@ -70,7 +70,7 @@ services:

tiler_s3_cleaner:
container_name: tiler_s3_cleaner
image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3245.hffaf924
image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3305.h849ebdec
command:
- tiler-cache-cleaner
- clean_by_prefix
Expand Down
5 changes: 4 additions & 1 deletion images/tiler-cache/sqs_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def execute_cleanup_for_all_paths(s3_imposm3_exp_path, cleanup_type):
# To add a new delay, just add a tuple here
DELAYED_CLEANUPS = [
("delayed_cleanup_15min", 900), # 15 minutes
("delayed_cleanup_1hour", 7200), # 2 hour
("delayed_cleanup_1hour", 7200), # 1 hour
("delayed_cleanup_2hour", 14400), # 2 hour
("delayed_cleanup_12hour", 43200), # 12 hour
("delayed_cleanup_24hour", 86400), # 24 hour
]


Expand Down
Loading