nominatim
by heywood8
A Helm chart for Kubernetes
About this chart
Nominatim
Based on robuz/nominatim
Nominatim is a tool (an API) to search OSM data by name and address and to generate synthetic addresses of OSM points (reverse geocoding).
TL;DR
helm repo add heywood8 https://robjuz.github.io/helm-charts/
helm install nominatim heywood8/nominatim
Introduction
This chart bootstraps a Nominatim deployment on a Kubernetes cluster using the Helm package manager.
It also packages a customized Bitnami PostgreSQL chart with build nominatim module which is required for bootstrapping a PostgreSQL deployment for the database requirements of the Nominatim application.
This chart has been tested to work with NGINX Ingress and cert-manager on top of the MicroK8s.
Prerequisites
- Kubernetes 1.12+ (ingress requires 1.19+)
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
- ReadWriteMany volumes for deployment scaling and flatnode support
Installing the Chart
The installation consist of 2 steps:
- Initialisation
- App deployment
Initialisation
SetnominatimInitialize.enabled: true
During the initialization, all required data are downloaded and the database is build. To improve the import speed you can set additional PostgreSQL params
nominatimInitialize:
enabled: true
postgresql:
primary:
extendedConfiguration: |
shared_buffers = 2GB
maintenance_work_mem = 10GB
autovacuum_work_mem = 2GB
work_mem = 50MB
effective_cache_size = 24GB
synchronous_commit = off
max_wal_size = 1GB
checkpoint_timeout = 10min
checkpoint_completion_target = 0.9
fsync = off
full_page_writes = off
To install the chart with the release name nominatim:
helm upgrade --install nominatim robjuz/nominatim -f values.yaml
App deployment
You need to set nominatimInitialize.enabled: false
You also should remove the postgresql.primary.extendedConfiguration
nominatimInitialize:
enabled: false
To install the chart with the release name nominatim:
helm upgrade --install nominatim robjuz/nominatim -f values.yaml
Uninstalling the Chart
To uninstall/delete the nominatim deployment:
helm delete nominatim
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
Common parameters
| Name | Description | Value |
|---|---|---|
nameOverride | String to partially override common.names.fullname | nil |
fullnameOverride | String to fully override common.names.fullname | nil |
Nominatim Image parameters
| Name | Description | Value |
|---|---|---|
image.repository | Nominatim image repository | mediagis/nominatim |
image.tag | Nominatim image tag (immutable tags are recommended) | 3.7 |
image.pullPolicy | Nominatim image pull policy | IfNotPresent |
imagePullSecrets | Nominatim image pull secrets | [] |
Nominatim Configuration parameters
| Name | Description | Value |
|---|---|---|
NominatimAdminEmail | Email for the superadmin account | [email protected] |
NominatimAdminPassword | Password for the superadmin account | changemeplease |
NominatimEnvironment | Nominatim environment name | prod |
Nominatim Initialisation Configuration parameters
| Name | Description | Value |
|---|---|---|
nominatimInitialize.enabled | enable/disable init job | false |
nominatimInitialize.pbfUrl | URL of the pbf file to import | https://download.geofabrik.de/europe/germany/sachsen-latest.osm.pbf |
nominatimInitialize.importWikipedia | If additional Wikipedia/Wikidata rankings should be imported | false |
nominatimInitialize.wikipediaUrl | Wikipedia/Wikidata rankings file URL | https://nominatim.org/data/wikimedia-importance.sql.gz |
nominatimInitialize.importGB_Postcode | If external GB postcodes should be imported | false |
nominatimInitialize.importUS_Postcode | If external US postcodes should be imported | false |
nominatimInitialize.importStyle | Nominatim import style | full |
nominatimInitialize.customStyleUrl | Custom import style file URL | nil |
nominatimInitialize.threads | The number of thread used by the import | 16 |
nominatimInitialize.resources | Define resources requests and limits for the init container | {} |
Nominatim Replication Configuration parameters
| Name | Description | Value |
|---|---|---|
nominatimReplications.enabled | enable/disable replication | false |
nominatimReplications.replicationUrl | URL with update information | https://download.geofabrik.de/europe/germany/sachsen-updates/ |
Nominatim deployment parameters
| Name | Description | Value |
|---|---|---|
replicaCount | Number of Nominatim replicas to deploy | 1 |
updateStrategy.type | Nominatim deployment strategy type | RollingUpdate |
updateStrategy.rollingUpdate | Nominatim deployment rolling update configuration parameters | {} |
schedulerName | Alternate scheduler | nil |
serviceAccountName | ServiceAccount name | default |
podAnnotations | Annotations for Nominatim pods | {} |
Traffic Exposure Parameters
| Name | Description | Value |
|---|---|---|
service.type | Nominatim service type | ClusterIP |
service.port | Nominatim service HTTP port | 80 |
ingress.enabled | Enable ingress record generation for Nominatim | false |
ingress.certManager | Add the corresponding annotations for cert-manager integration | false |
ingress.hostname | Default host for the ingress record | Nominatim.local |
ingress.annotations | Additional custom annotations for the ingress record | {} |
ingress.tls | Enable TLS configuration for the host defined at ingress.hostname parameter | false |
ingress.secrets | Custom TLS certificates as secrets | [] |
Flatnode Parameters
| Name | Description | Value |
|---|---|---|
flatnode.enabled | Enable flatnode using Persistent Volume Claims | false |
flatnode.storageClass | Persistent Volume storage class | nil |
flatnode.accessModes | Persistent Volume access modes | [ReadWriteMany] |
flatnode.size | Persistent Volume size | 100Gi |
flatnode.existingClaim | The name of an existing PVC to use for flatnode | nil |
Data PVC Parameters
| Name | Description | Value |
|---|---|---|
datapvc.enabled | Enable Data persistence using Persistent Volume Claims | false |
datapvc.storageClass | Persistent Volume storage class | nil |
datapvc.accessModes | Persistent Volume access modes | [ReadWriteMany] |
datapvc.size | Persistent Volume size | 100Gi |
datapvc.existingClaim | The name of an existing PVC | nil |
Database Parameters
| Name | Description | Value |
|---|---|---|
postgresql.enabled | Deploy a PostgreSQL server to satisfy the applications database requirements | true |
postgresql.image.repository | PostgreSQL image repository | robjuz/postgresql-nominatim |
postgresql.image.tag | PostgreSQL image tag | 14.4.0-4.0.1 |
postgresql.auth.postgresPassword | PostgreSQL root password | nominatim |
postgresql.primary.persistence.enabled | Enable persistence on PostgreSQL using PVC(s) | true |
postgresql.primary.persistence.storageClass | Persistent Volume storage class | nil |
postgresql.primary.persistence.accessModes | Persistent Volume access modes | [ReadWriteOnce] |
postgresql.primary.persistence.size | Persistent Volume size | 500Gi |
externalDatabase.host | External PostgreSQL host (ignored if postgresql.enabled = true) | localhost |
externalDatabase.port | External PostgreSQL post (ignored if postgresql.enabled = true) |
Deploy nominatim with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nominatim on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnominatim is pinned at v3.10.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply