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'
- 'clean_tiler_cache'
- 'tiler_cache_paths'
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/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'
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/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
Expand All @@ -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
Expand Down
16 changes: 12 additions & 4 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.3305.h849ebdec
image: ghcr.io/openhistoricalmap/tiler-cache:0.0.1-0.dev.git.3305.hda810a70
environment:
- PORT=8000
env_file:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion images/tiler-cache/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading