diff --git a/LCU/Maintenance/DBInterface/django_postgresql/settings.py b/LCU/Maintenance/DBInterface/django_postgresql/settings.py index a1354dc228139cd3b62662651bb429239efc0798..b3a08ab89fafe77ca15d9da1bf58c2a84298b85f 100644 --- a/LCU/Maintenance/DBInterface/django_postgresql/settings.py +++ b/LCU/Maintenance/DBInterface/django_postgresql/settings.py @@ -96,15 +96,15 @@ LOGGING = { }, 'loggers': { 'station_test.parser': { - 'handlers': ['log_file'], + 'handlers': ['console'], 'level': 'DEBUG', }, 'views': { - 'handlers': ['log_file', 'console'], + 'handlers': ['console'], 'level': 'DEBUG', }, 'serializers': { - 'handlers': ['log_file', 'console'], + 'handlers': ['console'], 'level': 'DEBUG', }, diff --git a/LCU/Maintenance/MDB_tools/cli/release_code.py b/LCU/Maintenance/MDB_tools/cli/release_code.py index 63dde6120537d976e3dac55f5363cc7c033b03d3..adbc39c8e0e685e39bdf3f26bfdf3776eccdb5ac 100644 --- a/LCU/Maintenance/MDB_tools/cli/release_code.py +++ b/LCU/Maintenance/MDB_tools/cli/release_code.py @@ -1,6 +1,7 @@ import logging import argparse -import fabric +from fabric.transfer import Transfer +from fabric.connection import Connection import requests import sys import json @@ -22,13 +23,27 @@ def setup_argument_parser(): parser.add_argument('-u', '--user', help='username', default=False) parser.add_argument('--address', help='address of the server. default [localhost]:8000', default='lofarmonitortest.control.lofar') - parser.add_argument('--address', help='address of the server. default [localhost]:8000', - default='lofarmonitortest.control.lofar') - parser.add_argument('remote_install_path', help='remote path where to install the code') + parser.add_argument('--remote_install_path', help='remote path where to install the code', + default='deploy/test') return parser +def installing_files(local_root_path, remote_root_path, address): + """ + Copies the django installation to the remote path + :param local_root_path: path to the local directory containing the files + :param remote_root_path: remote path where to install the files + :return: + """ + with Connection(address) as connection: + transfer = Transfer(connection) + transfer.put(local_root_path, remote_root_path) + + + + + def parse_arguments(parser): return parser.parse_args() @@ -36,4 +51,4 @@ if __name__=='__main__': logging.basicConfig(format="%(asctime)s %(levelname)s: %(message)s",level=logging.DEBUG) parser = setup_argument_parser() args = parse_arguments(parser) - + installing_files(args.path, args.remote_install_path, args.address) \ No newline at end of file