Ejemplo n.º 1
0
def main(argv):
    # Usage
    if len(argv) != 2:
        print >> sys.stderr, "Usage: %s <deployment.cfg>" % (argv[0])
        print >> sys.stderr, "       deployment.cfg: a configuration file modeled after deployment.cfg.sample"
        sys.exit(1)

    config = myriadeploy.read_config_file(argv[1])
    rm_deployment(config)
Ejemplo n.º 2
0
def main(argv):
    # Usage
    if len(argv) != 2:
        print >> sys.stderr, "Usage: %s <deployment.cfg>" % (argv[0])
        print >> sys.stderr, "       deployment.cfg: a configuration file modeled after deployment.cfg.sample"
        sys.exit(1)

    config = myriadeploy.read_config_file(argv[1])
    rm_deployment(config)
Ejemplo n.º 3
0
def main(argv):
    "Kill all Myria processes on the nodes in this cluster."
    # Usage
    if len(argv) != 2:
        print >> sys.stderr, "Usage: %s <deployment.cfg>" % (argv[0])
        print >> sys.stderr, "       deployment.cfg: a configuration file modeled after deployment.cfg.sample"
        sys.exit(1)

    config = myriadeploy.read_config_file(argv[1])

    stop_all(config)
Ejemplo n.º 4
0
def main(argv):
    "Kill all Myria processes on the nodes in this cluster."
    # Usage
    if len(argv) != 2:
        print >> sys.stderr, "Usage: %s <deployment.cfg>" % (argv[0])
        print >> sys.stderr, "       deployment.cfg: a configuration file modeled after deployment.cfg.sample"
        sys.exit(1)

    config = myriadeploy.read_config_file(argv[1])

    stop_all(config)
Ejemplo n.º 5
0
def main(argv):
    if len(argv) < 2:
        print >> sys.stderr, "Usage: %s <deployment.cfg> <command>\n By default command is java." % (argv[0])
        sys.exit(1)

    command='java'
    config = myriadeploy.read_config_file(argv[1])

    if len(argv) >2:
        command = argv[2]

    stop_all(config,command)
Ejemplo n.º 6
0
def main(argv):
    # Usage
    if len(argv) != 2:
        print >> sys.stderr, "Usage: %s <deployment.cfg>" % (argv[0])
        print >> sys.stderr, \
            "       deployment.cfg: \
            a configuration file modeled after deployment.cfg.sample"
        sys.exit(1)

    config = myriadeploy.read_config_file(argv[1])

    # Step 1: Copy over libs, "conf", myria
    copy_distribution(config)
Ejemplo n.º 7
0
def main(argv):
    # Usage
    if len(argv) != 2:
        print >> sys.stderr, "Usage: %s <deployment.cfg>" % (argv[0])
        print >> sys.stderr, \
            "       deployment.cfg: \
            a configuration file modeled after deployment.cfg.sample"

        sys.exit(1)

    config = myriadeploy.read_config_file(argv[1])

    # Step 1: Copy over libs, "conf", myria
    copy_distribution(config)
Ejemplo n.º 8
0
def getlog(config_file, from_worker_id=None):
    ''' get configuration'''
    config = myriadeploy.read_config_file(config_file)
    """Copies the master and worker catalogs to the remote hosts."""
    description = config['description']
    default_path = config['path']
    master = config['master']
    workers = config['workers']
    username = config['username']

    # get logs from master
    if from_worker_id is None or from_worker_id == 0:
        (hostname, _,
         path) = myriadeploy.get_host_port_path(master, default_path)
        if get_logs_from_master(hostname, "%s/%s-files" % (path, description),
                                username, description):
            raise Exception("Error on getting logs from master %s" %
                            (hostname, ))
        if get_error_logs_from_master(hostname,
                                      "%s/%s-files" % (path, description),
                                      username, description):
            raise Exception("Error on getting error logs from master %s" %
                            (hostname, ))

    for worker in workers:
        worker_id = worker[-1]
        # get logs from workers
        if from_worker_id is None or from_worker_id == worker_id:
            (hostname, _,
             path) = myriadeploy.get_host_port_path(worker, default_path)
            if get_std_logs_from_worker(hostname,
                                        "%s/%s-files" % (path, description),
                                        username, worker_id, description):
                raise Exception("Error on getting logs from worker %d %s" %
                                (worker_id, hostname))
            if get_error_logs_from_worker(hostname,
                                          "%s/%s-files" % (path, description),
                                          username, worker_id, description):
                raise Exception(
                    "Error on getting error logs from worker %d %s" %
                    (worker_id, hostname))
Ejemplo n.º 9
0
def getlog(config_file, from_worker_id=None):
    ''' get configuration'''
    config = myriadeploy.read_config_file(config_file)

    """Copies the master and worker catalogs to the remote hosts."""
    description = config['description']
    default_path = config['path']
    master = config['master']
    workers = config['workers']
    username = config['username']

    # get logs from master
    if from_worker_id is None or from_worker_id == 0:
        (hostname, _, path) = myriadeploy.get_host_port_path(master, default_path)
        if get_logs_from_master(hostname, "%s/%s-files"
           % (path, description), username, description):
            raise Exception("Error on getting logs from master %s"
                            % (hostname,))
        if get_error_logs_from_master(hostname, "%s/%s-files"
           % (path, description), username, description):
            raise Exception("Error on getting error logs from master %s"
                            % (hostname,))

    for worker in workers:
        worker_id = worker[-1]
        # get logs from workers
        if from_worker_id is None or from_worker_id == worker_id:
            (hostname, _, path) = myriadeploy.get_host_port_path(worker, default_path)
            if get_std_logs_from_worker(hostname, "%s/%s-files"
               % (path, description), username, worker_id, description):
                raise Exception("Error on getting logs from worker %d %s"
                                % (worker_id, hostname))
            if get_error_logs_from_worker(hostname, "%s/%s-files"
               % (path, description), username, worker_id, description):
                raise Exception("Error on getting error logs from worker %d %s"
                                % (worker_id, hostname))