mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
rename
This commit is contained in:
@@ -24,20 +24,18 @@ def prepare_shared(c):
|
||||
set_cpu_governor(c)
|
||||
|
||||
|
||||
def prepare_tile_creator(c):
|
||||
def prepare_tile_gen(c):
|
||||
install_planetiler(c)
|
||||
|
||||
for file in [
|
||||
'prepare-virtualenv.sh',
|
||||
'run_planet.sh',
|
||||
'run_monaco.sh',
|
||||
'gen_monaco.sh',
|
||||
]:
|
||||
put(
|
||||
c,
|
||||
scripts / 'tile_creator' / 'prepare-virtualenv.sh',
|
||||
TILE_GEN_BIN,
|
||||
permissions='755',
|
||||
owner='ofm',
|
||||
)
|
||||
|
||||
put(
|
||||
c,
|
||||
scripts / 'tile_creator' / 'run_planet.sh',
|
||||
scripts / 'tile_gen' / file,
|
||||
TILE_GEN_BIN,
|
||||
permissions='755',
|
||||
owner='ofm',
|
||||
@@ -55,16 +53,16 @@ def prepare_http_host(c):
|
||||
@click.argument('hostname')
|
||||
@click.option('--port', type=int, help='SSH port (if not in .ssh/config)')
|
||||
@click.option('--user', help='SSH user (if not in .ssh/config)')
|
||||
@click.option('--tile-creator', is_flag=True, help='Install tile-creator task')
|
||||
@click.option('--tile-gen', is_flag=True, help='Install tile-gen task')
|
||||
@click.option('--http-host', is_flag=True, help='Install http-host task')
|
||||
def main(hostname, user, port, tile_creator, http_host):
|
||||
def main(hostname, user, port, tile_gen, http_host):
|
||||
if not click.confirm(f'Run script on {hostname}?'):
|
||||
return
|
||||
|
||||
if not tile_creator and not http_host:
|
||||
tile_creator = click.confirm('Would you like to install tile-creator task?')
|
||||
if not tile_gen and not http_host:
|
||||
tile_gen = click.confirm('Would you like to install tile-gen task?')
|
||||
http_host = click.confirm('Would you like to install http-host task?')
|
||||
if not tile_creator and not http_host:
|
||||
if not tile_gen and not http_host:
|
||||
return
|
||||
|
||||
ssh_passwd = dotenv_values('.env').get('SSH_PASSWD')
|
||||
@@ -86,8 +84,8 @@ def main(hostname, user, port, tile_creator, http_host):
|
||||
|
||||
# prepare_shared(c)
|
||||
|
||||
if tile_creator:
|
||||
prepare_tile_creator(c)
|
||||
if tile_gen:
|
||||
prepare_tile_gen(c)
|
||||
|
||||
if http_host:
|
||||
prepare_http_host(c)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
DATE=$(date +"%Y%m%d_%H%M%S")
|
||||
|
||||
RUN_FOLDER="/data/tile_creator/runs/monaco_$DATE"
|
||||
RUN_FOLDER="/data/ofm/runs/monaco_$DATE"
|
||||
|
||||
mkdir -p "$RUN_FOLDER"
|
||||
cd "$RUN_FOLDER" || exit
|
||||
|
||||
bash /data/tile_creator/bin/run_monaco.sh "$DATE"
|
||||
bash /data/tile_gen/run_monaco.sh "$DATE"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# setting it to too much means there is too much memory used
|
||||
|
||||
java -Xmx1g \
|
||||
-jar /data/ofm/tile_creator/bin/planetiler.jar \
|
||||
-jar /data/ofm/tile_gen/planetiler.jar \
|
||||
`# Download the latest planet.osm.pbf from s3://osm-pds bucket` \
|
||||
--area=monaco --download \
|
||||
`# Accelerate the download by fetching the 10 1GB chunks at a time in parallel` \
|
||||
@@ -5,7 +5,7 @@
|
||||
# setting it to too much means there is too much memory used
|
||||
|
||||
java -Xmx30g \
|
||||
-jar /data/ofm/tile_creator/bin/planetiler.jar \
|
||||
-jar /data/ofm/tile_gen/planetiler.jar \
|
||||
`# Download the latest planet.osm.pbf from s3://osm-pds bucket` \
|
||||
--area=planet --bounds=planet --download \
|
||||
`# Accelerate the download by fetching the 10 1GB chunks at a time in parallel` \
|
||||
@@ -3,7 +3,7 @@ from ssh_lib.utils import apt_get_install, apt_get_update
|
||||
|
||||
PLANETILER_VERSION = '0.7.0'
|
||||
|
||||
TILE_GEN_BIN = '/data/ofm/tile_gen/bin'
|
||||
TILE_GEN_BIN = '/data/ofm/tile_gen'
|
||||
PLANETILER_PATH = f'{TILE_GEN_BIN}/planetiler.jar'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user