Skip to content

Commit 9630297

Browse files
committed
Update cgimap config
Update relese tag Pass env vars in web container for cgimap Update release tag Update tag name Update release tags
1 parent fe68c7e commit 9630297

File tree

7 files changed

+72
-90
lines changed

7 files changed

+72
-90
lines changed

.github/workflows/chartpress.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
then
4343
chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}-dev.h$SHORT_GITHUB_SHA
4444
else
45-
chartpress --push --publish-chart
45+
chartpress --push --publish-chart --tag
4646
fi
4747

chartpress.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ charts:
3030
valuesPath: tilerServer.image
3131
tasking-manager-api:
3232
valuesPath: tmApi.image
33-
# tiler-visor:
34-
# valuesPath: tilerVisor.image
3533
nominatim:
3634
valuesPath: nominatimApi.image
3735
overpass-api:
@@ -50,3 +48,4 @@ charts:
5048
valuesPath: planetFiles.image
5149
cgimap:
5250
valuesPath: cgimap.image
51+

osm-seed/templates/cgimap/cgimap-deployment.yaml

+15-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: {{ template "osm-seed.fullname" . }}-cgimap
5+
name: {{ .Release.Name }}-cgimap-deployment
66
labels:
77
app: {{ template "osm-seed.name" . }}
88
component: cgimap-deployment
@@ -14,27 +14,31 @@ spec:
1414
matchLabels:
1515
app: {{ template "osm-seed.name" . }}
1616
release: {{ .Release.Name }}
17-
run: {{ .Release.Name }}-cgimap
17+
run: {{ .Release.Name }}-cgimap-deployment
1818
template:
1919
metadata:
2020
labels:
2121
app: {{ template "osm-seed.name" . }}
2222
release: {{ .Release.Name }}
23-
run: {{ .Release.Name }}-cgimap
23+
run: {{ .Release.Name }}-cgimap-deployment
2424
spec:
2525
containers:
2626
- name: {{ .Chart.Name }}-cgimap
2727
image: "{{ .Values.cgimap.image.name }}:{{ .Values.cgimap.image.tag }}"
2828
ports:
2929
- name: http
30-
containerPort: 80
30+
containerPort: 8000
3131
protocol: TCP
3232
livenessProbe:
33-
httpGet:
34-
path: /
35-
port: 80
36-
initialDelaySeconds: 600 # 10 min, because the compile process takes time.
37-
timeoutSeconds: 30
33+
exec:
34+
command:
35+
- /bin/bash
36+
- -c
37+
- /liveness.sh
38+
initialDelaySeconds: 30
39+
timeoutSeconds: 5
40+
periodSeconds: 10
41+
failureThreshold: 3
3842
{{- if .Values.cgimap.resources.enabled }}
3943
resources:
4044
requests:
@@ -49,14 +53,12 @@ spec:
4953
value: {{ .Release.Name }}-db
5054
- name: POSTGRES_DB
5155
value: {{ .Values.db.env.POSTGRES_DB }}
56+
- name: PGPASSWORD
57+
value: {{ quote .Values.db.env.POSTGRES_PASSWORD }}
5258
- name: POSTGRES_PASSWORD
5359
value: {{ quote .Values.db.env.POSTGRES_PASSWORD }}
5460
- name: POSTGRES_USER
5561
value: {{ .Values.db.env.POSTGRES_USER }}
56-
- name: API_WEB_HOST
57-
value: {{ .Release.Name }}-web
58-
- name: API_WEB_PORT
59-
value: 80
6062
{{- if .Values.cgimap.nodeSelector.enabled }}
6163
nodeSelector:
6264
{{ .Values.cgimap.nodeSelector.label_key }} : {{ .Values.cgimap.nodeSelector.label_value }}

osm-seed/templates/cgimap/cgimap-ingress.yaml

-26
This file was deleted.

osm-seed/templates/cgimap/cgimap-service.yaml

+3-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: {{ template "osm-seed.fullname" . }}-cgimap
5+
name: {{ .Release.Name }}-cgimap-service
66
labels:
77
app: {{ template "osm-seed.name" . }}
88
component: cgimap-service
@@ -30,14 +30,8 @@ spec:
3030
targetPort: http
3131
protocol: TCP
3232
name: http
33-
{{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
34-
- port: 443
35-
targetPort: http
36-
protocol: TCP
37-
name: https
38-
{{- end }}
3933
selector:
4034
app: {{ template "osm-seed.name" . }}
4135
release: {{ .Release.Name }}
42-
run: {{ .Release.Name }}-cgimap
43-
{{- end }}
36+
run: {{ .Release.Name }}-cgimap-deployment
37+
{{- end }}

osm-seed/templates/web/web-deployment.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@ spec:
154154
value: {{ .Values.web.env.RAILS_STORAGE_REGION | quote }}
155155
- name: RAILS_STORAGE_BUCKET
156156
value: {{ .Values.web.env.RAILS_STORAGE_BUCKET | quote }}
157+
# Cgimap run in external container
158+
{{- if and .Values.web.env.EXTERNAL .Values.cgimap.enabled }}
159+
- name: CGIMAP_URL
160+
value: {{ .Release.Name }}-cgimap-service
161+
- name: CGIMAP_PORT
162+
value: {{ quote 80 }}
163+
{{- else }}
164+
- name: CGIMAP_URL
165+
value: "127.0.0.1"
166+
- name: CGIMAP_PORT
167+
value: {{ quote 8000 }}
168+
{{- end }}
157169
volumeMounts:
158170
- mountPath: /dev/shm
159171
name: shared-memory

osm-seed/values.yaml

+40-39
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ db:
127127
max_worker_processes = 4
128128
max_parallel_workers_per_gather = 2
129129
max_parallel_workers = 4
130-
130+
131131
# ====================================================================================================
132132
# Variables for osm-seed website
133133
# ====================================================================================================
@@ -161,6 +161,7 @@ web:
161161
RAILS_STORAGE_SERVICE: local
162162
RAILS_STORAGE_REGION: us-east-1
163163
RAILS_STORAGE_BUCKET: osmseed-website-bucket
164+
EXTERNAL_CGIMAP: false
164165
resources:
165166
enabled: false
166167
requests:
@@ -200,6 +201,23 @@ memcached:
200201
enabled: false
201202
memory: "2Gi"
202203
cpu: "2"
204+
205+
# ====================================================================================================
206+
# Cgimap
207+
# ====================================================================================================
208+
cgimap:
209+
enabled: false
210+
priorityClass: "low-priority"
211+
resources:
212+
enabled: false
213+
requests:
214+
memory: '20Gi'
215+
cpu: '8'
216+
limits:
217+
memory: '24Gi'
218+
cpu: '10'
219+
nodeSelector:
220+
enabled: false
203221
# ====================================================================================================
204222
# Variables for full-history container
205223
# ====================================================================================================
@@ -460,7 +478,8 @@ tilerImposm:
460478
env:
461479
TILER_IMPORT_FROM: osm
462480
TILER_IMPORT_PBF_URL: http://download.geofabrik.de/europe/monaco-latest.osm.pbf
463-
TILER_IMPORT_LIMIT: https://gist.githubusercontent.com/Rub21/96bdcac5eb11f0b36ba8d0352ac537f4/raw/2606f2e207d4a0d895897a83efa1efacefd36eb4/monaco.geojson
481+
TILER_IMPORT_LIMIT:
482+
https://gist.githubusercontent.com/Rub21/96bdcac5eb11f0b36ba8d0352ac537f4/raw/2606f2e207d4a0d895897a83efa1efacefd36eb4/monaco.geojson
464483
TILER_CACHE_AWS_ENDPOINT: ""
465484
UPLOAD_EXPIRED_FILES: true
466485
IMPORT_NATURAL_EARTH: true
@@ -718,7 +737,8 @@ nominatimApi:
718737
THREADS: 4
719738
NOMINATIM_PASSWORD: psw1234
720739
PGDATA: /var/lib/postgresql/14/main
721-
NOMINATIM_ADDRESS_LEVEL_CONFIG_URL: https://gist.githubusercontent.com/lonvia/8502c61b3dd159e67eb8be8368d864c1/raw/d05a1d681230632bb2e35cbf363f2baec8acd657/address-levels.json
740+
NOMINATIM_ADDRESS_LEVEL_CONFIG_URL:
741+
https://gist.githubusercontent.com/lonvia/8502c61b3dd159e67eb8be8368d864c1/raw/d05a1d681230632bb2e35cbf363f2baec8acd657/address-levels.json
722742
UPDATE_MODE: continuous #Options: `continuous`/`once`/`catch-up`/`none` (default: `none`)
723743
OSMSEED_WEB_API_DOMAIN: www.openstreetmap.org
724744
resources:
@@ -764,7 +784,8 @@ overpassApi:
764784
OVERPASS_PLANET_URL: http://download.geofabrik.de/europe/monaco-latest.osm.bz2
765785
OVERPASS_DIFF_URL: http://download.openstreetmap.fr/replication/europe/monaco/minute/
766786
OVERPASS_RULES_LOAD: 10
767-
OVERPASS_PLANET_PREPROCESS: 'mv /db/planet.osm.bz2 /db/planet.osm.pbf && osmium cat -o /db/planet.osm.bz2 /db/planet.osm.pbf && rm /db/planet.osm.pbf'
787+
OVERPASS_PLANET_PREPROCESS: 'mv /db/planet.osm.bz2 /db/planet.osm.pbf && osmium
788+
cat -o /db/planet.osm.bz2 /db/planet.osm.pbf && rm /db/planet.osm.pbf'
768789
OVERPASS_REPLICATION_SEQUENCE_NUMBER: 5201000
769790
OVERPASS_ALLOW_DUPLICATE_QUERIES: "yes"
770791
persistenceDisk:
@@ -834,20 +855,20 @@ taginfo:
834855
label_key: nodegroup_type
835856
label_value: web
836857
cronjob:
858+
enabled: true
859+
schedule: "0 2 */3 * *"
860+
nodeSelector:
837861
enabled: true
838-
schedule: "0 2 */3 * *"
839-
nodeSelector:
840-
enabled: true
841-
label_key: nodegroup_type
842-
label_value: job_xlarge
843-
resources:
844-
enabled: false
845-
requests:
846-
memory: "13Gi"
847-
cpu: "3600m"
848-
limits:
849-
memory: "14Gi"
850-
cpu: "3800m"
862+
label_key: nodegroup_type
863+
label_value: job_xlarge
864+
resources:
865+
enabled: false
866+
requests:
867+
memory: "13Gi"
868+
cpu: "3600m"
869+
limits:
870+
memory: "14Gi"
871+
cpu: "3800m"
851872
# ====================================================================================================
852873
# Variables for osm-simple-metrics
853874
# ====================================================================================================
@@ -1044,25 +1065,5 @@ adiffService:
10441065
planetFiles:
10451066
enabled: false
10461067
image:
1047-
name: ""
1048-
tag: ""
1049-
# ====================================================================================================
1050-
# Cgimap
1051-
# ====================================================================================================
1052-
cgimap:
1053-
enabled: false
1054-
priorityClass: "low-priority"
1055-
image:
1056-
name: ''
1057-
tag: ''
1058-
resources:
1059-
enabled: false
1060-
requests:
1061-
memory: '20Gi'
1062-
cpu: '8'
1063-
limits:
1064-
memory: '24Gi'
1065-
cpu: '10'
1066-
nodeSelector:
1067-
enabled: false
1068-
1068+
name: "developmentseed/osmseed-planet-files"
1069+
tag: "0.1.0-0.dev.git.966.hc380960"

0 commit comments

Comments
 (0)