planetiler

This commit is contained in:
Zsolt Ero
2023-12-03 00:41:13 +01:00
parent 28f6d4f73a
commit 6484d7f7ad
5 changed files with 102 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
from openfreemaps.config import templates
from openfreemaps.utils import apt_get_install, apt_get_update, put
PLANETILER_VERSION = '0.7.0'
PLANETILER_DIR = '/data/planetiler/bin'
PLANETILER_PATH = f'{PLANETILER_DIR}/planetiler.jar'
def install_planetiler(c):
apt_get_update(c)
apt_get_install(c, 'openjdk-17-jdk')
c.run('mkdir -p /data/planetiler/bin')
c.run(
f'wget -q https://github.com/onthegomap/planetiler/releases/download/v{PLANETILER_VERSION}/planetiler.jar '
f'-O {PLANETILER_PATH}',
)
c.run(f'java -jar {PLANETILER_PATH} --help')
put(c, templates / 'planetiler' / 'run_planet.sh', PLANETILER_DIR, permissions='755')