From da810a7019f898a7c5131105e26ade800c5732c3 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Sun, 1 Mar 2026 11:07:47 -0500 Subject: [PATCH 1/2] Fix path to clean --- .github/workflows/chartpress.yaml | 16 ++++++++-------- images/tiler-cache/config.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/chartpress.yaml b/.github/workflows/chartpress.yaml index 964f7d1d..9a216ec4 100644 --- a/.github/workflows/chartpress.yaml +++ b/.github/workflows/chartpress.yaml @@ -4,7 +4,7 @@ on: branches: - 'main' - 'staging' - - 'clean_tiler_cache' + - 'tiler_cache_paths' jobs: build: runs-on: ubuntu-22.04 @@ -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/clean_tiler_cache' + if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/tiler_cache_paths' uses: bluwy/substitute-string-action@v1 with: _input-file: 'values.staging.template.yaml' @@ -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/clean_tiler_cache' + if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tiler_cache_paths' 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/clean_tiler_cache' + if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tiler_cache_paths' 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 @@ -210,22 +210,22 @@ jobs: helm version - name: Update kube-config staging - if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/clean_tiler_cache' + if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/tiler_cache_paths' 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/clean_tiler_cache' + if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tiler_cache_paths' 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/clean_tiler_cache' + if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/tiler_cache_paths' run: cd ohm && helm dep up # Staging - name: Staging - helm deploy - if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/clean_tiler_cache' + if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/tiler_cache_paths' run: helm upgrade --install staging --wait ohm/ -f values.staging.yaml -f ohm/values.yaml # Production - name: Production - helm deploy diff --git a/images/tiler-cache/config.py b/images/tiler-cache/config.py index 77084ffa..3b1e8db3 100644 --- a/images/tiler-cache/config.py +++ b/images/tiler-cache/config.py @@ -39,7 +39,7 @@ class Config: ) S3_BUCKET_CACHE_TILER = os.getenv("S3_BUCKET_CACHE_TILER", "tiler-cache-staging") # TODO , Replace mnt/data/osm to mnt/data/ohm - S3_BUCKET_PATH_FILES = os.getenv("S3_BUCKET_PATH_FILES", "mnt/data/osm,mnt/data/ohm_admin").split(",") + S3_BUCKET_PATH_FILES = os.getenv("S3_BUCKET_PATH_FILES", "mnt/data/ohm,mnt/data/ohm_admin,mnt/data/ohm_other_boundaries").split(",") # AWS S3 Credentials TILER_CACHE_CLOUD_INFRASTRUCTURE = os.getenv( From a95a44060ece1c04239d4f104e1a963472bcadee Mon Sep 17 00:00:00 2001 From: Rub21 Date: Sun, 1 Mar 2026 11:28:04 -0500 Subject: [PATCH 2/2] Update path to remove from s3 --- hetzner/tiler/tiler.production.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hetzner/tiler/tiler.production.yml b/hetzner/tiler/tiler.production.yml index 6fbe779b..26e51d68 100644 --- a/hetzner/tiler/tiler.production.yml +++ b/hetzner/tiler/tiler.production.yml @@ -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.3305.h849ebdec + image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3305.hda810a70 environment: - PORT=8000 env_file: @@ -70,10 +70,18 @@ services: tiler_s3_cleaner: container_name: tiler_s3_cleaner - image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3305.h849ebdec + image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3305.hda810a70 + # image: tiler-cache:latest + # build: + # context: ../../images/tiler-cache + # dockerfile: Dockerfile command: - - tiler-cache-cleaner - - clean_by_prefix + - /bin/sh + - -c + - | + tiler-cache-cleaner clean_by_prefix --prefix-path-file mnt/data/ohm + tiler-cache-cleaner clean_by_prefix --prefix-path-file mnt/data/ohm_admin + tiler-cache-cleaner clean_by_prefix --prefix-path-file mnt/data/ohm_other_boundaries env_file: - .env.tiler networks: