Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[breaking] changed volume mount points #261

Merged
merged 2 commits into from
Apr 9, 2022
Merged

Conversation

Istador
Copy link
Contributor

@Istador Istador commented Apr 7, 2022

This PR is a proposal for issue #257

Changed mount points compared to before:

  • /var/lib/postgresql/14/main/ => /data/database/
  • /var/lib/mod_tile/ => /data/tiles/
  • /home/renderer/src/openstreetmap-carto/ => /data/style/
  • /data.osm.pbf => /data/region.osm.pbf
  • /data.poly => /data/region.poly
  • /nodes/flat_nodes.bin => deprecated

The flat-nodes can now be enabled instead with an environment variable FLAT_NODES=enabled during import. It will save the generated file in the /data/database/ volume. The automated update on run will therefore correctly use the saved file automatically, if it were created during import. Before this change a user could forget about the flat-nodes file which breakes the automated updates.

Because some files are needed later and should never be separated from the database, the import does save those files now into /data/databases/:

  • /data/database/region.poly
  • /data/database/flat_nodes.bin
  • /data/database/planet-import-complete
  • and more files generated by automatic updates.

To separate the actual postres database files from these files, /var/lib/postgresql/14/main/ is actually stored at /data/database/postgres/.

(The postgresql service is restricting the permissions for /var/lib/postgresql/14/main/ which prevents renderer from accessing it: "[41] FATAL: data directory "/var/lib/postgresql/14/main" has invalid permissions [41] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750)." unless we wanted to add renderer to the postgres group.)


I also created the merge branch issue-254-257 for this pull requests merged together with pull request #260.

Addition change to /.github/workflows/build-and-test.yaml for both:

 +  test:
 +    runs-on: ubuntu-latest
 +    env:
 +      VOLUME    : osm-db
 +      CONTAINER : osm-www
-       MOUNT     : /var/lib/postgresql/14/main
++      MOUNT     : /data/database/
 +    steps:

[Edit:] this is merged now.

You can test this PR with the docker image ghcr.io/istador/openstreetmap-tile-server:2.0.0 that was build automatically by pushing a v2.0.0 tag on that merge branch.


This is a breaking change that requires a major version bump, e.g. to 2.0.0.

Changes:
- /var/lib/postgresql/14/main/            => /data/database/
- /var/lib/mod_tile/                      => /data/tiles/
- /home/renderer/src/openstreetmap-carto/ => /data/style/
- /data.osm.pbf                           => /data/region.osm.pbf
- /data.poly                              => /data/region.poly
- /nodes/flat_nodes.bin                   => deprecated (use FLAT_NODES=enabled instead)

Because some files are needed later and should never be separated from the database, the import does save those files now into /data/databases/:
- /data/database/region.poly
- /data/database/flat_nodes.bin
- /data/database/planet-import-complete
- and automatic update artifacts
nielsole
nielsole previously approved these changes Apr 8, 2022
@nielsole
Copy link
Collaborator

nielsole commented Apr 8, 2022

As galewis2 mentioned, do we want to divert further from SomeoneElseOSM/mod_tile with openstreetmap-tiles-update-expire?
Although I feel by now we have become the new "upstream" for that file

@nielsole
Copy link
Collaborator

nielsole commented Apr 8, 2022

Ah it's just the master branch that's not maintained: https://github.com/SomeoneElseOSM/mod_tile/blob/switch2osm/openstreetmap-tiles-update-rerender

@nielsole nielsole merged commit cffbd7b into Overv:master Apr 9, 2022
@Istador Istador deleted the issue-257 branch April 9, 2022 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants