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
26 changes: 13 additions & 13 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'
- 'pg_user'
- 'k8s_deploy'
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/pg_user'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/k8s_deploy'
uses: bluwy/substitute-string-action@v1
with:
_input-file: 'values.staging.template.yaml'
Expand Down Expand Up @@ -189,46 +189,46 @@ 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/pg_user'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/k8s_deploy'
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/pg_user'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/k8s_deploy'
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
sudo curl -L -o /usr/bin/kubectl https://dl.k8s.io/release/v1.33.0/bin/linux/amd64/kubectl
sudo chmod +x /usr/bin/kubectl
sudo curl -o /usr/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.7/2020-07-08/bin/linux/amd64/aws-iam-authenticator
sudo curl -o /usr/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/aws-iam-authenticator
sudo chmod +x /usr/bin/aws-iam-authenticator
curl -L https://get.helm.sh/helm-v3.14.4-linux-amd64.tar.gz -o helm.tar.gz
curl -L https://get.helm.sh/helm-v3.17.3-linux-amd64.tar.gz -o helm.tar.gz
tar -xvzf helm.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/
sudo chmod +x /usr/local/bin/helm
helm version

- name: Update kube-config staging
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/pg_user'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/k8s_deploy'
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/pg_user'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/k8s_deploy'
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/pg_user'
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/k8s_deploy'
run: cd ohm && helm dep up
# Staging
- name: Staging - helm deploy
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/pg_user'
run: helm upgrade --install staging --wait ohm/ -f values.staging.yaml -f ohm/values.yaml
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/k8s_deploy'
run: helm upgrade --install staging --wait --timeout 10m ohm/ -f values.staging.yaml -f ohm/values.yaml
# Production
- name: Production - helm deploy
if: github.ref == 'refs/heads/main'
run: helm upgrade --install production --wait ohm/ -f values.production.yaml -f ohm/values.yaml
run: helm upgrade --install production --wait --timeout 10m ohm/ -f values.production.yaml -f ohm/values.yaml

2 changes: 1 addition & 1 deletion hetzner/tiler/tiler.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
# Tiler server
tiler_server:
container_name: tiler_server
image: ghcr.io/openhistoricalmap/tiler-server:0.0.1-0.dev.git.3296.h0e45d176
image: ghcr.io/openhistoricalmap/tiler-server:0.0.1-0.dev.git.3292.h0f5e7d60
# ports:
# - "9090:9090"
restart: always
Expand Down
2 changes: 1 addition & 1 deletion images/cgimap/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ else
psql -h $POSTGRES_HOST -U $POSTGRES_USER -c "SHOW enable_mergejoin;"
psql -h $POSTGRES_HOST -U $POSTGRES_USER -c "SHOW enable_hashjoin;"
# Start the cgimap service
openstreetmap-cgimap --port=8000 --daemon --instances=10
openstreetmap-cgimap --port=8000 --daemon --instances=5
# Sleep fo 3 sec for tail the logs
sleep 3
# Keep container alive
Expand Down
16 changes: 8 additions & 8 deletions values.production.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ osm-seed:
max_connections = 200
shared_buffers = 4GB
work_mem = 20MB
maintenance_work_mem = 512MB
maintenance_work_mem = 1GB
dynamic_shared_memory_type = posix
effective_io_concurrency = 200
max_wal_size = 1GB
min_wal_size = 256MB
random_page_cost = 1.0
effective_cache_size = 8GB
max_wal_size = 2GB
min_wal_size = 512MB
random_page_cost = 1.1
effective_cache_size = 12GB
log_min_duration_statement = 3000
log_connections = on
log_disconnections = on
Expand All @@ -86,9 +86,9 @@ osm-seed:
lc_time = 'en_US.utf8'
default_text_search_config = 'pg_catalog.english'
# Parallelism settings
max_parallel_workers_per_gather = 2
max_parallel_workers = 4
max_worker_processes = 4
max_parallel_workers_per_gather = 1
max_parallel_workers = 2
max_worker_processes = 2
parallel_tuple_cost = 0.05
parallel_setup_cost = 500
min_parallel_table_scan_size = 2MB
Expand Down
Loading