Esempio n. 1
0
def kill():
    print "Going nuclear on EC2"
    ec2.terminate_machines(
        [i for i in ec2.get_all_instances() if 'hold' not in i.tags])
    ec2.cancel_spot_requests(ec2.get_all_spot_requests())
    exit(0)
Esempio n. 2
0
def kill():
    print "Going nuclear on EC2"
    ec2.terminate_machines([i for i in ec2.get_all_instances() if 'hold' not in i.tags])
    ec2.cancel_spot_requests(ec2.get_all_spot_requests())
    exit(0)
Esempio n. 3
0
            p.wait()

        # kill servers
        for p in serverprocs:
            p.kill()

        # get results
        print "Gathering results."
        for h in running:
            ec2.scp_from(h.public_dns_name, remote_resdir,
                         os.path.join(resdir, os.pardir))

        if ngroups > 1:
            aggregate_dir(resdir, x['name'])

        print "Done experiment. Results are stored at", resdir

    if expdir and 'plot' in x:
        make_gnuplot(x['name'], expdir, x['plot'])

# cleanup
if not keeproles:
    for r in running:
        r.add_tag('role', 'none')

if not keepalive:
    if terminate:
        ec2.terminate_machines(running)
    else:
        ec2.shutdown_machines(running)
Esempio n. 4
0
        for p in clientprocs:
            p.wait()
        
        # kill servers
        for p in serverprocs:
            p.kill()
        
        # get results
        print "Gathering results."
        for h in running:
            ec2.scp_from(h.public_dns_name, remote_resdir, os.path.join(resdir, os.pardir))
        
        if ngroups > 1:
            aggregate_dir(resdir, x['name'])
    
        print "Done experiment. Results are stored at", resdir
    
    if expdir and 'plot' in x:
        make_gnuplot(x['name'], expdir, x['plot'])
        
# cleanup
if not keeproles:
    for r in running:
        r.add_tag('role', 'none')

if not keepalive:
    if terminate:
        ec2.terminate_machines(running)
    else:
        ec2.shutdown_machines(running)