mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
work
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from ssh_lib.config import scripts_dir
|
||||
from ssh_lib.config import SCRIPTS_DIR
|
||||
from ssh_lib.utils import apt_get_install, put
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@ def c1000k(c):
|
||||
def benchmark(c):
|
||||
apt_get_install(c, 'wrk')
|
||||
c.sudo('mkdir -p /data/ofm/benchmark')
|
||||
put(c, f'{scripts_dir}/http_host/benchmark/wrk_custom_list.lua', '/data/ofm/benchmark')
|
||||
put(c, f'{SCRIPTS_DIR}/http_host/benchmark/wrk_custom_list.lua', '/data/ofm/benchmark')
|
||||
|
||||
# wrk -c10 -d10s -t1 -s /data/ofm/benchmark/wrk_custom_list.lua http://localhost
|
||||
|
||||
@@ -2,6 +2,11 @@ from pathlib import Path
|
||||
|
||||
|
||||
base = Path(__file__).parent.parent
|
||||
config_dir = base / 'config'
|
||||
scripts_dir = base / 'scripts'
|
||||
assets_dir = Path(__file__).parent / 'assets'
|
||||
|
||||
CONFIG_DIR = base / 'config'
|
||||
SCRIPTS_DIR = base / 'scripts'
|
||||
ASSETS_DIR = Path(__file__).parent / 'assets'
|
||||
|
||||
|
||||
TILE_GEN_BIN = '/data/ofm/tile_gen/bin'
|
||||
REMOTE_CONFIG = '/data/ofm/config'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from ssh_lib.config import assets_dir
|
||||
from ssh_lib.config import ASSETS_DIR
|
||||
from ssh_lib.utils import apt_get_install, apt_get_purge, put, put_str
|
||||
|
||||
|
||||
def setup_kernel_settings(c):
|
||||
put(c, f'{assets_dir}/kernel/60-ofm.conf', '/etc/sysctl.d/')
|
||||
put(c, f'{assets_dir}/kernel/limits-ofm.conf', '/etc/security/limits.d/')
|
||||
put(c, f'{ASSETS_DIR}/kernel/60-ofm.conf', '/etc/sysctl.d/')
|
||||
put(c, f'{ASSETS_DIR}/kernel/limits-ofm.conf', '/etc/security/limits.d/')
|
||||
|
||||
|
||||
def set_cpu_governor(c):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from ssh_lib.config import assets_dir
|
||||
from ssh_lib.config import ASSETS_DIR
|
||||
from ssh_lib.utils import (
|
||||
apt_get_install,
|
||||
apt_get_purge,
|
||||
@@ -46,9 +46,9 @@ def nginx(c):
|
||||
hide=True,
|
||||
)
|
||||
|
||||
put(c, f'{assets_dir}/nginx/nginx.conf', '/etc/nginx/')
|
||||
put(c, f'{assets_dir}/nginx/default_disable.conf', '/data/nginx/sites')
|
||||
put(c, f'{assets_dir}/nginx/cloudflare.conf', '/data/nginx/config')
|
||||
put(c, f'{ASSETS_DIR}/nginx/nginx.conf', '/etc/nginx/')
|
||||
put(c, f'{ASSETS_DIR}/nginx/default_disable.conf', '/data/nginx/sites')
|
||||
put(c, f'{ASSETS_DIR}/nginx/cloudflare.conf', '/data/nginx/config')
|
||||
|
||||
c.sudo('service nginx restart')
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
from ssh_lib.config import TILE_GEN_BIN
|
||||
from ssh_lib.utils import apt_get_install, apt_get_update
|
||||
|
||||
|
||||
PLANETILER_VERSION = '0.7.0'
|
||||
|
||||
TILE_GEN_BIN = '/data/ofm/tile_gen/bin'
|
||||
PLANETILER_PATH = f'{TILE_GEN_BIN}/planetiler.jar'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user