nominatim

by heywood8

Helm chartv3.10.8App 4.2Verified publisher

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:

  1. Initialisation
  2. 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

NameDescriptionValue
nameOverrideString to partially override common.names.fullnamenil
fullnameOverrideString to fully override common.names.fullnamenil

Nominatim Image parameters

NameDescriptionValue
image.repositoryNominatim image repositorymediagis/nominatim
image.tagNominatim image tag (immutable tags are recommended)3.7
image.pullPolicyNominatim image pull policyIfNotPresent
imagePullSecretsNominatim image pull secrets[]

Nominatim Configuration parameters

NameDescriptionValue
NominatimAdminEmailEmail for the superadmin account[email protected]
NominatimAdminPasswordPassword for the superadmin accountchangemeplease
NominatimEnvironmentNominatim environment nameprod

Nominatim Initialisation Configuration parameters

NameDescriptionValue
nominatimInitialize.enabledenable/disable init jobfalse
nominatimInitialize.pbfUrlURL of the pbf file to importhttps://download.geofabrik.de/europe/germany/sachsen-latest.osm.pbf
nominatimInitialize.importWikipediaIf additional Wikipedia/Wikidata rankings should be importedfalse
nominatimInitialize.wikipediaUrlWikipedia/Wikidata rankings file URLhttps://nominatim.org/data/wikimedia-importance.sql.gz
nominatimInitialize.importGB_PostcodeIf external GB postcodes should be importedfalse
nominatimInitialize.importUS_PostcodeIf external US postcodes should be importedfalse
nominatimInitialize.importStyleNominatim import stylefull
nominatimInitialize.customStyleUrlCustom import style file URLnil
nominatimInitialize.threadsThe number of thread used by the import16
nominatimInitialize.resourcesDefine resources requests and limits for the init container{}

Nominatim Replication Configuration parameters

NameDescriptionValue
nominatimReplications.enabledenable/disable replicationfalse
nominatimReplications.replicationUrlURL with update informationhttps://download.geofabrik.de/europe/germany/sachsen-updates/

Nominatim deployment parameters

NameDescriptionValue
replicaCountNumber of Nominatim replicas to deploy1
updateStrategy.typeNominatim deployment strategy typeRollingUpdate
updateStrategy.rollingUpdateNominatim deployment rolling update configuration parameters{}
schedulerNameAlternate schedulernil
serviceAccountNameServiceAccount namedefault
podAnnotationsAnnotations for Nominatim pods{}

Traffic Exposure Parameters

NameDescriptionValue
service.typeNominatim service typeClusterIP
service.portNominatim service HTTP port80
ingress.enabledEnable ingress record generation for Nominatimfalse
ingress.certManagerAdd the corresponding annotations for cert-manager integrationfalse
ingress.hostnameDefault host for the ingress recordNominatim.local
ingress.annotationsAdditional custom annotations for the ingress record{}
ingress.tlsEnable TLS configuration for the host defined at ingress.hostname parameterfalse
ingress.secretsCustom TLS certificates as secrets[]

Flatnode Parameters

NameDescriptionValue
flatnode.enabledEnable flatnode using Persistent Volume Claimsfalse
flatnode.storageClassPersistent Volume storage classnil
flatnode.accessModesPersistent Volume access modes[ReadWriteMany]
flatnode.sizePersistent Volume size100Gi
flatnode.existingClaimThe name of an existing PVC to use for flatnodenil

Data PVC Parameters

NameDescriptionValue
datapvc.enabledEnable Data persistence using Persistent Volume Claimsfalse
datapvc.storageClassPersistent Volume storage classnil
datapvc.accessModesPersistent Volume access modes[ReadWriteMany]
datapvc.sizePersistent Volume size100Gi
datapvc.existingClaimThe name of an existing PVCnil

Database Parameters

NameDescriptionValue
postgresql.enabledDeploy a PostgreSQL server to satisfy the applications database requirementstrue
postgresql.image.repositoryPostgreSQL image repositoryrobjuz/postgresql-nominatim
postgresql.image.tagPostgreSQL image tag14.4.0-4.0.1
postgresql.auth.postgresPasswordPostgreSQL root passwordnominatim
postgresql.primary.persistence.enabledEnable persistence on PostgreSQL using PVC(s)true
postgresql.primary.persistence.storageClassPersistent Volume storage classnil
postgresql.primary.persistence.accessModesPersistent Volume access modes[ReadWriteOnce]
postgresql.primary.persistence.sizePersistent Volume size500Gi
externalDatabase.hostExternal PostgreSQL host (ignored if postgresql.enabled = true)localhost
externalDatabase.portExternal 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnominatim is pinned at v3.10.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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