Skip to content

Commit 45cbe5d

Browse files
authored
Tiler updates and add attributes (#743)
* Rename purge to fresh_tiles for bypass in martin * Update website to pass fresh_tiles argument to fetch fresh vtiles * Update bypass argument name for martin-nginx * Update ohm website * Skip relations without a member for monitor * Update docker image monitor * Include track, path, footway, cycleway, pedestrian, living_street, steps, bridleway in mv_transport_lines_z13_15 * Add expressway in transport_lines * Add imposm config to expose airport codes * Update config to import tiler db * Update config for taginfo and osmcha * Update buffer to clic a object and get info * Add nulls as parameters for create_areas_mview to overwrite ref values * Update values for tiler docekr images * Update martin docker image
1 parent 7b445b0 commit 45cbe5d

28 files changed

Lines changed: 271 additions & 109 deletions

.github/workflows/chartpress.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- 'main'
66
- 'staging'
7-
- 'martin_vtiles'
7+
- 'req_fresh_tiles'
88
jobs:
99
build:
1010
runs-on: ubuntu-22.04
@@ -71,7 +71,7 @@ jobs:
7171
OHM_SLACK_WEBHOOK_URL: ${{ secrets.OHM_SLACK_WEBHOOK_URL }}
7272
################ Staging secrets ################
7373
- name: Staging - substitute secrets
74-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/martin_vtiles'
74+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/req_fresh_tiles'
7575
uses: bluwy/substitute-string-action@v1
7676
with:
7777
_input-file: 'values.staging.template.yaml'
@@ -189,14 +189,14 @@ jobs:
189189
PRODUCTION_OPENSTREETMAP_AUTH_SECRET: ${{ secrets.PRODUCTION_OPENSTREETMAP_AUTH_SECRET }}
190190

191191
- name: AWS Credentials
192-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/martin_vtiles'
192+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/req_fresh_tiles'
193193
uses: aws-actions/configure-aws-credentials@v1
194194
with:
195195
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
196196
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
197197
aws-region: us-east-1
198198
- name: Setup Kubectl and Helm Dependencies
199-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/martin_vtiles'
199+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/req_fresh_tiles'
200200
run: |
201201
sudo pip install awscli --ignore-installed six
202202
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:
210210
helm version
211211
212212
- name: Update kube-config staging
213-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/martin_vtiles'
213+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/req_fresh_tiles'
214214
run: aws eks --region us-east-1 update-kubeconfig --name osmseed-staging
215215
- name: Update kube-config prod
216216
if: github.ref == 'refs/heads/main'
217217
run: aws eks --region us-east-1 update-kubeconfig --name osmseed-production-v2
218218
- name: Add Helm repository
219-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/martin_vtiles'
219+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/req_fresh_tiles'
220220
run: |
221221
helm repo add osm-seed https://osm-seed.github.io/osm-seed-chart/
222222
helm repo update
223223
- name: Install helm dependencies for
224-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/martin_vtiles'
224+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/req_fresh_tiles'
225225
run: cd ohm && helm dep up
226226
# Staging
227227
- name: Staging - helm deploy
228-
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/martin_vtiles'
228+
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/req_fresh_tiles'
229229
run: helm upgrade --install staging --wait ohm/ -f values.staging.yaml -f ohm/values.yaml
230230
# Production
231231
- name: Production - helm deploy

compose/tiler.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,24 @@ services:
7272
# - ohm_network
7373

7474

75-
tiler-monitor:
76-
image: rub21/tiler-monitor:v2
77-
build:
78-
context: ../images/tiler-monitor
79-
dockerfile: Dockerfile
80-
volumes:
81-
- /var/run/docker.sock:/var/run/docker.sock
82-
- ../hetzner:/app/hetzner
83-
- tiler_monitor_data:/data
84-
ports:
85-
- "8001:8001"
86-
environment:
87-
- TILER_MONITORING_DOCKER_CONFIG_ENVIRONMENT=staging
88-
env_file:
89-
- ../envs/.env.tiler
90-
restart: always
91-
networks:
92-
- ohm_network
75+
# tiler-monitor:
76+
# image: rub21/tiler-monitor:v2
77+
# build:
78+
# context: ../images/tiler-monitor
79+
# dockerfile: Dockerfile
80+
# volumes:
81+
# - /var/run/docker.sock:/var/run/docker.sock
82+
# - ../hetzner:/app/hetzner
83+
# - tiler_monitor_data:/data
84+
# ports:
85+
# - "8001:8001"
86+
# environment:
87+
# - TILER_MONITORING_DOCKER_CONFIG_ENVIRONMENT=staging
88+
# env_file:
89+
# - ../envs/.env.tiler
90+
# restart: always
91+
# networks:
92+
# - ohm_network
9393

9494
networks:
9595
ohm_network:
@@ -98,12 +98,12 @@ networks:
9898
volumes:
9999
tiler_pgdata:
100100
driver: local
101-
name: tiler_db
101+
name: tiler_db_1704
102102

103103
tiler_imposm_data:
104104
driver: local
105-
name: tiler_imposm
105+
name: tiler_imposm_1704
106106

107107
tiler_monitor_data:
108108
driver: local
109-
name: tiler_monitor
109+
name: tiler_monitor_1704

hetzner/osmcha/osmcha.production.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ services:
44
container_name: osmcha_ohmx_adiff
55
environment:
66
- API_URL=https://api.${OHM_DOMAIN}
7-
- PLANET_PBF_URL=https://s3.amazonaws.com/planet.openhistoricalmap.org/planet/planet-260408_0307.osm.pbf
7+
- PLANET_PBF_URL=https://s3.amazonaws.com/planet.openhistoricalmap.org/planet/planet-260418_0301.osm.pbf
88
- MINUTE_REPLICATION_URL=https://planet.openhistoricalmap.org/?prefix=replication/minute/
99
# Add OSMX_INITIAL_SEQNUM to start from a specific sequence number
10-
# - OSMX_INITIAL_SEQNUM=1900000
10+
- OSMX_INITIAL_SEQNUM=1900000
1111
- AWS_S3_BUCKET=planet.openhistoricalmap.org
1212
env_file:
1313
- ./.env.osmcha

hetzner/taginfo/taginfo.base.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ services:
55
env_file:
66
- ./.env.taginfo
77
restart: always
8+
command:
9+
- /bin/bash
10+
- -lc
11+
- |
12+
set -ex
13+
while true; do
14+
rm -rf /usr/src/app/data/*.db
15+
/usr/src/app/start.sh
16+
sleep 270000
17+
done
818
networks:
919
- ohm_network
1020

hetzner/taginfo/taginfo.production.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,11 @@ services:
1515
- -lc
1616
- |
1717
set -ex
18-
echo "#!/bin/bash
19-
rm -rf /usr/src/app/data/*
20-
/usr/src/app/start.sh
21-
sleep 7200
22-
# restart web container
23-
curl -v -X POST --unix-socket /var/run/docker.sock http://localhost/v1.41/containers/taginfo_web/restart" > /run_task.sh
24-
chmod +x /run_task.sh
25-
/run_task.sh
26-
# 2. Set cron: Run every 3 days at 3:00 AM
27-
echo "0 8 */3 * * /run_task.sh >> /var/log/taginfo-cron.log 2>&1" | crontab -
28-
29-
touch /var/log/taginfo-cron.log
30-
cron -f
18+
while true; do
19+
rm -rf /usr/src/app/data/*
20+
/usr/src/app/start.sh
21+
sleep 259200
22+
done
3123
env_file:
3224
- ./.env.taginfo
3325
networks:

hetzner/tiler/tiler.production.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818

1919
tiler_imposm:
2020
container_name: tiler_imposm
21-
image: ghcr.io/openhistoricalmap/tiler-imposm:0.0.1-0.dev.git.3374.h513ba86f
21+
image: ghcr.io/openhistoricalmap/tiler-imposm:0.0.1-0.dev.git.3356.h880c9a8b
2222
volumes:
2323
- tiler_imposm_data:/mnt/data
2424
env_file:
@@ -121,7 +121,7 @@ services:
121121

122122
tiler_monitor:
123123
container_name: tiler_monitor
124-
image: ghcr.io/openhistoricalmap/tiler-monitor:0.0.1-0.dev.git.3364.hd63ad03e
124+
image: ghcr.io/openhistoricalmap/tiler-monitor:0.0.1-0.dev.git.3348.h4fbb83d8
125125
volumes:
126126
- /var/run/docker.sock:/var/run/docker.sock
127127
# - ../../images/tiler-monitor:/app
@@ -138,12 +138,14 @@ services:
138138

139139
tiler_server_martin:
140140
container_name: tiler_server_martin
141-
image: ghcr.io/openhistoricalmap/tiler-server-martin:0.0.1-0.dev.git.3374.h513ba86f
141+
image: ghcr.io/openhistoricalmap/tiler-server-martin:0.0.1-0.dev.git.3357.he67b0015
142142
restart: always
143143
environment:
144144
- OHM_DOMAIN=${OHM_DOMAIN:-openhistoricalmap.org}
145145
env_file:
146146
- .env.tiler
147+
ports:
148+
- "3030:80"
147149
volumes:
148150
- tiler_martin_nginx_cache:/var/cache/nginx
149151
networks:
@@ -153,16 +155,16 @@ services:
153155
volumes:
154156
tiler_pgdata:
155157
driver: local
156-
name: tiler_db
158+
name: tiler_db_1704
157159
tiler_imposm_data:
158160
driver: local
159-
name: tiler_imposm
161+
name: tiler_imposm_1704
160162
tiler_monitor_data:
161163
driver: local
162-
name: tiler_monitor_data_v3
164+
name: tiler_monitor_1704
163165
tiler_martin_nginx_cache:
164166
driver: local
165-
name: tiler_martin_nginx_cache
167+
name: tiler_martin_nginx_cache_1704
166168
networks:
167169
ohm_network:
168170
external: true

images/tiler-imposm/config/layers/street_multilines.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@
112112
"name": "route",
113113
"key": "route"
114114
},
115+
{
116+
"type": "string",
117+
"name": "expressway",
118+
"key": "expressway"
119+
},
115120
{
116121
"type": "string",
117122
"name": "start_date",

images/tiler-imposm/config/layers/transport_areas.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@
4141
"name": "class",
4242
"key": null
4343
},
44+
{
45+
"type": "string",
46+
"name": "ref",
47+
"key": "ref"
48+
},
49+
{
50+
"type": "string",
51+
"name": "iata",
52+
"key": "iata"
53+
},
54+
{
55+
"type": "string",
56+
"name": "icao",
57+
"key": "icao"
58+
},
59+
{
60+
"type": "string",
61+
"name": "faa",
62+
"key": "faa"
63+
},
4464
{
4565
"type": "string",
4666
"name": "start_date",

images/tiler-imposm/config/layers/transport_lines.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@
111111
"name": "route",
112112
"key": "route"
113113
},
114+
{
115+
"type": "string",
116+
"name": "expressway",
117+
"key": "expressway"
118+
},
114119
{
115120
"type": "string",
116121
"name": "start_date",

images/tiler-imposm/config/layers/transport_multilines.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@
126126
"name": "route",
127127
"key": "route"
128128
},
129+
{
130+
"type": "string",
131+
"name": "expressway",
132+
"key": "expressway"
133+
},
129134
{
130135
"key": "type",
131136
"name": "relation_type",

0 commit comments

Comments
 (0)