Skip to content

david-mart/nominatim-helm-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 robjuz https://robjuz.github.io/helm-charts/
helm install nominatim robjuz/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+
  • 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:
    postgresqlExtendedConf:
      {
        "fsync": "off",
        "fullPageWrites": "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 postgresqlExtendedConf

  nominatimInitialize:
    enabled: false

  postgresql:
    postgresqlExtendedConf:

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.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 URL with custom style file nil
nominatimInitialize.threads The number of thread used by the import 16

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 Configuration parameters

Name Description Value
nominatim.projectDir Nominatim Project Directory /nominatim
nominatim.databaseModulePath Path on the database server there the nominatim module can be found /bitnami

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

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 latest
postgresql.postgresqlPostgresPassword PostgreSQL root password nominatim
postgresql.postgresqlUsername PostgreSQL read-only user (this should be not changed) www-data
postgresql.postgresqlPassword PostgreSQL database password nominatim
postgresql.postgresqlDatabase PostgreSQL database name nominatim
postgresql.persistence.enabled Enable persistence on PostgreSQL using PVC(s) true
postgresql.persistence.storageClass Persistent Volume storage class nil
postgresql.persistence.accessModes Persistent Volume access modes [ReadWriteOnce]
postgresql.persistence.size Persistent Volume size 500Gi

Configuration and installation details

Flatnode support

When importing large extracts (Europe/Planet) the usage of flatnode is recommended. Using flatnode with replication enabled requires the usage of a ReadWriteMany volume, because the flatnode file needs to be shared within the pods. This also applies when scaling the nominatim deployment.

External database support

You may want to have Nominatim connect to an external database rather than installing one inside your cluster. Typical reasons for this are to use a managed database service, or to share a common database server for all your applications. To achieve this, the chart allows you to specify credentials for an external database with the externalDatabase parameter. You should also disable the PostgreSQL installation with the postgresql.enabled option. Here is an example:

postgresql.enabled: false
externalDatabase.host=myexternalhost
externalDatabase.host=myexternalhost
externalDatabase.user=myuser
externalDatabase.password=mypassword
externalDatabase.database=mydatabase
externalDatabase.port=3306

Ingress

This chart provides support for Ingress resources. If an Ingress controller, such as nginx-ingress or traefik, that Ingress controller can be used to serve Nominatim.

To enable Ingress integration, set ingress.enabled to true. The ingress.hostname property can be used to set the host name. The ingress.tls parameter can be used to add the TLS configuration for this host.

Custom Import Style

If none of the default styles satisfies your needs, you can provide your customized style file by setting the nominatimInitialize.customStyleUrl value.

Make sure the file is publicly available for init job to download it. Example

TLS secrets

The chart also facilitates the creation of TLS secrets for use with the Ingress controller, with different options for certificate management.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published