diff --git a/Nominatim.md b/Nominatim.md new file mode 100644 index 00000000..e5a2ae6f --- /dev/null +++ b/Nominatim.md @@ -0,0 +1,25 @@ +# Deploying Nominatim +The [unofficial Helm Charts](https://nominatim.org/release-docs/latest/admin/Installation/) come with +(documentation here)[https://github.com/robjuz/helm-charts/blob/master/charts/nominatim/README.md]. +The instructions here are based upon that documentation. +> The cluster will need at least 4GB of available memory (on the node where this +> is deployed) to perform initialization. If this isn't possible, update +> `init_values.yaml` to use less `maintenance_work_mem` and consider updating +> `pbfUrl` to use a smaller region instead of the global data. + +## Initializing the Nominatim Services +Some default values files are included with Diana. +To initialize Nominatim with global data to its own namespace: +```shell +helm upgrade -n nominatim nominatim robjuz/nominatim -f neon_diana_utils/nominatim/init_values.yaml +``` + +This will likely take on the order of hours to complete. You may use the Dashboard +or k9s to monitor the job `nominatim-init` (in the `nominatim` namespace). If the +job is interrupted, it is possible that the database is left in a corrupted state; +it is recommended to `kubectl delete namespace nominatim` and start over if the +init process is interrupted. +> Note: The Kubernetes Dashboard may show the `nominatim-init` job as having 1 +> completion before the job has completed. `k9s` does not appear to have this bug. +> If you can't use `k9s` then consider watching the Job logs to make sure the init +> actually completes. \ No newline at end of file diff --git a/neon_diana_utils/nominatim/deploy_values.yaml b/neon_diana_utils/nominatim/deploy_values.yaml new file mode 100644 index 00000000..2bed6bce --- /dev/null +++ b/neon_diana_utils/nominatim/deploy_values.yaml @@ -0,0 +1,7 @@ + nominatimInitialize: + enabled: false + + postgresql: + primary: + persistence: + size: 200Gi diff --git a/neon_diana_utils/nominatim/init_values.yaml b/neon_diana_utils/nominatim/init_values.yaml new file mode 100644 index 00000000..7fcf5a12 --- /dev/null +++ b/neon_diana_utils/nominatim/init_values.yaml @@ -0,0 +1,24 @@ + nominatimInitialize: + enabled: true + pbfUrl: "https://ftpmirror.your.org/pub/openstreetmap/pbf/planet-latest.osm.pbf" + importWikipedia: True + resources: + requests: + memory: "4Gi" + + postgresql: + primary: + persistence: + size: 200Gi + extendedConfiguration: | + shared_buffers = 2GB + maintenance_work_mem = 2GB + autovacuum_work_mem = 2GB + work_mem = 50MB + effective_cache_size = 24GB + synchronous_commit = off + max_wal_size = 2GB + checkpoint_timeout = 10min + checkpoint_completion_target = 0.9 + fsync = off + full_page_writes = off