Ejemplo n.º 1
0
def start(server="server", browser='yes', debug=False):
    """ starts in dir webgui the program server.py and displays a browser on the given port and link"""

    # pprint (fabric.state.output)

    """
        'aborts': True,
        'debug': False,
        'running': True,
        'status': True,
        'stderr': True,
        'stdout': True,
        'user': True,
        'warnings': True
        }
    """
    # banner(debug)

    banner("KILL THE SERVER", debug=debug)
    kill(debug=debug)
    if not debug:
        PROGRESS.next()

    execute_command("INSTALL CLOUDMESH",
                    "python setup.py install",
                    debug=debug)

    mongo.start()
    # execute_command("START MONGO",
    # "fab mongo.start",
    #            debug)

    queue.start()
    # execute_command("START RABITMQ",
    #        "fab queue.start", debug)

    queue.flower_server()
    # execute_command("START FLOWER",
    #        "fab queue.flower_server",
    #        debug)
    fabric.state.output.stdout = True
    fabric.state.output.stderr = True
    execute_command("START WEB SERVER",
                    "cd cloudmesh_web; python {0}.py &".format(server),
                    True)
    # view(link)
    PROGRESS.finish()
Ejemplo n.º 2
0
def start(server="server", browser='yes', debug=False):
    """ starts in dir webgui the program server.py and displays a browser on the given port and link"""

    # pprint (fabric.state.output)
    """
        'aborts': True,
        'debug': False,
        'running': True,
        'status': True,
        'stderr': True,
        'stdout': True,
        'user': True,
        'warnings': True
        }
    """
    # banner(debug)

    banner("KILL THE SERVER", debug=debug)
    kill(debug=debug)
    if not debug:
        PROGRESS.next()

    execute_command("INSTALL CLOUDMESH",
                    "python setup.py install",
                    debug=debug)

    mongo.start()
    # execute_command("START MONGO",
    #            "fab mongo.start",
    #            debug)

    queue.start()
    # execute_command("START RABITMQ",
    #        "fab queue.start", debug)

    queue.flower_server()
    # execute_command("START FLOWER",
    #        "fab queue.flower_server",
    #        debug)
    fabric.state.output.stdout = True
    fabric.state.output.stderr = True
    execute_command("START WEB SERVER",
                    "cd cloudmesh_web; python {0}.py &".format(server), True)
    # view(link)
    PROGRESS.finish()
Ejemplo n.º 3
0
    if host is None:
        hosts = _pbs.hosts
    else:
        hosts = [host]

    if kind is None:
        types = ['qstat', 'nodes']
    else:
        types = [kind]

    d = []

    for host in hosts:
        for kind in types:
            if kind in ["qstat", "queue", "q"]:
                d = _pbs.get_pbsnodes(host)
            elif kind in ["nodes"]:
                d = _pbs.refresh_pbsnodes(host)

    for e in d:
        print "PBS -->"
        pprint(e)

# Temporary cure for missing a shell prompt
if (PROGRESS):
    try:
        PROGRESS.finish()
    except:
        pass