-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import ansible playbook for the server
- Loading branch information
1 parent
51053dc
commit bfc8dd6
Showing
5 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
motis: | ||
hosts: | ||
spline-vm-motis: | ||
ansible_user: root | ||
ansible_host: 130.133.110.196 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
- name: Set up MOTIS servers | ||
hosts: motis | ||
roles: | ||
- motis | ||
tasks: | ||
- name: Install rsync | ||
apt: | ||
name: | ||
- rsync | ||
- htop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
modules=intermodal | ||
#modules=address | ||
#modules=tiles | ||
#modules=osrm | ||
#modules=ppr | ||
#modules=parking | ||
modules=nigiri | ||
|
||
intermodal.router=nigiri | ||
server.static_path=/opt/motis/web | ||
dataset.no_schedule=true | ||
|
||
|
||
[import] | ||
#paths=osm:europe-latest.osm.pbf | ||
paths=osm:aachen.osm.pbf | ||
paths=schedule-de-berlin:vbb.fixed.zip | ||
paths=schedule-lv-pv:pv.zip | ||
paths=schedule-lv-rigas-satiksme:improved-gtfs-satiksme.zip | ||
paths=schedule-lv-rigas-saraksti:improved-gtfs-saraksti.zip | ||
paths=schedule-lt:lt.zip | ||
paths=schedule-lt-all:lt-all.zip | ||
|
||
[osrm] | ||
profiles=/opt/motis/osrm-profiles/car.lua | ||
profiles=/opt/motis/osrm-profiles/bike.lua | ||
|
||
[ppr] | ||
profile=/opt/motis/ppr-profiles/default.json | ||
|
||
[tiles] | ||
profile=/opt/motis/tiles-profiles/background.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
[Unit] | ||
Description=MOTIS public transport router | ||
After=network-online.target | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/opt/motis/motis -c /var/lib/motis/config.ini | ||
Restart=always | ||
User=motis | ||
WorkingDirectory=/var/lib/motis | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# SPDX-FileCopyrightText: 2024 Jonah Brüchert <[email protected]> | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
- name: Create MOTIS user | ||
user: | ||
name: motis | ||
|
||
- name: Unpack MOTIS | ||
unarchive: | ||
src: https://github.com/motis-project/motis/releases/download/v0.11.14/motis-linux-amd64.tar.bz2 | ||
dest: /opt/ | ||
remote_src: yes | ||
|
||
- name: Create MOTIS runtime directory | ||
file: | ||
path: /var/lib/motis | ||
owner: motis | ||
group: motis | ||
state: directory | ||
|
||
- name: Copy MOTIS config file | ||
copy: | ||
src: config.ini | ||
dest: /var/lib/motis/config.ini | ||
|
||
- name: Copy MOTIS systemd service | ||
copy: | ||
src: motis.service | ||
dest: /etc/systemd/system/motis.service | ||
|
||
# - name: Download Europe | ||
# get_url: | ||
# url: https://download.geofabrik.de/europe-latest.osm.pbf | ||
# dest: /var/lib/motis/europe-latest.osm.pbf | ||
|
||
- name: Enable motis systemd service | ||
systemd: | ||
name: motis.service | ||
enabled: true | ||
state: started | ||
masked: false | ||
daemon_reload: true |