move to scripts

This commit is contained in:
Zsolt Ero
2024-08-29 01:27:08 +02:00
parent 4d20bba7d1
commit 2fc91aa470
3 changed files with 9 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ from ssh_lib.tasks import (
setup_ledns_writer,
setup_loadbalancer,
upload_http_host_config,
upload_http_host_files,
)
from ssh_lib.utils import (
put,
@@ -129,6 +130,9 @@ def loadbalancer(hostname, user, port):
def debug(hostname, user, port):
c = get_connection(hostname, user, port)
upload_http_host_files(c)
run_http_host_sync(c)
# upload_http_host_config(c)
# upload_http_host_files(c)
# sudo_cmd(c, f'{VENV_BIN}/python -u /data/ofm/http_host/bin/host_manager.py nginx-sync')
@@ -141,7 +145,7 @@ def debug(hostname, user, port):
# '/data/ofm/loadbalancer/loadbalancer_lib',
# )
prepare_tile_gen(c)
# prepare_tile_gen(c)
if __name__ == '__main__':

View File

@@ -140,7 +140,10 @@ def upload_http_host_files(c):
c.sudo(f'mkdir -p {HTTP_HOST_BIN}')
put_dir(c, SCRIPTS_DIR / 'http_host', HTTP_HOST_BIN, file_permissions='755')
put_dir(c, SCRIPTS_DIR / 'http_host' / 'http_host_lib', f'{HTTP_HOST_BIN}/http_host_lib')
for dirname in ['http_host_lib', 'scripts']:
put_dir(c, SCRIPTS_DIR / 'http_host' / dirname, f'{HTTP_HOST_BIN}/{dirname}')
put_dir(
c,
SCRIPTS_DIR / 'http_host' / 'http_host_lib' / 'nginx',