From f4424328d29a289b43d4d24f5741ed751b186fe8 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Mon, 2 Dec 2024 09:24:02 +0100 Subject: [PATCH 01/17] docs(setup): Add english Tomcat 10 how-to --- docs/.vitepress/config.js | 97 +++-- docs/run-instance/example-setups/index.md | 23 ++ .../example-setups/tomcat-10-ubuntu_22_04.md | 332 ++++++++++++++++++ 3 files changed, 432 insertions(+), 20 deletions(-) create mode 100644 docs/run-instance/example-setups/index.md create mode 100644 docs/run-instance/example-setups/tomcat-10-ubuntu_22_04.md diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 0c1552993d..8db18576a3 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -82,25 +82,62 @@ export default withMermaid(defineVersionedConfig({ text: 'Endpoints', collapsed: true, link: '/api-reference/endpoints/', items: [ { - text: 'Directions', collapsed: true, link: '/api-reference/endpoints/directions/', + text: 'Directions', + collapsed: true, + link: '/api-reference/endpoints/directions/', items: [ - {text: 'Requests and Return Types', link: '/api-reference/endpoints/directions/requests-and-return-types'}, - {text: 'Routing Options', link: '/api-reference/endpoints/directions/routing-options'}, { - text: 'Extra info', collapsed: true, link: '/api-reference/endpoints/directions/extra-info/', + text: 'Requests and Return Types', + link: '/api-reference/endpoints/directions/requests-and-return-types' + }, + { + text: 'Routing Options', + link: '/api-reference/endpoints/directions/routing-options' + }, + { + text: 'Extra info', + collapsed: true, + link: '/api-reference/endpoints/directions/extra-info/', items: [ - {text: 'Steepness IDs', link: '/api-reference/endpoints/directions/extra-info/steepness'}, - {text: 'Surface IDs', link: '/api-reference/endpoints/directions/extra-info/surface'}, - {text: 'Category IDs', link: '/api-reference/endpoints/directions/extra-info/waycategory'}, - {text: 'Type IDs', link: '/api-reference/endpoints/directions/extra-info/waytype'}, - {text: 'Difficulty IDs', link: '/api-reference/endpoints/directions/extra-info/trail-difficulty'}, - {text: 'Restriction IDs', link: '/api-reference/endpoints/directions/extra-info/road-access-restrictions'}, + { + text: 'Steepness IDs', + link: '/api-reference/endpoints/directions/extra-info/steepness' + }, + { + text: 'Surface IDs', + link: '/api-reference/endpoints/directions/extra-info/surface' + }, + { + text: 'Category IDs', + link: '/api-reference/endpoints/directions/extra-info/waycategory' + }, + { + text: 'Type IDs', + link: '/api-reference/endpoints/directions/extra-info/waytype' + }, + { + text: 'Difficulty IDs', + link: '/api-reference/endpoints/directions/extra-info/trail-difficulty' + }, + { + text: 'Restriction IDs', + link: '/api-reference/endpoints/directions/extra-info/road-access-restrictions' + }, {text: 'Country IDs', link: '/technical-details/country-list'}, ] }, - {text: 'Route Attributes', link: '/api-reference/endpoints/directions/route-attributes'}, - {text: 'Geometry Decoding', link: '/api-reference/endpoints/directions/geometry-decoding'}, - {text: 'Instruction Types', link: '/api-reference/endpoints/directions/instruction-types'}, + { + text: 'Route Attributes', + link: '/api-reference/endpoints/directions/route-attributes' + }, + { + text: 'Geometry Decoding', + link: '/api-reference/endpoints/directions/geometry-decoding' + }, + { + text: 'Instruction Types', + link: '/api-reference/endpoints/directions/instruction-types' + }, ] }, {text: 'Isochrones', link: '/api-reference/endpoints/isochrones/'}, @@ -194,16 +231,23 @@ export default withMermaid(defineVersionedConfig({ }, {text: 'ors.cors', link: '/run-instance/configuration/cors/'}, {text: 'ors.messages', link: '/run-instance/configuration/messages/'}, - {text: 'JSON config (deprecated)', link:'/run-instance/configuration/json.md'} + {text: 'JSON config (deprecated)', link: '/run-instance/configuration/json.md'} ] }, + { + text: 'Example Setups', collapsed: true, link: '/run-instance/example-setups', + items: [{text: 'Tomcat 10 - Ubuntu 22.04', link: '/run-instance/example-setups/tomcat-10-ubuntu_22_04'}] + }, ] }, { text: 'Contributing', collapsed: true, link: '/contributing/', items: [ {text: 'Backend documentation', link: '/contributing/backend-documentation'}, - {text: 'Contribution guidelines', link: 'https://github.com/GIScience/openrouteservice/blob/main/CONTRIBUTE.md'}, + { + text: 'Contribution guidelines', + link: 'https://github.com/GIScience/openrouteservice/blob/main/CONTRIBUTE.md' + }, {text: 'Contributing translations', link: '/contributing/contributing-translations'}, ] }, @@ -211,12 +255,25 @@ export default withMermaid(defineVersionedConfig({ text: 'Technical details', collapsed: true, link: '/technical-details/', items: [ {text: 'Country List', link: '/technical-details/country-list'}, - {text: 'Travel Speeds', link: '/technical-details/travel-speeds/', + { + text: 'Travel Speeds', link: '/technical-details/travel-speeds/', items: [ - {text: 'Country Speeds', link: '/technical-details/travel-speeds/country-speeds.md'}, - {text: 'Tracktype Speeds', link: '/technical-details/travel-speeds/tracktype-speeds.md'}, - {text: 'Waytype Speeds', link: '/technical-details/travel-speeds/waytype-speeds.md'}, - {text: 'Surface Speeds', link: '/technical-details/travel-speeds/surface-speeds.md'}, + { + text: 'Country Speeds', + link: '/technical-details/travel-speeds/country-speeds.md' + }, + { + text: 'Tracktype Speeds', + link: '/technical-details/travel-speeds/tracktype-speeds.md' + }, + { + text: 'Waytype Speeds', + link: '/technical-details/travel-speeds/waytype-speeds.md' + }, + { + text: 'Surface Speeds', + link: '/technical-details/travel-speeds/surface-speeds.md' + }, ] }, {text: 'Tag Filtering', link: '/technical-details/tag-filtering'}, diff --git a/docs/run-instance/example-setups/index.md b/docs/run-instance/example-setups/index.md new file mode 100644 index 0000000000..d13af22b30 --- /dev/null +++ b/docs/run-instance/example-setups/index.md @@ -0,0 +1,23 @@ +# Openrouteservice native setup examples + +We already provide instructions on how to set up and use openroutservice. +However, the following examples are more specific to certain environments and are targeted at users who are +looking for a more complete setup guide. +The scope is broader from setting up dependencies to deploying the service. + +If you are an advanced user, have a look at the existing setup instructions: + +- [Running openrouteservice with Docker](/run-instance/running-with-docker.md) +- [Running openrouteservice as JAR](/run-instance/running-jar.md) +- [Running openrouteservice as WAR](/run-instance/running-war.md) + +::: tip +The examples are growing over time and only provide a small subset of possible setups. \ +If you are missing specific detailed setup instruction, **you are welcome to contribute** by creating a pull request. +::: + +The following examples are (currently) available: + +| Setup | Description | Difficulty | Link | +|--------------------------|--------------------------------------------------------------------|------------|------------------------------------------------------| +| Tomcat 10 - Ubuntu 22.04 | Setup openrouteservice with Tomcat 10 and Java 17 on Ubuntu 22.04. | Medium | [tomcat-10-war-java-17.md](tomcat-10-ubuntu_22_04) | diff --git a/docs/run-instance/example-setups/tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/tomcat-10-ubuntu_22_04.md new file mode 100644 index 0000000000..05818018ac --- /dev/null +++ b/docs/run-instance/example-setups/tomcat-10-ubuntu_22_04.md @@ -0,0 +1,332 @@ +# Setup ORS v8 and v9 with Tomcat 10 on Ubuntu 22.04 + +This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8. +The guild will cover the following steps: + +## Prerequisites + +- Ubuntu 22.04 with Systemd enabled (Systemd should be enabled by default) +- Tomcat 10 +- Java 17+ + +## Assumptions + +- We assume that your system is running only one Tomcat 10 instance. +- If you plan to run multiple Tomcat services, you are an advanced user and should adapt the instructions accordingly. + +## Prepare the Tomcat 10 environment + +The following steps will guide you through the process of preparing the Tomcat 10 environment. + +### Install Java 17 + +Openrouteservice requires Java 17 or higher to run since Version 8. +The reason is the introduction of Tomcat 10. +You can also use a higher version of Java if available. + +```shell +# Update the package index +> sudo apt-get update +# Install Java 17 or higher, curl and nano +> sudo apt-get install openjdk-17-jre-headless curl nano +``` + +- `openjdk-17-jre-headless` is the Java 17 runtime environment as a headless package. We don't need a graphical user + interface for openrouteservice. +- `curl` is a command-line utility for downloading files from the web and will be used to download certain resources. +- `nano` is a simple text editor that will be used to edit certain files. + +List your available Java versions. + +```shell +# List available options and copy the path to the Java 17 installation +sudo update-alternatives --list java +``` + +The output should look like similar to this: + +```text +[...] +/usr/lib/jvm/java-17-openjdk-amd64/ +[...] +``` + +Update the default Java version to use Java 17 or the version you installed. + +```shell +# Set the default Java version to Java 17 +> sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java +``` + +::: info +**Note:** The path to the Java 17 installation may vary depending on your system. \ +**Note:** From now on we will refer to the path to the Java 17 installation as `JAVA_HOME`. +::: + +### Create a new user for Tomcat 10 + +The Tomcat 10 runtime should be run as a separate user for security reasons. +This user should not have any login permissions and should not be able to execute commands. +We will call this user `tomcat`. + +```shell +# Create a new user for Tomcat 10 +> useradd -r -m -U -d /opt/tomcat -s /bin/false tomcat +``` + +- `-r` creates a system user +- `-m` creates a home directory (`/opt/tomcat`) for the user and applies the necessary permissions +- `-U` creates a group with the same name as the user + +### Download and setup Tomcat 10 + +```shell +# Set the Tomcat version +> export TOMCAT_VERSION=10.1.33 +# Download the Tomcat 10 tarball +> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz > apache-tomcat-${TOMCAT_VERSION}.tar.gz +# Extract the downloaded file +> tar -xf apache-tomcat-${TOMCAT_VERSION}.tar.gz +# Copy the contents of the extracted directory to the /opt/tomcat directory +> cp -R apache-tomcat-${TOMCAT_VERSION}/** /opt/tomcat +# Clean up the extracted directory +> rm -r apache-tomcat-${TOMCAT_VERSION} apache-tomcat-${TOMCAT_VERSION}.tar.gz +``` + +### Set the necessary permissions for the Tomcat 10 user. + +The following commands will set the necessary permissions for the `tomcat` user. +They have to be executed as the root user and should always be executed when changes were made to the Tomcat directory. + +```shell +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chmod -R 754 /opt/tomcat +``` + +- `chown -R tomcat:tomcat /opt/tomcat` sets the owner and group of the `/opt/tomcat` directory to the `tomcat` user. +- `chmod -R 754 /opt/tomcat` sets the permissions for the `/opt/tomcat` directory. + - `7` grants read, write, and execute permissions to the owner. + - `5` grants read and execute permissions to the group. + - `4` grants read permissions to others. + +### Create a systemd service for Tomcat 10. + +We now create a systemd service for Tomcat 10 to manage the Tomcat 10 instance. +This will allow your Systemd to start and stop Tomcat 10 as a service automatically. +Paste the content into the file and save it. + +```bash +> sudo nano /etc/systemd/system/openrouteservice.service +``` + +```ini +[Unit] +Description=Tomcat - openrouteservice +After=syslog.target network.target + +[Service] +Type=forking + +User=tomcat +Group=tomcat +RestartSec=10 +Restart=always + +Environment="JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/" +Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom" +Environment="CATALINA_OPTS=-server -XX:+UseParallelGC" + +Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid +Environment=CATALINA_HOME=/opt/tomcat +Environment=CATALINA_BASE=/opt/tomcat + +ExecStart=/opt/tomcat/bin/startup.sh +ExecStop=/opt/tomcat/bin/shutdown.sh + +[Install] +WantedBy=multi-user.target +``` + +### Test the new Tomcat 10 setup + +```shell +# Reload the systemd daemon +> sudo systemctl daemon-reload +# Start the Tomcat 10 service +> sudo systemctl enable --now openrouteservice.service +# Check the status of the Tomcat 10 service +> sudo systemctl status openrouteservice.service +``` + +Now navigate to `http://localhost:8080` in your browser to see the Tomcat 10 welcome page. + +## Prepare the openrouteservice environment + +Since we have set up Tomcat 10, we can now set up openrouteservice with Java 17. + +### Download the openrouteservice war-File + +To set up openrouteservice v8 or v9 with Tomcat 10, you first need the respective war-File. +Head over to the [openrouteservice releases page](https://github.com/GIScience/openrouteservice/releases) and download +the latest release war-File. + +```shell +# Download the latest openrouteservice war-File e.g. for v8.2.0. For V9, just use e.g. v9.0.0 +> curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war +# Move the war-File to the Tomcat webapps directory +> mv ors.war /opt/tomcat/webapps/ +# Restart the Tomcat 10 service +> sudo systemctl restart openrouteservice.service +# Check the status of the Tomcat 10 service +> sudo systemctl status openrouteservice.service +``` + +If you navigate to `http://localhost:8080/ors/v2/health` you should see the health status of the openrouteservice. +The output will be as follows: + +```json +{ + "status": "not ready" +} +``` + +::: info +ORS is now set up correctly with Tomcat 10, but it still needs to be configured. Therefore, it is showing `not ready`. \ +If you want to see an exact log output, you can check the tomcat log files in the `/opt/tomcat/logs` directory. +::: + +### Create the openrouteservice folder structure + +In order for openrouteservice to work correctly, you need to set up the folder structure, download a test osm file and +set up the configuration. + +```shell +mkdir -p "/opt/openrouteservice/graphs" +mkdir -p "/opt/openrouteservice/logs" +mkdir -p "/opt/openrouteservice/data" +mkdir -p "/opt/openrouteservice/elevation_cache" +``` + +::: info +The folder structure is a suggestion and can be adapted to your needs. \ +Make sure to adjust the configuration accordingly as well as the permissions. +::: + +### Download a test osm file + +A good source for latest osm-files is the [Geofabrik download server](https://download.geofabrik.de/). +We will download a test osm file for small part of Germany (Hessen). + +```shell +# Download a test osm file to the /opt/openrouteservice/data directory +> curl -L https://download.geofabrik.de/europe/andorra-latest.osm.pbf > /opt/openrouteservice/data/andorra-latest.osm.pbf +``` + +### Configure openrouteservice + +Configure Tomcat and openrouteservice is best done by setting the configuration in the `setenv.sh` file in the `bin` +directory of Tomcat. +Create the `setenv.sh` file in the `bin` directory of Tomcat. + +```shell +> sudo nano /opt/tomcat/bin/setenv.sh +``` + +Paste the following contents into the file and save it. +Make sure to adjust the `-Xmx` value to a value that fits your system and graph. +If you want to build another pbf-File, you can adjust the `source_file` value. + +Between version 8 and 9, the configuration properties have changed. +Make sure to reference the correct properties. + +If you want to learn more about the new configuration options in versions 8 & 9, check +the [configuration documentation](/run-instance/configuration/index.md). + +**Example `setenv.sh` file for openrouteservice v8** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.elevation=false \ +-Dors.engine.graphs_root_path=/opt/openrouteservice/graphs \ +-Dors.engine.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +**Example `setenv.sh` file for openrouteservice v9** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.driving-car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.enabled=false \ +-Dors.engine.profile_default.graph_path=/opt/openrouteservice/graphs \ +-Dors.engine.profile_default.build.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +Set `ors.engine.graphs_data_access` to `RAM_STORE` if you want to use the RAM store instead of the MMAP store. +Make sure you set up `-Xmx` to a value that fits your system and graph and that your system provides enough memory. + +## Run openrouteservice + +If you followed the above steps, openrouteservice should now be correctly set up with Tomcat 10 and Java 17. +The following steps are mandatory whenever you change the configuration, folder structure or graphs: + +```shell +# Reinstate ownerships for tomcat +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chown -R tomcat:tomcat /opt/openrouteservice +> sudo chmod -R 754 /opt/openrouteservice +# Restart the Tomcat 10 service +> sudo systemctl restart openrouteservice.service +# Check the status of the Tomcat 10 service +> sudo systemctl status openrouteservice.service +``` + +Now that openrouteservice is set up with correct configurations, check the log files in the +`/opt/openrouteservice/logs/ors.log` or the Tomcat log files in the `/opt/tomcat/logs` directory. + +Navigate to `http://localhost:8080/ors/v2/health` in your browser to see the health status of the openrouteservice or +make a request to the API. + +```shell +> curl http://localhost:8080/ors/v2/health +``` + +The output should look like this: + +```json + +{ + "status": "ready" +} +``` + +## Example requests + +Let's test if openrouteservice is working correctly by making a request to the API. +Please adapt the test according to your downloaded osm file. + +```shell +# Request a route from A to B withing Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/directions/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"coordinates":[[1.5036892890930176, 42.4972256361276],[1.6298711299896242, 42.57831077271361]]}' + +# Request an Isochrone from a point in Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/isochrones/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"locations":[[1.5036892890930176, 42.4972256361276]],"range":[300]}' +``` \ No newline at end of file From 6ed2ebcb1f7bd463748793d23b50af2cd77ded56 Mon Sep 17 00:00:00 2001 From: Julian Psotta Date: Mon, 2 Dec 2024 18:10:59 +0100 Subject: [PATCH 02/17] docs(setup): Add the german translation and streamline some parts --- .../de_tomcat-10-ubuntu_22_04.md | 406 ++++++++++++++++++ ..._22_04.md => en_tomcat-10-ubuntu_22_04.md} | 76 +++- docs/run-instance/example-setups/index.md | 8 +- 3 files changed, 479 insertions(+), 11 deletions(-) create mode 100644 docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md rename docs/run-instance/example-setups/{tomcat-10-ubuntu_22_04.md => en_tomcat-10-ubuntu_22_04.md} (82%) diff --git a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md new file mode 100644 index 0000000000..e7cf009998 --- /dev/null +++ b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -0,0 +1,406 @@ +# Einrichtung von ORS v8 und v9 mit Tomcat 10 auf Ubuntu 22.04 + +Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v8 bzw. v9 einrichtest. + +::: info +Zur [englischen Version](en_tomcat-10-ubuntu_22_04) dieses Tutorials. +::: + +## Voraussetzungen + +- Ubuntu 22.04 mit aktiviertem Systemd (Systemd ist standardmäßig aktiviert) +- Tomcat 10 +- Java 17 oder höher + +## Annahmen + +- Es wird davon ausgegangen, dass nur eine Tomcat-10-Instanz auf deinem System läuft. +- Wenn du mehrere Tomcat-Dienste betreiben möchtest, bist du ein fortgeschrittener Benutzer und solltest die Anweisungen + entsprechend anpassen. + +## Vorbereitung der Tomcat-10-Umgebung + +Die folgenden Schritte helfen dir, die Umgebung für Tomcat 10 vorzubereiten. + +### Java 17 installieren + +Openrouteservice benötigt Java 17 oder höher, um ab Version 8 zu laufen. +Der Grund dafür ist die Einführung von Tomcat 10. +Du kannst auch eine neuere Version von Java verwenden, falls verfügbar. + +```shell +# Aktualisiere den Paketindex +> sudo apt-get update +# Installiere Java 17 oder höher, curl und nano +> sudo apt-get install openjdk-17-jre-headless curl nano +``` + +- `openjdk-17-jre-headless` ist das Java-17-Laufzeitpaket ohne grafische Oberfläche. + Für openrouteservice wird keine grafische Benutzeroberfläche benötigt. +- `curl` ist ein Befehlszeilentool zum Herunterladen von Dateien aus dem Web und wird verwendet, um bestimmte Ressourcen + herunterzuladen. +- `nano` ist ein einfacher Texteditor, der zum Bearbeiten von Dateien verwendet wird. + +Liste die verfügbaren Java-Versionen auf. + +```shell +# Zeige verfügbare Optionen an und kopiere den Pfad zur Java-17-Installation +sudo update-alternatives --list java +``` + +Die Ausgabe sollte in etwa so aussehen: + +```shell +[...] +/usr/lib/jvm/java-17-openjdk-amd64/ +[...] +``` + +Aktualisiere die Standard-Java-Version auf Java 17 oder die installierte Version. + +```shell +# Setze die Standard-Java-Version auf Java 17 +> sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java +``` + +::: info +**Hinweis:** Der Pfad zur Java-17-Installation kann je nach System unterschiedlich sein. +Hinweis: Ab jetzt wird der Pfad zur Java-17-Installation als `JAVA_HOME` bezeichnet. +::: + +### Einen neuen Benutzer für Tomcat 10 erstellen + +Der Tomcat-10-Dienst sollte aus Sicherheitsgründen unter einem separaten Benutzer laufen. +Dieser Benutzer sollte keine Anmeldeberechtigungen haben und keine Befehle ausführen können. +Wir nennen diesen Benutzer `tomcat`. + +```shell +# Erstelle einen neuen Benutzer für Tomcat 10 +> useradd -r -m -U -d /opt/tomcat -s /bin/false tomcat +``` + +- `-r` erstellt einen Systembenutzer. +- `-m` erstellt ein Home-Verzeichnis `(/opt/tomcat)` für den Benutzer und setzt die notwendigen Berechtigungen. +- `-U` erstellt eine Gruppe mit demselben Namen wie der Benutzer. + +### Tomcat 10 herunterladen und einrichten + +```shell +# Setze die Tomcat-Version +> export TOMCAT_VERSION=10.1.33 +# Lade das Tomcat-10-Tarball herunter +> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz > apache-tomcat-${TOMCAT_VERSION}.tar.gz +# Entpacke die heruntergeladene Datei +> tar -xf apache-tomcat-${TOMCAT_VERSION}.tar.gz +# Kopiere den Inhalt des entpackten Verzeichnisses in das Verzeichnis /opt/tomcat +> cp -R apache-tomcat-${TOMCAT_VERSION}/** /opt/tomcat +# Bereinige das entpackte Verzeichnis +> rm -r apache-tomcat-${TOMCAT_VERSION} apache-tomcat-${TOMCAT_VERSION}.tar.gz +``` + +### Setze die notwendigen Berechtigungen für den Tomcat-10-Benutzer + +Die folgenden Befehle setzen die notwendigen Berechtigungen für den tomcat-Benutzer. +Sie müssen als Root-Benutzer ausgeführt werden und sollten immer dann ausgeführt werden, +wenn Änderungen am Tomcat-Verzeichnis vorgenommen wurden. + +```shell +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chmod -R 754 /opt/tomcat +``` + +- `chown -R tomcat:tomcat /opt/tomcat` setzt den Besitzer und die Gruppe des `/opt/tomcat`-Verzeichnisses auf den + tomcat-Benutzer. +- `chmod -R 754 /opt/tomcat` setzt die Berechtigungen für das `/opt/tomcat`-Verzeichnis. + - 7 gewährt Lese-, Schreib- und Ausführungsrechte für den Besitzer. + - 5 gewährt Lese- und Ausführungsrechte für die Gruppe. + - 4 gewährt Leserechte für andere. + +### Erstelle einen Systemd-Dienst für Tomcat 10 + +Erstelle einen Systemd-Dienst, um Tomcat 10 zu verwalten. +Dadurch kann Systemd den Tomcat-10-Dienst automatisch starten und stoppen. +Füge den folgenden Inhalt in die Datei ein und speichere sie. + +```shell +> sudo nano /etc/systemd/system/openrouteservice.service +``` + +```shell +[Unit] +Description=Tomcat - openrouteservice +After=syslog.target network.target + +[Service] +Type=forking + +User=tomcat +Group=tomcat +RestartSec=10 +Restart=always + +Environment="JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/" +Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom" +Environment="CATALINA_OPTS=-server -XX:+UseParallelGC" + +Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid +Environment=CATALINA_HOME=/opt/tomcat +Environment=CATALINA_BASE=/opt/tomcat + +ExecStart=/opt/tomcat/bin/startup.sh +ExecStop=/opt/tomcat/bin/shutdown.sh + +[Install] +WantedBy=multi-user.target +``` + +### Teste die neue Tomcat-10-Einrichtung + +```shell +# Lade den Systemd-Daemon neu +> sudo systemctl daemon-reload +# Starte den Tomcat-10-Dienst +> sudo systemctl enable --now openrouteservice.service +# Überprüfe den Status des Tomcat-10-Dienstes +> sudo systemctl status openrouteservice.service +``` + +Navigiere zu [http://localhost:8080](http://localhost:8080) in deinem Browser, um die Tomcat-10-Willkommensseite zu +sehen. + +## Vorbereitung der openrouteservice-Umgebung + +Da Tomcat 10 nun eingerichtet ist, können wir auch openrouteservice mit Java 17 einrichten. + +### Das openrouteservice WAR-File herunterladen + +Um openrouteservice v8 oder v9 mit Tomcat 10 einzurichten, benötigst du zunächst das entsprechende WAR-File. Besuche +die [openrouteservice Releases-Seite](https://github.com/GIScience/openrouteservice/releases) und lade die neueste +Version des WAR-Files herunter. + +```shell +# Lade das neueste openrouteservice WAR-File herunter, z. B. für v8.2.0. Für v9 nutze einfach z. B. v9.0.0 +> curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war +# Verschiebe das WAR-File in das Tomcat-Webapps-Verzeichnis +> mv ors.war /opt/tomcat/webapps/ +# Starte den Tomcat-10-Dienst neu +> sudo systemctl restart openrouteservice.service +# Überprüfe den Status des Tomcat-10-Dienstes +> sudo systemctl status openrouteservice.service +``` + +Navigiere zu [http://localhost:8080/ors/v2/health](http://localhost:8080/ors/v2/health), um den Status von +openrouteservice zu sehen. +Die Ausgabe sollte wie folgt aussehen: + +```json +{ + "status": "not ready" +} + +``` + +::: info +ORS ist nun korrekt mit Tomcat 10 eingerichtet, muss jedoch noch konfiguriert werden. Daher zeigt es `not ready` an. +Wenn du genaue Log-Ausgaben sehen möchtest, kannst du die Tomcat-Logdateien im Verzeichnis `/opt/tomcat/logs` +überprüfen. +::: + +### Die openrouteservice-Ordnerstruktur erstellen + +Um openrouteservice korrekt zum Laufen zu bringen, +musst du die Ordnerstruktur einrichten, +eine Test-OSM-Datei herunterladen und die Konfiguration vornehmen. + +```shell +mkdir -p "/opt/openrouteservice/graphs" +mkdir -p "/opt/openrouteservice/logs" +mkdir -p "/opt/openrouteservice/data" +mkdir -p "/opt/openrouteservice/elevation_cache" +``` + +::: info +Die Ordnerstruktur ist ein Vorschlag von uns und kann an deine Bedürfnisse angepasst werden. +Stelle nur sicher, dass du die Konfiguration entsprechend anpasst sowie die Berechtigungen korrekt setzt. +::: + +### Eine Test-OSM-Datei herunterladen + +Eine gute Quelle für aktuelle OSM-Dateien ist der [Geofabrik-Downloadserver](https://download.geofabrik.de/). +Wir werden eine kleine Test-OSM-Datei für Andorra herunterladen. + +```shell +# Lade eine Test-OSM-Datei in das Verzeichnis /opt/openrouteservice/data herunter +> curl -L https://download.geofabrik.de/europe/andorra-latest.osm.pbf > /opt/openrouteservice/data/andorra-latest.osm.pbf +``` + +### openrouteservice konfigurieren + +Die Konfiguration von Tomcat und openrouteservice erfolgt am besten durch das Setzen der Konfiguration in der Datei +`setenv.sh` im `bin`-Verzeichnis von Tomcat. + +```shell +# Erstelle die Datei `setenv.sh` im `bin`-Verzeichnis von Tomcat +> sudo nano /opt/tomcat/bin/setenv.sh +``` + +Füge die folgenden Inhalte in die Datei ein und speichere sie. +Stelle sicher, dass du den Wert von `-Xmx` an dein System und die Größe der verwendeten `OSM-Datei` anpasst. +Wenn du eine andere `OSM-Datei` erstellen möchtest, kannst du den Wert von source_file anpassen. + +Zwischen den Versionen 8 und 9 haben sich die Konfigurationseigenschaften geändert. Achte darauf, die richtigen +Eigenschaften zu verwenden. + +Wenn du mehr über die neuen Konfigurationsoptionen in den Versionen 8 & 9 erfahren möchtest, lies +die [Konfigurationsdokumentation](/run-instance/configuration/index.md). + +**Beispiel `setenv.sh`-Datei für openrouteservice v8** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.elevation=false \ +-Dors.engine.graphs_root_path=/opt/openrouteservice/graphs \ +-Dors.engine.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +**Beispiel `setenv.sh`-Datei für openrouteservice v9** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.driving-car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.enabled=false \ +-Dors.engine.profile_default.graph_path=/opt/openrouteservice/graphs \ +-Dors.engine.profile_default.build.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +Setze `ors.engine.graphs_data_access` auf `RAM_STORE`, wenn du den RAM-Store anstelle des MMAP-Stores verwenden +möchtest. +Achte darauf, dass `-Xmx` an dein System und deinen Graphen angepasst ist und dein System über genügend Speicher +verfügt. + +## openrouteservice ausführen + +Wenn du die oben genannten Schritte befolgt hast, sollte openrouteservice nun korrekt mit Tomcat 10 und Java 17 +eingerichtet sein. +Die folgenden Schritte sind immer notwendig, wenn du die Konfiguration, die Ordnerstruktur oder die Graphen änderst: + +```shell +# Setze die Besitzrechte für Tomcat erneut +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chown -R tomcat:tomcat /opt/openrouteservice +> sudo chmod -R 754 /opt/openrouteservice +# Starte den Tomcat-10-Dienst neu +> sudo systemctl restart openrouteservice.service +# Überprüfe den Status des Tomcat-10-Dienstes +> sudo systemctl status openrouteservice.service +``` + +Nachdem openrouteservice nun korrekt mit den richtigen Konfigurationen eingerichtet ist, +überprüfe die Logdateien im Verzeichnis `/opt/openrouteservice/logs/ors.log` oder die Tomcat-Logdateien im Verzeichnis +`/opt/tomcat/logs`. +Navigiere zu [http://localhost:8080/ors/v2/health](http://localhost:8080/ors/v2/health) in deinem Browser, um den +Status von openrouteservice zu überprüfen, oder sende eine Anfrage an die API. + +```shell +> curl http://localhost:8080/ors/v2/health +``` + +Die Ausgabe sollte wie folgt aussehen: + +```json +{ + "status": "ready" +} +``` + +## Beispielanfragen + +Teste, ob openrouteservice korrekt funktioniert, indem du eine Anfrage an die API sendest. +Passe den Test entsprechend deiner heruntergeladenen OSM-Datei an. + +```shell +# Teste eine Route von A nach B in Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/directions/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"coordinates":[[1.5036892890930176, 42.4972256361276],[1.6298711299896242, 42.57831077271361]]}' + +# Teste eine Isochrone von einem Punkt in Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/isochrones/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"locations":[[1.5036892890930176, 42.4972256361276]],"range":[300]}' +``` + +## Optional: Pre-Build Graphen updaten + +Falls du nur die vorhandenen Graphen durch neue vorgefertigte ersetzen möchtest, folge diesen Schritten: + +1. Lade die neuen Graphen von der entsprechenden Quelle herunter. + Diese liegen in der Regel in einer `zip-` oder `tar.xz`-Datei vor. +2. Entpacke die neuen Graphen und stelle sicher, dass sie das richtige Format haben. + +```shell +# Im Fall einer tar.xz-Datei +> tar -xvf new_graphs.tar.xz +# Im Fall einer ZIP-Datei kannst du den unzip-Befehl verwenden +> unzip new_graphs.zip +``` + +Die entpackten Graphen haben eine ähnliche Ordnerstruktur wie diese: + +```shell +new_graphs/ +├── driving-car +└── cycling-regular +``` + +3. Leere das alte Graphen-Verzeichnis `/opt/openrouteservice/graphs/`: + +```shell +> mv /opt/openrouteservice/graphs /opt/openrouteservice/graphs_old +> mkdir /opt/openrouteservice/graphs +``` + +4. Verschiebe die neuen Graphen in das Verzeichnis `/opt/openrouteservice/graphs/`. + Die neue Graphen-Ordnerstruktur sollte wie folgt aussehen: + +```shell +/opt/openrouteservice/graphs/ +├── driving-car +└── cycling-regular +``` + +5. Setze die [korrekten Berechtigungen](#openrouteservice-ausführen) für das Tomcat-Verzeichnis und starte den + Tomcat-Dienst neu. +6. Führe die [Beispielanfragen](#beispielanfragen) aus, um zu überprüfen, ob die neuen Graphen korrekt funktionieren. + +## Optional: openrouteservice aktualisieren + +Falls du openrouteservice auf eine neue Version aktualisieren möchtest, kannst du die folgenden Schritte ausführen: + +1. Stoppe den Tomcat-Dienst. + +```shell +> sudo systemctl stop openrouteservice.service +``` + +2. Lade die neue [WAR-Datei](#das-openrouteservice-war-file-herunterladen) für die gewünschte Version herunter. +3. Leere das alte Webapps-Verzeichnis `/opt/tomcat/webapps/` und verschiebe die neue `WAR-Datei` in dieses Verzeichnis. +4. Passe die [openrouteservice-Konfiguration](#openrouteservice-konfigurieren) in der Datei `setenv.sh` an. +5. [Setze die korrekten Berechtigungen](#openrouteservice-ausführen) für das Tomcat-Verzeichnis und starte den + Tomcat-Dienst neu. +6. Führe die [Beispielanfragen](#beispielanfragen) aus, um zu überprüfen, ob die neue Version korrekt funktioniert. diff --git a/docs/run-instance/example-setups/tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md similarity index 82% rename from docs/run-instance/example-setups/tomcat-10-ubuntu_22_04.md rename to docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index 05818018ac..06d8dff0b5 100644 --- a/docs/run-instance/example-setups/tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -1,7 +1,10 @@ # Setup ORS v8 and v9 with Tomcat 10 on Ubuntu 22.04 -This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8. -The guild will cover the following steps: +This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8 and v9. + +::: info +To the [german version](de_tomcat-10-ubuntu_22_04) of this tutorial. +::: ## Prerequisites @@ -158,7 +161,7 @@ WantedBy=multi-user.target > sudo systemctl status openrouteservice.service ``` -Now navigate to `http://localhost:8080` in your browser to see the Tomcat 10 welcome page. +Now navigate to [http://localhost:8080](http://localhost:8080) in your browser to see the Tomcat 10 welcome page. ## Prepare the openrouteservice environment @@ -215,7 +218,7 @@ Make sure to adjust the configuration accordingly as well as the permissions. ### Download a test osm file A good source for latest osm-files is the [Geofabrik download server](https://download.geofabrik.de/). -We will download a test osm file for small part of Germany (Hessen). +We will download a small test osm file for Andorra. ```shell # Download a test osm file to the /opt/openrouteservice/data directory @@ -226,15 +229,15 @@ We will download a test osm file for small part of Germany (Hessen). Configure Tomcat and openrouteservice is best done by setting the configuration in the `setenv.sh` file in the `bin` directory of Tomcat. -Create the `setenv.sh` file in the `bin` directory of Tomcat. ```shell +# Create the `setenv.sh` file in the `bin` directory of Tomcat. > sudo nano /opt/tomcat/bin/setenv.sh ``` Paste the following contents into the file and save it. Make sure to adjust the `-Xmx` value to a value that fits your system and graph. -If you want to build another pbf-File, you can adjust the `source_file` value. +If you want to build another OSM-File, you can adjust the `source_file` value. Between version 8 and 9, the configuration properties have changed. Make sure to reference the correct properties. @@ -329,4 +332,63 @@ Please adapt the test according to your downloaded osm file. -H 'Content-Type: application/json; charset=utf-8' \ -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ -d '{"locations":[[1.5036892890930176, 42.4972256361276]],"range":[300]}' -``` \ No newline at end of file +``` + +## Optional: Pre-Build Graph Update + +In case you want to only update the existing graphs with new pre-build ones, you can follow these steps: + +1. Download the new graphs from the respective source. They will most like come in a zip or tar.xz file. +2. Unpack the new graphs and make sure they are in the correct format. + +```shell +# In case of a tar.xz file +> tar -xvf new_graphs.tar.xz +# In case of a zip file you can use the unzip command +> unzip new_graphs.zip +``` + +The unpacked graphs will have a folder structure similar to this: + +```shell +new_graphs/ +├── driving-car +└── cycling-regular +``` + +3. Empty the old graphs directory `/opt/openrouteservice/graphs/`: + +```shell +> mv /opt/openrouteservice/graphs /opt/openrouteservice/graphs_old +> mkdir /opt/openrouteservice/graphs +``` + +3. Move the new graphs to the `/opt/openrouteservice/graphs/` directory. The new graphs folder structure should look + similar to this: + +```shell +/opt/openrouteservice/graphs/ +├── driving-car +└── cycling-regular +``` + +4. [Apply the correct permissions](#run-openrouteservice) to the Tomcat directory + and restart the Tomcat service. +5. Try the [example requests](#example-requests) to see if the new graphs are working correctly. + +## Optional: Update openrouteservice to a new version + +In case you want to update openrouteservice to a new version, you can follow these steps: + +1. Stop the Tomcat service. + +```shell +> sudo systemctl stop openrouteservice.service +``` + +2. Empty the old webapps directory `/opt/tomcat/webapps/` and move the new war-File to the directory. +3. Download the new [war-File](#download-the-openrouteservice-war-file) for the new version. +4. Adapt the [openrouteservice configuration](#configure-openrouteservice) in the `setenv.sh` file. +5. [Apply the correct permissions](#run-openrouteservice) to the Tomcat directory + and restart the Tomcat service. +6. Try the [example requests](#example-requests) to see if the new version is working correctly. diff --git a/docs/run-instance/example-setups/index.md b/docs/run-instance/example-setups/index.md index d13af22b30..6ab7f2642e 100644 --- a/docs/run-instance/example-setups/index.md +++ b/docs/run-instance/example-setups/index.md @@ -13,11 +13,11 @@ If you are an advanced user, have a look at the existing setup instructions: ::: tip The examples are growing over time and only provide a small subset of possible setups. \ -If you are missing specific detailed setup instruction, **you are welcome to contribute** by creating a pull request. +If you are missing specific detailed setup instruction, **you are welcome to contribute** by creating a pull request. ::: The following examples are (currently) available: -| Setup | Description | Difficulty | Link | -|--------------------------|--------------------------------------------------------------------|------------|------------------------------------------------------| -| Tomcat 10 - Ubuntu 22.04 | Setup openrouteservice with Tomcat 10 and Java 17 on Ubuntu 22.04. | Medium | [tomcat-10-war-java-17.md](tomcat-10-ubuntu_22_04) | +| Setup | Description | Difficulty | Link | +|--------------------------|--------------------------------------------------------------------|------------|--------------------------------------------------------------------------------| +| Tomcat 10 - Ubuntu 22.04 | Setup openrouteservice with Tomcat 10 and Java 17 on Ubuntu 22.04. | Medium | [English](en_tomcat-10-ubuntu_22_04)
[German](de_tomcat-10-ubuntu_22_04) | From d24e089810238912db22869016ee13c987ecbc2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20K=2E=20Ole=C5=9B?= Date: Mon, 9 Dec 2024 09:44:48 +0100 Subject: [PATCH 03/17] chore: Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jochen Häußler --- .../de_tomcat-10-ubuntu_22_04.md | 10 +++---- .../en_tomcat-10-ubuntu_22_04.md | 26 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md index e7cf009998..3d65f0d694 100644 --- a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -64,8 +64,8 @@ Aktualisiere die Standard-Java-Version auf Java 17 oder die installierte Version ``` ::: info -**Hinweis:** Der Pfad zur Java-17-Installation kann je nach System unterschiedlich sein. -Hinweis: Ab jetzt wird der Pfad zur Java-17-Installation als `JAVA_HOME` bezeichnet. +**Hinweis:** Der Pfad zur Java-17-Installation kann je nach System unterschiedlich sein. \ +**Hinweis:** Ab jetzt wird der Pfad zur Java-17-Installation als `JAVA_HOME` bezeichnet. ::: ### Einen neuen Benutzer für Tomcat 10 erstellen @@ -126,7 +126,7 @@ Füge den folgenden Inhalt in die Datei ein und speichere sie. > sudo nano /etc/systemd/system/openrouteservice.service ``` -```shell +```ini [Unit] Description=Tomcat - openrouteservice After=syslog.target network.target @@ -384,7 +384,7 @@ new_graphs/ └── cycling-regular ``` -5. Setze die [korrekten Berechtigungen](#openrouteservice-ausführen) für das Tomcat-Verzeichnis und starte den +5. Setze die [korrekten Berechtigungen](#setze-die-notwendigen-berechtigungen-fur-den-tomcat-10-benutzer) für das Tomcat-Verzeichnis und starte den Tomcat-Dienst neu. 6. Führe die [Beispielanfragen](#beispielanfragen) aus, um zu überprüfen, ob die neuen Graphen korrekt funktionieren. @@ -401,6 +401,6 @@ Falls du openrouteservice auf eine neue Version aktualisieren möchtest, kannst 2. Lade die neue [WAR-Datei](#das-openrouteservice-war-file-herunterladen) für die gewünschte Version herunter. 3. Leere das alte Webapps-Verzeichnis `/opt/tomcat/webapps/` und verschiebe die neue `WAR-Datei` in dieses Verzeichnis. 4. Passe die [openrouteservice-Konfiguration](#openrouteservice-konfigurieren) in der Datei `setenv.sh` an. -5. [Setze die korrekten Berechtigungen](#openrouteservice-ausführen) für das Tomcat-Verzeichnis und starte den +5. [Setze die korrekten Berechtigungen](#setze-die-notwendigen-berechtigungen-fur-den-tomcat-10-benutzer) für das Tomcat-Verzeichnis und starte den Tomcat-Dienst neu. 6. Führe die [Beispielanfragen](#beispielanfragen) aus, um zu überprüfen, ob die neue Version korrekt funktioniert. diff --git a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index 06d8dff0b5..4e0b364f8f 100644 --- a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -48,7 +48,7 @@ sudo update-alternatives --list java The output should look like similar to this: -```text +```shell [...] /usr/lib/jvm/java-17-openjdk-amd64/ [...] @@ -96,7 +96,7 @@ We will call this user `tomcat`. > rm -r apache-tomcat-${TOMCAT_VERSION} apache-tomcat-${TOMCAT_VERSION}.tar.gz ``` -### Set the necessary permissions for the Tomcat 10 user. +### Set the necessary permissions for the Tomcat 10 user The following commands will set the necessary permissions for the `tomcat` user. They have to be executed as the root user and should always be executed when changes were made to the Tomcat directory. @@ -112,13 +112,13 @@ They have to be executed as the root user and should always be executed when cha - `5` grants read and execute permissions to the group. - `4` grants read permissions to others. -### Create a systemd service for Tomcat 10. +### Create a systemd service for Tomcat 10 We now create a systemd service for Tomcat 10 to manage the Tomcat 10 instance. This will allow your Systemd to start and stop Tomcat 10 as a service automatically. Paste the content into the file and save it. -```bash +```shell > sudo nano /etc/systemd/system/openrouteservice.service ``` @@ -167,16 +167,16 @@ Now navigate to [http://localhost:8080](http://localhost:8080) in your browser t Since we have set up Tomcat 10, we can now set up openrouteservice with Java 17. -### Download the openrouteservice war-File +### Download the openrouteservice WAR-File To set up openrouteservice v8 or v9 with Tomcat 10, you first need the respective war-File. Head over to the [openrouteservice releases page](https://github.com/GIScience/openrouteservice/releases) and download -the latest release war-File. +the latest release WAR-File. ```shell -# Download the latest openrouteservice war-File e.g. for v8.2.0. For V9, just use e.g. v9.0.0 +# Download the latest openrouteservice WAR-File e.g. for v8.2.0. For V9, just use e.g. v9.0.0 > curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war -# Move the war-File to the Tomcat webapps directory +# Move the WAR-File to the Tomcat webapps directory > mv ors.war /opt/tomcat/webapps/ # Restart the Tomcat 10 service > sudo systemctl restart openrouteservice.service @@ -297,7 +297,7 @@ The following steps are mandatory whenever you change the configuration, folder Now that openrouteservice is set up with correct configurations, check the log files in the `/opt/openrouteservice/logs/ors.log` or the Tomcat log files in the `/opt/tomcat/logs` directory. -Navigate to `http://localhost:8080/ors/v2/health` in your browser to see the health status of the openrouteservice or +Navigate to [http://localhost:8080/ors/v2/health](http://localhost:8080/ors/v2/health) in your browser to see the health status of the openrouteservice or make a request to the API. ```shell @@ -363,7 +363,7 @@ new_graphs/ > mkdir /opt/openrouteservice/graphs ``` -3. Move the new graphs to the `/opt/openrouteservice/graphs/` directory. The new graphs folder structure should look +4. Move the new graphs to the `/opt/openrouteservice/graphs/` directory. The new graphs folder structure should look similar to this: ```shell @@ -372,9 +372,9 @@ new_graphs/ └── cycling-regular ``` -4. [Apply the correct permissions](#run-openrouteservice) to the Tomcat directory +5. [Apply the correct permissions](#set-the-necessary-permissions-for-the-tomcat-10-user) to the Tomcat directory and restart the Tomcat service. -5. Try the [example requests](#example-requests) to see if the new graphs are working correctly. +6. Try the [example requests](#example-requests) to see if the new graphs are working correctly. ## Optional: Update openrouteservice to a new version @@ -389,6 +389,6 @@ In case you want to update openrouteservice to a new version, you can follow the 2. Empty the old webapps directory `/opt/tomcat/webapps/` and move the new war-File to the directory. 3. Download the new [war-File](#download-the-openrouteservice-war-file) for the new version. 4. Adapt the [openrouteservice configuration](#configure-openrouteservice) in the `setenv.sh` file. -5. [Apply the correct permissions](#run-openrouteservice) to the Tomcat directory +5. [Apply the correct permissions](#set-the-necessary-permissions-for-the-tomcat-10-user) to the Tomcat directory and restart the Tomcat service. 6. Try the [example requests](#example-requests) to see if the new version is working correctly. From d1e1f7155a052ee6176d7d5de13f80c5805d530a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20K=2E=20Ole=C5=9B?= Date: Mon, 9 Dec 2024 23:07:57 +0100 Subject: [PATCH 04/17] chore: Apply suggestions from code review Co-authored-by: Jakob Schnell --- .../example-setups/en_tomcat-10-ubuntu_22_04.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index 4e0b364f8f..272bc6b030 100644 --- a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -87,13 +87,13 @@ We will call this user `tomcat`. # Set the Tomcat version > export TOMCAT_VERSION=10.1.33 # Download the Tomcat 10 tarball -> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz > apache-tomcat-${TOMCAT_VERSION}.tar.gz +> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz > apache-tomcat-$TOMCAT_VERSION.tar.gz # Extract the downloaded file -> tar -xf apache-tomcat-${TOMCAT_VERSION}.tar.gz +> tar -xf apache-tomcat-$TOMCAT_VERSION.tar.gz # Copy the contents of the extracted directory to the /opt/tomcat directory -> cp -R apache-tomcat-${TOMCAT_VERSION}/** /opt/tomcat +> cp -R apache-tomcat-$TOMCAT_VERSION/** /opt/tomcat # Clean up the extracted directory -> rm -r apache-tomcat-${TOMCAT_VERSION} apache-tomcat-${TOMCAT_VERSION}.tar.gz +> rm -r apache-tomcat-$TOMCAT_VERSION apache-tomcat-$TOMCAT_VERSION.tar.gz ``` ### Set the necessary permissions for the Tomcat 10 user @@ -334,9 +334,9 @@ Please adapt the test according to your downloaded osm file. -d '{"locations":[[1.5036892890930176, 42.4972256361276]],"range":[300]}' ``` -## Optional: Pre-Build Graph Update +## Optional: Pre-Built Graph Update -In case you want to only update the existing graphs with new pre-build ones, you can follow these steps: +In case you want to only update the existing graphs with new pre-built ones, you can follow these steps: 1. Download the new graphs from the respective source. They will most like come in a zip or tar.xz file. 2. Unpack the new graphs and make sure they are in the correct format. From 096e8cd2815bae4848db3a504b3e574a4a2f0da6 Mon Sep 17 00:00:00 2001 From: aoles Date: Mon, 9 Dec 2024 23:30:55 +0100 Subject: [PATCH 05/17] chore: Apply suggestions from code review to German version --- .../example-setups/de_tomcat-10-ubuntu_22_04.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md index 3d65f0d694..eb066ba52a 100644 --- a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -89,13 +89,13 @@ Wir nennen diesen Benutzer `tomcat`. # Setze die Tomcat-Version > export TOMCAT_VERSION=10.1.33 # Lade das Tomcat-10-Tarball herunter -> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz > apache-tomcat-${TOMCAT_VERSION}.tar.gz +> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz > apache-tomcat-$TOMCAT_VERSION.tar.gz # Entpacke die heruntergeladene Datei -> tar -xf apache-tomcat-${TOMCAT_VERSION}.tar.gz +> tar -xf apache-tomcat-$TOMCAT_VERSION.tar.gz # Kopiere den Inhalt des entpackten Verzeichnisses in das Verzeichnis /opt/tomcat -> cp -R apache-tomcat-${TOMCAT_VERSION}/** /opt/tomcat +> cp -R apache-tomcat-$TOMCAT_VERSION/** /opt/tomcat # Bereinige das entpackte Verzeichnis -> rm -r apache-tomcat-${TOMCAT_VERSION} apache-tomcat-${TOMCAT_VERSION}.tar.gz +> rm -r apache-tomcat-$TOMCAT_VERSION apache-tomcat-$TOMCAT_VERSION.tar.gz ``` ### Setze die notwendigen Berechtigungen für den Tomcat-10-Benutzer From f646ff3c5912393d1d7f7917800737c4d1d01674 Mon Sep 17 00:00:00 2001 From: aoles Date: Mon, 9 Dec 2024 23:32:54 +0100 Subject: [PATCH 06/17] docs: set permissions on `setenv.sh` --- docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md | 2 ++ docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md index eb066ba52a..7d8fe578f8 100644 --- a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -289,6 +289,7 @@ möchtest. Achte darauf, dass `-Xmx` an dein System und deinen Graphen angepasst ist und dein System über genügend Speicher verfügt. + ## openrouteservice ausführen Wenn du die oben genannten Schritte befolgt hast, sollte openrouteservice nun korrekt mit Tomcat 10 und Java 17 @@ -299,6 +300,7 @@ Die folgenden Schritte sind immer notwendig, wenn du die Konfiguration, die Ordn # Setze die Besitzrechte für Tomcat erneut > sudo chown -R tomcat:tomcat /opt/tomcat > sudo chown -R tomcat:tomcat /opt/openrouteservice +> sudo chmod -R 754 /opt/tomcat/bin/setenv.sh > sudo chmod -R 754 /opt/openrouteservice # Starte den Tomcat-10-Dienst neu > sudo systemctl restart openrouteservice.service diff --git a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index 272bc6b030..f5cd7e37ac 100644 --- a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -287,6 +287,7 @@ The following steps are mandatory whenever you change the configuration, folder # Reinstate ownerships for tomcat > sudo chown -R tomcat:tomcat /opt/tomcat > sudo chown -R tomcat:tomcat /opt/openrouteservice +> sudo chmod -R 754 /opt/tomcat/bin/setenv.sh > sudo chmod -R 754 /opt/openrouteservice # Restart the Tomcat 10 service > sudo systemctl restart openrouteservice.service From 29150e069dca4a615fc75beec827df924b323ff8 Mon Sep 17 00:00:00 2001 From: aoles Date: Tue, 10 Dec 2024 00:11:01 +0100 Subject: [PATCH 07/17] chore: avoid formatting changes --- docs/.vitepress/config.js | 93 +++++++++------------------------------ 1 file changed, 20 insertions(+), 73 deletions(-) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 8db18576a3..fb0d1b40d9 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -82,62 +82,25 @@ export default withMermaid(defineVersionedConfig({ text: 'Endpoints', collapsed: true, link: '/api-reference/endpoints/', items: [ { - text: 'Directions', - collapsed: true, - link: '/api-reference/endpoints/directions/', + text: 'Directions', collapsed: true, link: '/api-reference/endpoints/directions/', items: [ + {text: 'Requests and Return Types', link: '/api-reference/endpoints/directions/requests-and-return-types'}, + {text: 'Routing Options', link: '/api-reference/endpoints/directions/routing-options'}, { - text: 'Requests and Return Types', - link: '/api-reference/endpoints/directions/requests-and-return-types' - }, - { - text: 'Routing Options', - link: '/api-reference/endpoints/directions/routing-options' - }, - { - text: 'Extra info', - collapsed: true, - link: '/api-reference/endpoints/directions/extra-info/', + text: 'Extra info', collapsed: true, link: '/api-reference/endpoints/directions/extra-info/', items: [ - { - text: 'Steepness IDs', - link: '/api-reference/endpoints/directions/extra-info/steepness' - }, - { - text: 'Surface IDs', - link: '/api-reference/endpoints/directions/extra-info/surface' - }, - { - text: 'Category IDs', - link: '/api-reference/endpoints/directions/extra-info/waycategory' - }, - { - text: 'Type IDs', - link: '/api-reference/endpoints/directions/extra-info/waytype' - }, - { - text: 'Difficulty IDs', - link: '/api-reference/endpoints/directions/extra-info/trail-difficulty' - }, - { - text: 'Restriction IDs', - link: '/api-reference/endpoints/directions/extra-info/road-access-restrictions' - }, + {text: 'Steepness IDs', link: '/api-reference/endpoints/directions/extra-info/steepness'}, + {text: 'Surface IDs', link: '/api-reference/endpoints/directions/extra-info/surface'}, + {text: 'Category IDs', link: '/api-reference/endpoints/directions/extra-info/waycategory'}, + {text: 'Type IDs', link: '/api-reference/endpoints/directions/extra-info/waytype'}, + {text: 'Difficulty IDs', link: '/api-reference/endpoints/directions/extra-info/trail-difficulty'}, + {text: 'Restriction IDs', link: '/api-reference/endpoints/directions/extra-info/road-access-restrictions'}, {text: 'Country IDs', link: '/technical-details/country-list'}, ] }, - { - text: 'Route Attributes', - link: '/api-reference/endpoints/directions/route-attributes' - }, - { - text: 'Geometry Decoding', - link: '/api-reference/endpoints/directions/geometry-decoding' - }, - { - text: 'Instruction Types', - link: '/api-reference/endpoints/directions/instruction-types' - }, + {text: 'Route Attributes', link: '/api-reference/endpoints/directions/route-attributes'}, + {text: 'Geometry Decoding', link: '/api-reference/endpoints/directions/geometry-decoding'}, + {text: 'Instruction Types', link: '/api-reference/endpoints/directions/instruction-types'}, ] }, {text: 'Isochrones', link: '/api-reference/endpoints/isochrones/'}, @@ -231,7 +194,7 @@ export default withMermaid(defineVersionedConfig({ }, {text: 'ors.cors', link: '/run-instance/configuration/cors/'}, {text: 'ors.messages', link: '/run-instance/configuration/messages/'}, - {text: 'JSON config (deprecated)', link: '/run-instance/configuration/json.md'} + {text: 'JSON config (deprecated)', link:'/run-instance/configuration/json.md'} ] }, { @@ -244,10 +207,7 @@ export default withMermaid(defineVersionedConfig({ text: 'Contributing', collapsed: true, link: '/contributing/', items: [ {text: 'Backend documentation', link: '/contributing/backend-documentation'}, - { - text: 'Contribution guidelines', - link: 'https://github.com/GIScience/openrouteservice/blob/main/CONTRIBUTE.md' - }, + {text: 'Contribution guidelines', link: 'https://github.com/GIScience/openrouteservice/blob/main/CONTRIBUTE.md'}, {text: 'Contributing translations', link: '/contributing/contributing-translations'}, ] }, @@ -255,25 +215,12 @@ export default withMermaid(defineVersionedConfig({ text: 'Technical details', collapsed: true, link: '/technical-details/', items: [ {text: 'Country List', link: '/technical-details/country-list'}, - { - text: 'Travel Speeds', link: '/technical-details/travel-speeds/', + {text: 'Travel Speeds', link: '/technical-details/travel-speeds/', items: [ - { - text: 'Country Speeds', - link: '/technical-details/travel-speeds/country-speeds.md' - }, - { - text: 'Tracktype Speeds', - link: '/technical-details/travel-speeds/tracktype-speeds.md' - }, - { - text: 'Waytype Speeds', - link: '/technical-details/travel-speeds/waytype-speeds.md' - }, - { - text: 'Surface Speeds', - link: '/technical-details/travel-speeds/surface-speeds.md' - }, + {text: 'Country Speeds', link: '/technical-details/travel-speeds/country-speeds.md'}, + {text: 'Tracktype Speeds', link: '/technical-details/travel-speeds/tracktype-speeds.md'}, + {text: 'Waytype Speeds', link: '/technical-details/travel-speeds/waytype-speeds.md'}, + {text: 'Surface Speeds', link: '/technical-details/travel-speeds/surface-speeds.md'}, ] }, {text: 'Tag Filtering', link: '/technical-details/tag-filtering'}, From bfe252167ec1942ed4df84d8f31f6cfdb566850d Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Tue, 10 Dec 2024 09:25:34 +0100 Subject: [PATCH 08/17] fix: correct link in sidebar --- docs/.vitepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index fb0d1b40d9..c6583108b7 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -199,7 +199,7 @@ export default withMermaid(defineVersionedConfig({ }, { text: 'Example Setups', collapsed: true, link: '/run-instance/example-setups', - items: [{text: 'Tomcat 10 - Ubuntu 22.04', link: '/run-instance/example-setups/tomcat-10-ubuntu_22_04'}] + items: [{text: 'Tomcat 10 - Ubuntu 22.04', link: '/run-instance/example-setups/en_tomcat-10-ubuntu_22_04'}] }, ] }, From 1416fbad4deb2f068eef311d1996171b7e929728 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 11:04:29 +0100 Subject: [PATCH 09/17] fix: remove duplicate quote, introduced by rebasing --- docs/.vitepress/config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index c6583108b7..bf0909690f 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -65,7 +65,6 @@ export default withMermaid(defineVersionedConfig({ // undocumented options for NotFound-Page notFound: { title: 'PAGE NOT FOUND', - quote: 'We recently reworked most of our documentation. You probably ended up here by clicking an old link somewhere, e.g. in the forum. Let us know how you got here and we\'ll fix it. Click the link below and check "Getting Started" - this will help you figure out where to find what you came for.', quote: 'We recently introduced versioning for our documentation. You probably ended up here by changing the version - and this page doesn\'t exist in this version. Click the link below and check "Getting Started" - you will need to change the version again, though.', linkText: 'Documentation Home - latest Version', }, From 2613540d87f1675c86c56f8de30dfd60e6dc7b68 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 11:25:48 +0100 Subject: [PATCH 10/17] feat: add example setup to v8.2.0 --- .../.vitepress/sidebars/versioned/v8.2.0.json | 9 + .../de_tomcat-10-ubuntu_22_04.md | 408 ++++++++++++++++++ .../en_tomcat-10-ubuntu_22_04.md | 395 +++++++++++++++++ .../run-instance/example-setups/index.md | 23 + 4 files changed, 835 insertions(+) create mode 100644 docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md create mode 100644 docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md create mode 100644 docs/versions/v8.2.0/run-instance/example-setups/index.md diff --git a/docs/.vitepress/sidebars/versioned/v8.2.0.json b/docs/.vitepress/sidebars/versioned/v8.2.0.json index 9966d29dbe..64d93f50e0 100644 --- a/docs/.vitepress/sidebars/versioned/v8.2.0.json +++ b/docs/.vitepress/sidebars/versioned/v8.2.0.json @@ -238,6 +238,15 @@ "link": "/run-instance/configuration/json.md" } ] + }, + { + "text": "Example Setups", + "collapsed": true, + "link": "/run-instance/example-setups", + "items": [ + {"text": "Tomcat 10 - Ubuntu 22.04", + "link": "/run-instance/example-setups/en_tomcat-10-ubuntu_22_04"} + ] } ] }, diff --git a/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md new file mode 100644 index 0000000000..7d8fe578f8 --- /dev/null +++ b/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -0,0 +1,408 @@ +# Einrichtung von ORS v8 und v9 mit Tomcat 10 auf Ubuntu 22.04 + +Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v8 bzw. v9 einrichtest. + +::: info +Zur [englischen Version](en_tomcat-10-ubuntu_22_04) dieses Tutorials. +::: + +## Voraussetzungen + +- Ubuntu 22.04 mit aktiviertem Systemd (Systemd ist standardmäßig aktiviert) +- Tomcat 10 +- Java 17 oder höher + +## Annahmen + +- Es wird davon ausgegangen, dass nur eine Tomcat-10-Instanz auf deinem System läuft. +- Wenn du mehrere Tomcat-Dienste betreiben möchtest, bist du ein fortgeschrittener Benutzer und solltest die Anweisungen + entsprechend anpassen. + +## Vorbereitung der Tomcat-10-Umgebung + +Die folgenden Schritte helfen dir, die Umgebung für Tomcat 10 vorzubereiten. + +### Java 17 installieren + +Openrouteservice benötigt Java 17 oder höher, um ab Version 8 zu laufen. +Der Grund dafür ist die Einführung von Tomcat 10. +Du kannst auch eine neuere Version von Java verwenden, falls verfügbar. + +```shell +# Aktualisiere den Paketindex +> sudo apt-get update +# Installiere Java 17 oder höher, curl und nano +> sudo apt-get install openjdk-17-jre-headless curl nano +``` + +- `openjdk-17-jre-headless` ist das Java-17-Laufzeitpaket ohne grafische Oberfläche. + Für openrouteservice wird keine grafische Benutzeroberfläche benötigt. +- `curl` ist ein Befehlszeilentool zum Herunterladen von Dateien aus dem Web und wird verwendet, um bestimmte Ressourcen + herunterzuladen. +- `nano` ist ein einfacher Texteditor, der zum Bearbeiten von Dateien verwendet wird. + +Liste die verfügbaren Java-Versionen auf. + +```shell +# Zeige verfügbare Optionen an und kopiere den Pfad zur Java-17-Installation +sudo update-alternatives --list java +``` + +Die Ausgabe sollte in etwa so aussehen: + +```shell +[...] +/usr/lib/jvm/java-17-openjdk-amd64/ +[...] +``` + +Aktualisiere die Standard-Java-Version auf Java 17 oder die installierte Version. + +```shell +# Setze die Standard-Java-Version auf Java 17 +> sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java +``` + +::: info +**Hinweis:** Der Pfad zur Java-17-Installation kann je nach System unterschiedlich sein. \ +**Hinweis:** Ab jetzt wird der Pfad zur Java-17-Installation als `JAVA_HOME` bezeichnet. +::: + +### Einen neuen Benutzer für Tomcat 10 erstellen + +Der Tomcat-10-Dienst sollte aus Sicherheitsgründen unter einem separaten Benutzer laufen. +Dieser Benutzer sollte keine Anmeldeberechtigungen haben und keine Befehle ausführen können. +Wir nennen diesen Benutzer `tomcat`. + +```shell +# Erstelle einen neuen Benutzer für Tomcat 10 +> useradd -r -m -U -d /opt/tomcat -s /bin/false tomcat +``` + +- `-r` erstellt einen Systembenutzer. +- `-m` erstellt ein Home-Verzeichnis `(/opt/tomcat)` für den Benutzer und setzt die notwendigen Berechtigungen. +- `-U` erstellt eine Gruppe mit demselben Namen wie der Benutzer. + +### Tomcat 10 herunterladen und einrichten + +```shell +# Setze die Tomcat-Version +> export TOMCAT_VERSION=10.1.33 +# Lade das Tomcat-10-Tarball herunter +> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz > apache-tomcat-$TOMCAT_VERSION.tar.gz +# Entpacke die heruntergeladene Datei +> tar -xf apache-tomcat-$TOMCAT_VERSION.tar.gz +# Kopiere den Inhalt des entpackten Verzeichnisses in das Verzeichnis /opt/tomcat +> cp -R apache-tomcat-$TOMCAT_VERSION/** /opt/tomcat +# Bereinige das entpackte Verzeichnis +> rm -r apache-tomcat-$TOMCAT_VERSION apache-tomcat-$TOMCAT_VERSION.tar.gz +``` + +### Setze die notwendigen Berechtigungen für den Tomcat-10-Benutzer + +Die folgenden Befehle setzen die notwendigen Berechtigungen für den tomcat-Benutzer. +Sie müssen als Root-Benutzer ausgeführt werden und sollten immer dann ausgeführt werden, +wenn Änderungen am Tomcat-Verzeichnis vorgenommen wurden. + +```shell +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chmod -R 754 /opt/tomcat +``` + +- `chown -R tomcat:tomcat /opt/tomcat` setzt den Besitzer und die Gruppe des `/opt/tomcat`-Verzeichnisses auf den + tomcat-Benutzer. +- `chmod -R 754 /opt/tomcat` setzt die Berechtigungen für das `/opt/tomcat`-Verzeichnis. + - 7 gewährt Lese-, Schreib- und Ausführungsrechte für den Besitzer. + - 5 gewährt Lese- und Ausführungsrechte für die Gruppe. + - 4 gewährt Leserechte für andere. + +### Erstelle einen Systemd-Dienst für Tomcat 10 + +Erstelle einen Systemd-Dienst, um Tomcat 10 zu verwalten. +Dadurch kann Systemd den Tomcat-10-Dienst automatisch starten und stoppen. +Füge den folgenden Inhalt in die Datei ein und speichere sie. + +```shell +> sudo nano /etc/systemd/system/openrouteservice.service +``` + +```ini +[Unit] +Description=Tomcat - openrouteservice +After=syslog.target network.target + +[Service] +Type=forking + +User=tomcat +Group=tomcat +RestartSec=10 +Restart=always + +Environment="JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/" +Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom" +Environment="CATALINA_OPTS=-server -XX:+UseParallelGC" + +Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid +Environment=CATALINA_HOME=/opt/tomcat +Environment=CATALINA_BASE=/opt/tomcat + +ExecStart=/opt/tomcat/bin/startup.sh +ExecStop=/opt/tomcat/bin/shutdown.sh + +[Install] +WantedBy=multi-user.target +``` + +### Teste die neue Tomcat-10-Einrichtung + +```shell +# Lade den Systemd-Daemon neu +> sudo systemctl daemon-reload +# Starte den Tomcat-10-Dienst +> sudo systemctl enable --now openrouteservice.service +# Überprüfe den Status des Tomcat-10-Dienstes +> sudo systemctl status openrouteservice.service +``` + +Navigiere zu [http://localhost:8080](http://localhost:8080) in deinem Browser, um die Tomcat-10-Willkommensseite zu +sehen. + +## Vorbereitung der openrouteservice-Umgebung + +Da Tomcat 10 nun eingerichtet ist, können wir auch openrouteservice mit Java 17 einrichten. + +### Das openrouteservice WAR-File herunterladen + +Um openrouteservice v8 oder v9 mit Tomcat 10 einzurichten, benötigst du zunächst das entsprechende WAR-File. Besuche +die [openrouteservice Releases-Seite](https://github.com/GIScience/openrouteservice/releases) und lade die neueste +Version des WAR-Files herunter. + +```shell +# Lade das neueste openrouteservice WAR-File herunter, z. B. für v8.2.0. Für v9 nutze einfach z. B. v9.0.0 +> curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war +# Verschiebe das WAR-File in das Tomcat-Webapps-Verzeichnis +> mv ors.war /opt/tomcat/webapps/ +# Starte den Tomcat-10-Dienst neu +> sudo systemctl restart openrouteservice.service +# Überprüfe den Status des Tomcat-10-Dienstes +> sudo systemctl status openrouteservice.service +``` + +Navigiere zu [http://localhost:8080/ors/v2/health](http://localhost:8080/ors/v2/health), um den Status von +openrouteservice zu sehen. +Die Ausgabe sollte wie folgt aussehen: + +```json +{ + "status": "not ready" +} + +``` + +::: info +ORS ist nun korrekt mit Tomcat 10 eingerichtet, muss jedoch noch konfiguriert werden. Daher zeigt es `not ready` an. +Wenn du genaue Log-Ausgaben sehen möchtest, kannst du die Tomcat-Logdateien im Verzeichnis `/opt/tomcat/logs` +überprüfen. +::: + +### Die openrouteservice-Ordnerstruktur erstellen + +Um openrouteservice korrekt zum Laufen zu bringen, +musst du die Ordnerstruktur einrichten, +eine Test-OSM-Datei herunterladen und die Konfiguration vornehmen. + +```shell +mkdir -p "/opt/openrouteservice/graphs" +mkdir -p "/opt/openrouteservice/logs" +mkdir -p "/opt/openrouteservice/data" +mkdir -p "/opt/openrouteservice/elevation_cache" +``` + +::: info +Die Ordnerstruktur ist ein Vorschlag von uns und kann an deine Bedürfnisse angepasst werden. +Stelle nur sicher, dass du die Konfiguration entsprechend anpasst sowie die Berechtigungen korrekt setzt. +::: + +### Eine Test-OSM-Datei herunterladen + +Eine gute Quelle für aktuelle OSM-Dateien ist der [Geofabrik-Downloadserver](https://download.geofabrik.de/). +Wir werden eine kleine Test-OSM-Datei für Andorra herunterladen. + +```shell +# Lade eine Test-OSM-Datei in das Verzeichnis /opt/openrouteservice/data herunter +> curl -L https://download.geofabrik.de/europe/andorra-latest.osm.pbf > /opt/openrouteservice/data/andorra-latest.osm.pbf +``` + +### openrouteservice konfigurieren + +Die Konfiguration von Tomcat und openrouteservice erfolgt am besten durch das Setzen der Konfiguration in der Datei +`setenv.sh` im `bin`-Verzeichnis von Tomcat. + +```shell +# Erstelle die Datei `setenv.sh` im `bin`-Verzeichnis von Tomcat +> sudo nano /opt/tomcat/bin/setenv.sh +``` + +Füge die folgenden Inhalte in die Datei ein und speichere sie. +Stelle sicher, dass du den Wert von `-Xmx` an dein System und die Größe der verwendeten `OSM-Datei` anpasst. +Wenn du eine andere `OSM-Datei` erstellen möchtest, kannst du den Wert von source_file anpassen. + +Zwischen den Versionen 8 und 9 haben sich die Konfigurationseigenschaften geändert. Achte darauf, die richtigen +Eigenschaften zu verwenden. + +Wenn du mehr über die neuen Konfigurationsoptionen in den Versionen 8 & 9 erfahren möchtest, lies +die [Konfigurationsdokumentation](/run-instance/configuration/index.md). + +**Beispiel `setenv.sh`-Datei für openrouteservice v8** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.elevation=false \ +-Dors.engine.graphs_root_path=/opt/openrouteservice/graphs \ +-Dors.engine.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +**Beispiel `setenv.sh`-Datei für openrouteservice v9** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.driving-car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.enabled=false \ +-Dors.engine.profile_default.graph_path=/opt/openrouteservice/graphs \ +-Dors.engine.profile_default.build.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +Setze `ors.engine.graphs_data_access` auf `RAM_STORE`, wenn du den RAM-Store anstelle des MMAP-Stores verwenden +möchtest. +Achte darauf, dass `-Xmx` an dein System und deinen Graphen angepasst ist und dein System über genügend Speicher +verfügt. + + +## openrouteservice ausführen + +Wenn du die oben genannten Schritte befolgt hast, sollte openrouteservice nun korrekt mit Tomcat 10 und Java 17 +eingerichtet sein. +Die folgenden Schritte sind immer notwendig, wenn du die Konfiguration, die Ordnerstruktur oder die Graphen änderst: + +```shell +# Setze die Besitzrechte für Tomcat erneut +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chown -R tomcat:tomcat /opt/openrouteservice +> sudo chmod -R 754 /opt/tomcat/bin/setenv.sh +> sudo chmod -R 754 /opt/openrouteservice +# Starte den Tomcat-10-Dienst neu +> sudo systemctl restart openrouteservice.service +# Überprüfe den Status des Tomcat-10-Dienstes +> sudo systemctl status openrouteservice.service +``` + +Nachdem openrouteservice nun korrekt mit den richtigen Konfigurationen eingerichtet ist, +überprüfe die Logdateien im Verzeichnis `/opt/openrouteservice/logs/ors.log` oder die Tomcat-Logdateien im Verzeichnis +`/opt/tomcat/logs`. +Navigiere zu [http://localhost:8080/ors/v2/health](http://localhost:8080/ors/v2/health) in deinem Browser, um den +Status von openrouteservice zu überprüfen, oder sende eine Anfrage an die API. + +```shell +> curl http://localhost:8080/ors/v2/health +``` + +Die Ausgabe sollte wie folgt aussehen: + +```json +{ + "status": "ready" +} +``` + +## Beispielanfragen + +Teste, ob openrouteservice korrekt funktioniert, indem du eine Anfrage an die API sendest. +Passe den Test entsprechend deiner heruntergeladenen OSM-Datei an. + +```shell +# Teste eine Route von A nach B in Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/directions/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"coordinates":[[1.5036892890930176, 42.4972256361276],[1.6298711299896242, 42.57831077271361]]}' + +# Teste eine Isochrone von einem Punkt in Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/isochrones/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"locations":[[1.5036892890930176, 42.4972256361276]],"range":[300]}' +``` + +## Optional: Pre-Build Graphen updaten + +Falls du nur die vorhandenen Graphen durch neue vorgefertigte ersetzen möchtest, folge diesen Schritten: + +1. Lade die neuen Graphen von der entsprechenden Quelle herunter. + Diese liegen in der Regel in einer `zip-` oder `tar.xz`-Datei vor. +2. Entpacke die neuen Graphen und stelle sicher, dass sie das richtige Format haben. + +```shell +# Im Fall einer tar.xz-Datei +> tar -xvf new_graphs.tar.xz +# Im Fall einer ZIP-Datei kannst du den unzip-Befehl verwenden +> unzip new_graphs.zip +``` + +Die entpackten Graphen haben eine ähnliche Ordnerstruktur wie diese: + +```shell +new_graphs/ +├── driving-car +└── cycling-regular +``` + +3. Leere das alte Graphen-Verzeichnis `/opt/openrouteservice/graphs/`: + +```shell +> mv /opt/openrouteservice/graphs /opt/openrouteservice/graphs_old +> mkdir /opt/openrouteservice/graphs +``` + +4. Verschiebe die neuen Graphen in das Verzeichnis `/opt/openrouteservice/graphs/`. + Die neue Graphen-Ordnerstruktur sollte wie folgt aussehen: + +```shell +/opt/openrouteservice/graphs/ +├── driving-car +└── cycling-regular +``` + +5. Setze die [korrekten Berechtigungen](#setze-die-notwendigen-berechtigungen-fur-den-tomcat-10-benutzer) für das Tomcat-Verzeichnis und starte den + Tomcat-Dienst neu. +6. Führe die [Beispielanfragen](#beispielanfragen) aus, um zu überprüfen, ob die neuen Graphen korrekt funktionieren. + +## Optional: openrouteservice aktualisieren + +Falls du openrouteservice auf eine neue Version aktualisieren möchtest, kannst du die folgenden Schritte ausführen: + +1. Stoppe den Tomcat-Dienst. + +```shell +> sudo systemctl stop openrouteservice.service +``` + +2. Lade die neue [WAR-Datei](#das-openrouteservice-war-file-herunterladen) für die gewünschte Version herunter. +3. Leere das alte Webapps-Verzeichnis `/opt/tomcat/webapps/` und verschiebe die neue `WAR-Datei` in dieses Verzeichnis. +4. Passe die [openrouteservice-Konfiguration](#openrouteservice-konfigurieren) in der Datei `setenv.sh` an. +5. [Setze die korrekten Berechtigungen](#setze-die-notwendigen-berechtigungen-fur-den-tomcat-10-benutzer) für das Tomcat-Verzeichnis und starte den + Tomcat-Dienst neu. +6. Führe die [Beispielanfragen](#beispielanfragen) aus, um zu überprüfen, ob die neue Version korrekt funktioniert. diff --git a/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md new file mode 100644 index 0000000000..f5cd7e37ac --- /dev/null +++ b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -0,0 +1,395 @@ +# Setup ORS v8 and v9 with Tomcat 10 on Ubuntu 22.04 + +This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8 and v9. + +::: info +To the [german version](de_tomcat-10-ubuntu_22_04) of this tutorial. +::: + +## Prerequisites + +- Ubuntu 22.04 with Systemd enabled (Systemd should be enabled by default) +- Tomcat 10 +- Java 17+ + +## Assumptions + +- We assume that your system is running only one Tomcat 10 instance. +- If you plan to run multiple Tomcat services, you are an advanced user and should adapt the instructions accordingly. + +## Prepare the Tomcat 10 environment + +The following steps will guide you through the process of preparing the Tomcat 10 environment. + +### Install Java 17 + +Openrouteservice requires Java 17 or higher to run since Version 8. +The reason is the introduction of Tomcat 10. +You can also use a higher version of Java if available. + +```shell +# Update the package index +> sudo apt-get update +# Install Java 17 or higher, curl and nano +> sudo apt-get install openjdk-17-jre-headless curl nano +``` + +- `openjdk-17-jre-headless` is the Java 17 runtime environment as a headless package. We don't need a graphical user + interface for openrouteservice. +- `curl` is a command-line utility for downloading files from the web and will be used to download certain resources. +- `nano` is a simple text editor that will be used to edit certain files. + +List your available Java versions. + +```shell +# List available options and copy the path to the Java 17 installation +sudo update-alternatives --list java +``` + +The output should look like similar to this: + +```shell +[...] +/usr/lib/jvm/java-17-openjdk-amd64/ +[...] +``` + +Update the default Java version to use Java 17 or the version you installed. + +```shell +# Set the default Java version to Java 17 +> sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java +``` + +::: info +**Note:** The path to the Java 17 installation may vary depending on your system. \ +**Note:** From now on we will refer to the path to the Java 17 installation as `JAVA_HOME`. +::: + +### Create a new user for Tomcat 10 + +The Tomcat 10 runtime should be run as a separate user for security reasons. +This user should not have any login permissions and should not be able to execute commands. +We will call this user `tomcat`. + +```shell +# Create a new user for Tomcat 10 +> useradd -r -m -U -d /opt/tomcat -s /bin/false tomcat +``` + +- `-r` creates a system user +- `-m` creates a home directory (`/opt/tomcat`) for the user and applies the necessary permissions +- `-U` creates a group with the same name as the user + +### Download and setup Tomcat 10 + +```shell +# Set the Tomcat version +> export TOMCAT_VERSION=10.1.33 +# Download the Tomcat 10 tarball +> curl -L https://dlcdn.apache.org/tomcat/tomcat-10/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz > apache-tomcat-$TOMCAT_VERSION.tar.gz +# Extract the downloaded file +> tar -xf apache-tomcat-$TOMCAT_VERSION.tar.gz +# Copy the contents of the extracted directory to the /opt/tomcat directory +> cp -R apache-tomcat-$TOMCAT_VERSION/** /opt/tomcat +# Clean up the extracted directory +> rm -r apache-tomcat-$TOMCAT_VERSION apache-tomcat-$TOMCAT_VERSION.tar.gz +``` + +### Set the necessary permissions for the Tomcat 10 user + +The following commands will set the necessary permissions for the `tomcat` user. +They have to be executed as the root user and should always be executed when changes were made to the Tomcat directory. + +```shell +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chmod -R 754 /opt/tomcat +``` + +- `chown -R tomcat:tomcat /opt/tomcat` sets the owner and group of the `/opt/tomcat` directory to the `tomcat` user. +- `chmod -R 754 /opt/tomcat` sets the permissions for the `/opt/tomcat` directory. + - `7` grants read, write, and execute permissions to the owner. + - `5` grants read and execute permissions to the group. + - `4` grants read permissions to others. + +### Create a systemd service for Tomcat 10 + +We now create a systemd service for Tomcat 10 to manage the Tomcat 10 instance. +This will allow your Systemd to start and stop Tomcat 10 as a service automatically. +Paste the content into the file and save it. + +```shell +> sudo nano /etc/systemd/system/openrouteservice.service +``` + +```ini +[Unit] +Description=Tomcat - openrouteservice +After=syslog.target network.target + +[Service] +Type=forking + +User=tomcat +Group=tomcat +RestartSec=10 +Restart=always + +Environment="JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/" +Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom" +Environment="CATALINA_OPTS=-server -XX:+UseParallelGC" + +Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid +Environment=CATALINA_HOME=/opt/tomcat +Environment=CATALINA_BASE=/opt/tomcat + +ExecStart=/opt/tomcat/bin/startup.sh +ExecStop=/opt/tomcat/bin/shutdown.sh + +[Install] +WantedBy=multi-user.target +``` + +### Test the new Tomcat 10 setup + +```shell +# Reload the systemd daemon +> sudo systemctl daemon-reload +# Start the Tomcat 10 service +> sudo systemctl enable --now openrouteservice.service +# Check the status of the Tomcat 10 service +> sudo systemctl status openrouteservice.service +``` + +Now navigate to [http://localhost:8080](http://localhost:8080) in your browser to see the Tomcat 10 welcome page. + +## Prepare the openrouteservice environment + +Since we have set up Tomcat 10, we can now set up openrouteservice with Java 17. + +### Download the openrouteservice WAR-File + +To set up openrouteservice v8 or v9 with Tomcat 10, you first need the respective war-File. +Head over to the [openrouteservice releases page](https://github.com/GIScience/openrouteservice/releases) and download +the latest release WAR-File. + +```shell +# Download the latest openrouteservice WAR-File e.g. for v8.2.0. For V9, just use e.g. v9.0.0 +> curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war +# Move the WAR-File to the Tomcat webapps directory +> mv ors.war /opt/tomcat/webapps/ +# Restart the Tomcat 10 service +> sudo systemctl restart openrouteservice.service +# Check the status of the Tomcat 10 service +> sudo systemctl status openrouteservice.service +``` + +If you navigate to `http://localhost:8080/ors/v2/health` you should see the health status of the openrouteservice. +The output will be as follows: + +```json +{ + "status": "not ready" +} +``` + +::: info +ORS is now set up correctly with Tomcat 10, but it still needs to be configured. Therefore, it is showing `not ready`. \ +If you want to see an exact log output, you can check the tomcat log files in the `/opt/tomcat/logs` directory. +::: + +### Create the openrouteservice folder structure + +In order for openrouteservice to work correctly, you need to set up the folder structure, download a test osm file and +set up the configuration. + +```shell +mkdir -p "/opt/openrouteservice/graphs" +mkdir -p "/opt/openrouteservice/logs" +mkdir -p "/opt/openrouteservice/data" +mkdir -p "/opt/openrouteservice/elevation_cache" +``` + +::: info +The folder structure is a suggestion and can be adapted to your needs. \ +Make sure to adjust the configuration accordingly as well as the permissions. +::: + +### Download a test osm file + +A good source for latest osm-files is the [Geofabrik download server](https://download.geofabrik.de/). +We will download a small test osm file for Andorra. + +```shell +# Download a test osm file to the /opt/openrouteservice/data directory +> curl -L https://download.geofabrik.de/europe/andorra-latest.osm.pbf > /opt/openrouteservice/data/andorra-latest.osm.pbf +``` + +### Configure openrouteservice + +Configure Tomcat and openrouteservice is best done by setting the configuration in the `setenv.sh` file in the `bin` +directory of Tomcat. + +```shell +# Create the `setenv.sh` file in the `bin` directory of Tomcat. +> sudo nano /opt/tomcat/bin/setenv.sh +``` + +Paste the following contents into the file and save it. +Make sure to adjust the `-Xmx` value to a value that fits your system and graph. +If you want to build another OSM-File, you can adjust the `source_file` value. + +Between version 8 and 9, the configuration properties have changed. +Make sure to reference the correct properties. + +If you want to learn more about the new configuration options in versions 8 & 9, check +the [configuration documentation](/run-instance/configuration/index.md). + +**Example `setenv.sh` file for openrouteservice v8** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.elevation=false \ +-Dors.engine.graphs_root_path=/opt/openrouteservice/graphs \ +-Dors.engine.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +**Example `setenv.sh` file for openrouteservice v9** + +```shell +export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" +export JAVA_OPTS="$JAVA_OPTS \ +-Dors.engine.profiles.driving-car.enabled=true \ +-Dors.engine.graphs_data_access=MMAP \ +-Dors.engine.profile_default.enabled=false \ +-Dors.engine.profile_default.graph_path=/opt/openrouteservice/graphs \ +-Dors.engine.profile_default.build.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ +-Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ +-Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache +" +``` + +Set `ors.engine.graphs_data_access` to `RAM_STORE` if you want to use the RAM store instead of the MMAP store. +Make sure you set up `-Xmx` to a value that fits your system and graph and that your system provides enough memory. + +## Run openrouteservice + +If you followed the above steps, openrouteservice should now be correctly set up with Tomcat 10 and Java 17. +The following steps are mandatory whenever you change the configuration, folder structure or graphs: + +```shell +# Reinstate ownerships for tomcat +> sudo chown -R tomcat:tomcat /opt/tomcat +> sudo chown -R tomcat:tomcat /opt/openrouteservice +> sudo chmod -R 754 /opt/tomcat/bin/setenv.sh +> sudo chmod -R 754 /opt/openrouteservice +# Restart the Tomcat 10 service +> sudo systemctl restart openrouteservice.service +# Check the status of the Tomcat 10 service +> sudo systemctl status openrouteservice.service +``` + +Now that openrouteservice is set up with correct configurations, check the log files in the +`/opt/openrouteservice/logs/ors.log` or the Tomcat log files in the `/opt/tomcat/logs` directory. + +Navigate to [http://localhost:8080/ors/v2/health](http://localhost:8080/ors/v2/health) in your browser to see the health status of the openrouteservice or +make a request to the API. + +```shell +> curl http://localhost:8080/ors/v2/health +``` + +The output should look like this: + +```json + +{ + "status": "ready" +} +``` + +## Example requests + +Let's test if openrouteservice is working correctly by making a request to the API. +Please adapt the test according to your downloaded osm file. + +```shell +# Request a route from A to B withing Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/directions/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"coordinates":[[1.5036892890930176, 42.4972256361276],[1.6298711299896242, 42.57831077271361]]}' + +# Request an Isochrone from a point in Andorra +> curl -X POST \ + 'http://localhost:8080/ors/v2/isochrones/driving-car' \ + -H 'Content-Type: application/json; charset=utf-8' \ + -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \ + -d '{"locations":[[1.5036892890930176, 42.4972256361276]],"range":[300]}' +``` + +## Optional: Pre-Built Graph Update + +In case you want to only update the existing graphs with new pre-built ones, you can follow these steps: + +1. Download the new graphs from the respective source. They will most like come in a zip or tar.xz file. +2. Unpack the new graphs and make sure they are in the correct format. + +```shell +# In case of a tar.xz file +> tar -xvf new_graphs.tar.xz +# In case of a zip file you can use the unzip command +> unzip new_graphs.zip +``` + +The unpacked graphs will have a folder structure similar to this: + +```shell +new_graphs/ +├── driving-car +└── cycling-regular +``` + +3. Empty the old graphs directory `/opt/openrouteservice/graphs/`: + +```shell +> mv /opt/openrouteservice/graphs /opt/openrouteservice/graphs_old +> mkdir /opt/openrouteservice/graphs +``` + +4. Move the new graphs to the `/opt/openrouteservice/graphs/` directory. The new graphs folder structure should look + similar to this: + +```shell +/opt/openrouteservice/graphs/ +├── driving-car +└── cycling-regular +``` + +5. [Apply the correct permissions](#set-the-necessary-permissions-for-the-tomcat-10-user) to the Tomcat directory + and restart the Tomcat service. +6. Try the [example requests](#example-requests) to see if the new graphs are working correctly. + +## Optional: Update openrouteservice to a new version + +In case you want to update openrouteservice to a new version, you can follow these steps: + +1. Stop the Tomcat service. + +```shell +> sudo systemctl stop openrouteservice.service +``` + +2. Empty the old webapps directory `/opt/tomcat/webapps/` and move the new war-File to the directory. +3. Download the new [war-File](#download-the-openrouteservice-war-file) for the new version. +4. Adapt the [openrouteservice configuration](#configure-openrouteservice) in the `setenv.sh` file. +5. [Apply the correct permissions](#set-the-necessary-permissions-for-the-tomcat-10-user) to the Tomcat directory + and restart the Tomcat service. +6. Try the [example requests](#example-requests) to see if the new version is working correctly. diff --git a/docs/versions/v8.2.0/run-instance/example-setups/index.md b/docs/versions/v8.2.0/run-instance/example-setups/index.md new file mode 100644 index 0000000000..6ab7f2642e --- /dev/null +++ b/docs/versions/v8.2.0/run-instance/example-setups/index.md @@ -0,0 +1,23 @@ +# Openrouteservice native setup examples + +We already provide instructions on how to set up and use openroutservice. +However, the following examples are more specific to certain environments and are targeted at users who are +looking for a more complete setup guide. +The scope is broader from setting up dependencies to deploying the service. + +If you are an advanced user, have a look at the existing setup instructions: + +- [Running openrouteservice with Docker](/run-instance/running-with-docker.md) +- [Running openrouteservice as JAR](/run-instance/running-jar.md) +- [Running openrouteservice as WAR](/run-instance/running-war.md) + +::: tip +The examples are growing over time and only provide a small subset of possible setups. \ +If you are missing specific detailed setup instruction, **you are welcome to contribute** by creating a pull request. +::: + +The following examples are (currently) available: + +| Setup | Description | Difficulty | Link | +|--------------------------|--------------------------------------------------------------------|------------|--------------------------------------------------------------------------------| +| Tomcat 10 - Ubuntu 22.04 | Setup openrouteservice with Tomcat 10 and Java 17 on Ubuntu 22.04. | Medium | [English](en_tomcat-10-ubuntu_22_04)
[German](de_tomcat-10-ubuntu_22_04) | From 9df6c6de7b7c46b299f7bf4a570fb9c1d73d7c62 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 11:45:09 +0100 Subject: [PATCH 11/17] fix: remove mention of v9 in v8 --- .../de_tomcat-10-ubuntu_22_04.md | 30 ++++--------------- .../en_tomcat-10-ubuntu_22_04.md | 30 ++++--------------- 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md index 7d8fe578f8..fd6fda2d68 100644 --- a/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md +++ b/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ -# Einrichtung von ORS v8 und v9 mit Tomcat 10 auf Ubuntu 22.04 +# Einrichtung von ORS v8 mit Tomcat 10 auf Ubuntu 22.04 -Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v8 bzw. v9 einrichtest. +Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v8 v9 einrichtest. ::: info Zur [englischen Version](en_tomcat-10-ubuntu_22_04) dieses Tutorials. @@ -24,7 +24,7 @@ Die folgenden Schritte helfen dir, die Umgebung für Tomcat 10 vorzubereiten. ### Java 17 installieren -Openrouteservice benötigt Java 17 oder höher, um ab Version 8 zu laufen. +Openrouteservice v8 benötigt Java 17 oder höher. Der Grund dafür ist die Einführung von Tomcat 10. Du kannst auch eine neuere Version von Java verwenden, falls verfügbar. @@ -174,12 +174,12 @@ Da Tomcat 10 nun eingerichtet ist, können wir auch openrouteservice mit Java 17 ### Das openrouteservice WAR-File herunterladen -Um openrouteservice v8 oder v9 mit Tomcat 10 einzurichten, benötigst du zunächst das entsprechende WAR-File. Besuche +Um openrouteservice v8 mit Tomcat 10 einzurichten, benötigst du zunächst das entsprechende WAR-File. Besuche die [openrouteservice Releases-Seite](https://github.com/GIScience/openrouteservice/releases) und lade die neueste Version des WAR-Files herunter. ```shell -# Lade das neueste openrouteservice WAR-File herunter, z. B. für v8.2.0. Für v9 nutze einfach z. B. v9.0.0 +# Lade das neueste openrouteservice WAR-File herunter für v8.2.0. > curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war # Verschiebe das WAR-File in das Tomcat-Webapps-Verzeichnis > mv ors.war /opt/tomcat/webapps/ @@ -248,10 +248,7 @@ Füge die folgenden Inhalte in die Datei ein und speichere sie. Stelle sicher, dass du den Wert von `-Xmx` an dein System und die Größe der verwendeten `OSM-Datei` anpasst. Wenn du eine andere `OSM-Datei` erstellen möchtest, kannst du den Wert von source_file anpassen. -Zwischen den Versionen 8 und 9 haben sich die Konfigurationseigenschaften geändert. Achte darauf, die richtigen -Eigenschaften zu verwenden. - -Wenn du mehr über die neuen Konfigurationsoptionen in den Versionen 8 & 9 erfahren möchtest, lies +Wenn du mehr über die neuen Konfigurationsoptionen in Version 8 erfahren möchtest, lies die [Konfigurationsdokumentation](/run-instance/configuration/index.md). **Beispiel `setenv.sh`-Datei für openrouteservice v8** @@ -269,21 +266,6 @@ export JAVA_OPTS="$JAVA_OPTS \ " ``` -**Beispiel `setenv.sh`-Datei für openrouteservice v9** - -```shell -export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" -export JAVA_OPTS="$JAVA_OPTS \ --Dors.engine.profiles.driving-car.enabled=true \ --Dors.engine.graphs_data_access=MMAP \ --Dors.engine.profile_default.enabled=false \ --Dors.engine.profile_default.graph_path=/opt/openrouteservice/graphs \ --Dors.engine.profile_default.build.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ --Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ --Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache -" -``` - Setze `ors.engine.graphs_data_access` auf `RAM_STORE`, wenn du den RAM-Store anstelle des MMAP-Stores verwenden möchtest. Achte darauf, dass `-Xmx` an dein System und deinen Graphen angepasst ist und dein System über genügend Speicher diff --git a/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index f5cd7e37ac..bdcab7b106 100644 --- a/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ -# Setup ORS v8 and v9 with Tomcat 10 on Ubuntu 22.04 +# Setup ORS v8 with Tomcat 10 on Ubuntu 22.04 -This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8 and v9. +This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8. ::: info To the [german version](de_tomcat-10-ubuntu_22_04) of this tutorial. @@ -23,7 +23,7 @@ The following steps will guide you through the process of preparing the Tomcat 1 ### Install Java 17 -Openrouteservice requires Java 17 or higher to run since Version 8. +Openrouteservice v8 requires Java 17 or higher to run. The reason is the introduction of Tomcat 10. You can also use a higher version of Java if available. @@ -169,12 +169,12 @@ Since we have set up Tomcat 10, we can now set up openrouteservice with Java 17. ### Download the openrouteservice WAR-File -To set up openrouteservice v8 or v9 with Tomcat 10, you first need the respective war-File. +To set up openrouteservice v8 with Tomcat 10, you first need the respective war-File. Head over to the [openrouteservice releases page](https://github.com/GIScience/openrouteservice/releases) and download the latest release WAR-File. ```shell -# Download the latest openrouteservice WAR-File e.g. for v8.2.0. For V9, just use e.g. v9.0.0 +# Download the latest openrouteservice WAR-File for v8.2.0. > curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war # Move the WAR-File to the Tomcat webapps directory > mv ors.war /opt/tomcat/webapps/ @@ -239,10 +239,7 @@ Paste the following contents into the file and save it. Make sure to adjust the `-Xmx` value to a value that fits your system and graph. If you want to build another OSM-File, you can adjust the `source_file` value. -Between version 8 and 9, the configuration properties have changed. -Make sure to reference the correct properties. - -If you want to learn more about the new configuration options in versions 8 & 9, check +If you want to learn more about the new configuration options in versions 8, check the [configuration documentation](/run-instance/configuration/index.md). **Example `setenv.sh` file for openrouteservice v8** @@ -260,21 +257,6 @@ export JAVA_OPTS="$JAVA_OPTS \ " ``` -**Example `setenv.sh` file for openrouteservice v9** - -```shell -export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" -export JAVA_OPTS="$JAVA_OPTS \ --Dors.engine.profiles.driving-car.enabled=true \ --Dors.engine.graphs_data_access=MMAP \ --Dors.engine.profile_default.enabled=false \ --Dors.engine.profile_default.graph_path=/opt/openrouteservice/graphs \ --Dors.engine.profile_default.build.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ --Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ --Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache -" -``` - Set `ors.engine.graphs_data_access` to `RAM_STORE` if you want to use the RAM store instead of the MMAP store. Make sure you set up `-Xmx` to a value that fits your system and graph and that your system provides enough memory. From 80aa17f92864fc2d08c50cf84435d536f0a8a475 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 11:50:32 +0100 Subject: [PATCH 12/17] fix: remove mention of v8 in v9 --- .../de_tomcat-10-ubuntu_22_04.md | 32 ++++--------------- .../en_tomcat-10-ubuntu_22_04.md | 32 ++++--------------- 2 files changed, 14 insertions(+), 50 deletions(-) diff --git a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md index 7d8fe578f8..d7e4810658 100644 --- a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ -# Einrichtung von ORS v8 und v9 mit Tomcat 10 auf Ubuntu 22.04 +# Einrichtung von ORS v9 mit Tomcat 10 auf Ubuntu 22.04 -Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v8 bzw. v9 einrichtest. +Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v9 einrichtest. ::: info Zur [englischen Version](en_tomcat-10-ubuntu_22_04) dieses Tutorials. @@ -24,7 +24,7 @@ Die folgenden Schritte helfen dir, die Umgebung für Tomcat 10 vorzubereiten. ### Java 17 installieren -Openrouteservice benötigt Java 17 oder höher, um ab Version 8 zu laufen. +Openrouteservice v9 benötigt Java 17 oder höher. Der Grund dafür ist die Einführung von Tomcat 10. Du kannst auch eine neuere Version von Java verwenden, falls verfügbar. @@ -174,13 +174,13 @@ Da Tomcat 10 nun eingerichtet ist, können wir auch openrouteservice mit Java 17 ### Das openrouteservice WAR-File herunterladen -Um openrouteservice v8 oder v9 mit Tomcat 10 einzurichten, benötigst du zunächst das entsprechende WAR-File. Besuche +Um openrouteservice v9 mit Tomcat 10 einzurichten, benötigst du zunächst das entsprechende WAR-File. Besuche die [openrouteservice Releases-Seite](https://github.com/GIScience/openrouteservice/releases) und lade die neueste Version des WAR-Files herunter. ```shell -# Lade das neueste openrouteservice WAR-File herunter, z. B. für v8.2.0. Für v9 nutze einfach z. B. v9.0.0 -> curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war +# Lade das neueste openrouteservice WAR-File herunter, z. B. für v9.0.0 +> curl -L https://github.com/GIScience/openrouteservice/releases/download/v9.0.0/ors.war > ors.war # Verschiebe das WAR-File in das Tomcat-Webapps-Verzeichnis > mv ors.war /opt/tomcat/webapps/ # Starte den Tomcat-10-Dienst neu @@ -248,27 +248,9 @@ Füge die folgenden Inhalte in die Datei ein und speichere sie. Stelle sicher, dass du den Wert von `-Xmx` an dein System und die Größe der verwendeten `OSM-Datei` anpasst. Wenn du eine andere `OSM-Datei` erstellen möchtest, kannst du den Wert von source_file anpassen. -Zwischen den Versionen 8 und 9 haben sich die Konfigurationseigenschaften geändert. Achte darauf, die richtigen -Eigenschaften zu verwenden. - -Wenn du mehr über die neuen Konfigurationsoptionen in den Versionen 8 & 9 erfahren möchtest, lies +Wenn du mehr über die neuen Konfigurationsoptionen in Version 9 erfahren möchtest, lies die [Konfigurationsdokumentation](/run-instance/configuration/index.md). -**Beispiel `setenv.sh`-Datei für openrouteservice v8** - -```shell -export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" -export JAVA_OPTS="$JAVA_OPTS \ --Dors.engine.profiles.car.enabled=true \ --Dors.engine.graphs_data_access=MMAP \ --Dors.engine.profile_default.elevation=false \ --Dors.engine.graphs_root_path=/opt/openrouteservice/graphs \ --Dors.engine.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ --Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ --Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache -" -``` - **Beispiel `setenv.sh`-Datei für openrouteservice v9** ```shell diff --git a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index f5cd7e37ac..eeee4cab8d 100644 --- a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ -# Setup ORS v8 and v9 with Tomcat 10 on Ubuntu 22.04 +# Setup ORS v9 with Tomcat 10 on Ubuntu 22.04 -This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8 and v9. +This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v9. ::: info To the [german version](de_tomcat-10-ubuntu_22_04) of this tutorial. @@ -23,7 +23,7 @@ The following steps will guide you through the process of preparing the Tomcat 1 ### Install Java 17 -Openrouteservice requires Java 17 or higher to run since Version 8. +Openrouteservice v9 requires Java 17 or higher to run. The reason is the introduction of Tomcat 10. You can also use a higher version of Java if available. @@ -169,13 +169,13 @@ Since we have set up Tomcat 10, we can now set up openrouteservice with Java 17. ### Download the openrouteservice WAR-File -To set up openrouteservice v8 or v9 with Tomcat 10, you first need the respective war-File. +To set up openrouteservice v9 with Tomcat 10, you first need the respective war-File. Head over to the [openrouteservice releases page](https://github.com/GIScience/openrouteservice/releases) and download the latest release WAR-File. ```shell -# Download the latest openrouteservice WAR-File e.g. for v8.2.0. For V9, just use e.g. v9.0.0 -> curl -L https://github.com/GIScience/openrouteservice/releases/download/v8.2.0/ors.war > ors.war +# Download the latest openrouteservice WAR-File, e.g. for v9.0.0 +> curl -L https://github.com/GIScience/openrouteservice/releases/download/v9.0.0/ors.war > ors.war # Move the WAR-File to the Tomcat webapps directory > mv ors.war /opt/tomcat/webapps/ # Restart the Tomcat 10 service @@ -239,27 +239,9 @@ Paste the following contents into the file and save it. Make sure to adjust the `-Xmx` value to a value that fits your system and graph. If you want to build another OSM-File, you can adjust the `source_file` value. -Between version 8 and 9, the configuration properties have changed. -Make sure to reference the correct properties. - -If you want to learn more about the new configuration options in versions 8 & 9, check +If you want to learn more about the new configuration options in version 9, check the [configuration documentation](/run-instance/configuration/index.md). -**Example `setenv.sh` file for openrouteservice v8** - -```shell -export CATALINA_OPTS="$CATALINA_OPTS -server -XX:+UseParallelGC -Xmx15g" -export JAVA_OPTS="$JAVA_OPTS \ --Dors.engine.profiles.car.enabled=true \ --Dors.engine.graphs_data_access=MMAP \ --Dors.engine.profile_default.elevation=false \ --Dors.engine.graphs_root_path=/opt/openrouteservice/graphs \ --Dors.engine.source_file=/opt/openrouteservice/data/andorra-latest.osm.pbf \ --Dlogging.file.name=/opt/openrouteservice/logs/ors.log \ --Dors.engine.elevation.cache_path=/opt/openrouteservice/elevation_cache -" -``` - **Example `setenv.sh` file for openrouteservice v9** ```shell From 8c2096a283c0594d499c441140b94a974c6ec0c0 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 13:23:39 +0100 Subject: [PATCH 13/17] Update docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jochen Häußler --- docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index eeee4cab8d..472de6a7fe 100644 --- a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ # Setup ORS v9 with Tomcat 10 on Ubuntu 22.04 -This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v9. +This guide will guide you how to set up openrouteservice v9 with Java 17 and Tomcat 10. ::: info To the [german version](de_tomcat-10-ubuntu_22_04) of this tutorial. From 3118f5a3db9b8e8cf2b95578e019664087a5bf0a Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 13:23:48 +0100 Subject: [PATCH 14/17] Update docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jochen Häußler --- docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md index d7e4810658..1023c7d03e 100644 --- a/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ # Einrichtung von ORS v9 mit Tomcat 10 auf Ubuntu 22.04 -Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v9 einrichtest. +Dieses Tutorial zeigt dir, wie du openrouteservice v9 mit Java 17 und Tomcat 10 einrichtest. ::: info Zur [englischen Version](en_tomcat-10-ubuntu_22_04) dieses Tutorials. From 03d3236e40a5208d82a6e6248b30b43658ea5dc8 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 13:24:01 +0100 Subject: [PATCH 15/17] Update docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jochen Häußler --- .../run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md b/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md index fd6fda2d68..294727c0b3 100644 --- a/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md +++ b/docs/versions/v8.2.0/run-instance/example-setups/de_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ # Einrichtung von ORS v8 mit Tomcat 10 auf Ubuntu 22.04 -Dieses Tutorial zeigt dir, wie du openrouteservice mit Java 17, Tomcat 10 und ORS v8 v9 einrichtest. +Dieses Tutorial zeigt dir, wie du openrouteservice v8 mit Java 17 und Tomcat 10 einrichtest. ::: info Zur [englischen Version](en_tomcat-10-ubuntu_22_04) dieses Tutorials. From b464f8769131c731b66e5cf745ee7805f64ed652 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 13:24:10 +0100 Subject: [PATCH 16/17] Update docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jochen Häußler --- .../run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index bdcab7b106..dd11a1c33a 100644 --- a/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -1,6 +1,6 @@ # Setup ORS v8 with Tomcat 10 on Ubuntu 22.04 -This guide will guide you how to set up openrouteservice with Java 17, Tomcat 10 and ORS v8. +This guide will guide you how to set up openrouteservice v8 with Java 17 and Tomcat 10. ::: info To the [german version](de_tomcat-10-ubuntu_22_04) of this tutorial. From a07cd99a84a449e65a4fef4966e80bdcea0d0b58 Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Wed, 11 Dec 2024 13:27:33 +0100 Subject: [PATCH 17/17] fix: capitalize WAR --- .../example-setups/en_tomcat-10-ubuntu_22_04.md | 6 +++--- .../example-setups/en_tomcat-10-ubuntu_22_04.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index 472de6a7fe..26038da6dd 100644 --- a/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -169,7 +169,7 @@ Since we have set up Tomcat 10, we can now set up openrouteservice with Java 17. ### Download the openrouteservice WAR-File -To set up openrouteservice v9 with Tomcat 10, you first need the respective war-File. +To set up openrouteservice v9 with Tomcat 10, you first need the respective WAR-File. Head over to the [openrouteservice releases page](https://github.com/GIScience/openrouteservice/releases) and download the latest release WAR-File. @@ -369,8 +369,8 @@ In case you want to update openrouteservice to a new version, you can follow the > sudo systemctl stop openrouteservice.service ``` -2. Empty the old webapps directory `/opt/tomcat/webapps/` and move the new war-File to the directory. -3. Download the new [war-File](#download-the-openrouteservice-war-file) for the new version. +2. Empty the old webapps directory `/opt/tomcat/webapps/` and move the new WAR-File to the directory. +3. Download the new [WAR-File](#download-the-openrouteservice-war-file) for the new version. 4. Adapt the [openrouteservice configuration](#configure-openrouteservice) in the `setenv.sh` file. 5. [Apply the correct permissions](#set-the-necessary-permissions-for-the-tomcat-10-user) to the Tomcat directory and restart the Tomcat service. diff --git a/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md index dd11a1c33a..a67e013071 100644 --- a/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md +++ b/docs/versions/v8.2.0/run-instance/example-setups/en_tomcat-10-ubuntu_22_04.md @@ -169,7 +169,7 @@ Since we have set up Tomcat 10, we can now set up openrouteservice with Java 17. ### Download the openrouteservice WAR-File -To set up openrouteservice v8 with Tomcat 10, you first need the respective war-File. +To set up openrouteservice v8 with Tomcat 10, you first need the respective WAR-File. Head over to the [openrouteservice releases page](https://github.com/GIScience/openrouteservice/releases) and download the latest release WAR-File. @@ -369,8 +369,8 @@ In case you want to update openrouteservice to a new version, you can follow the > sudo systemctl stop openrouteservice.service ``` -2. Empty the old webapps directory `/opt/tomcat/webapps/` and move the new war-File to the directory. -3. Download the new [war-File](#download-the-openrouteservice-war-file) for the new version. +2. Empty the old webapps directory `/opt/tomcat/webapps/` and move the new WAR-File to the directory. +3. Download the new [WAR-File](#download-the-openrouteservice-war-file) for the new version. 4. Adapt the [openrouteservice configuration](#configure-openrouteservice) in the `setenv.sh` file. 5. [Apply the correct permissions](#set-the-necessary-permissions-for-the-tomcat-10-user) to the Tomcat directory and restart the Tomcat service.