Esempio n. 1
0
def run_demo(home):
    """Run the demo tracker instance from its ``home`` directory"""
    print "Demo Tracker Home:", home

    cfg = configuration.CoreConfig(home)
    url = cfg["TRACKER_WEB"]
    hostname, port = urlparse.urlparse(url)[1].split(":")
    port = int(port)
    success_message = """Server running - connect to:
    %(url)s
1. Log in as "demo"/"demo" or "admin"/"admin".
2. Hit Control-C to stop the server.
3. Re-start the server by running "%(script)s" again.
4. Reset the tracker by running "%(script)s nuke".

By default the demo tracker is set up to be accessed from "localhost".
If you want to run it on a server,
edit "%(datadir)s/config.ini"
and set the "web" option in section "[tracker]" to your host name,
then restart demo. If you want to change backend types, you must use "nuke".

""" % dict(
        url=url, script=sys.argv[0], datadir=TRACKER_HOME
    )

    # disable command line processing in roundup_server
    sys.argv = sys.argv[:1] + ["-p", str(port), "-n", hostname, "demo=" + home]
    roundup_server.run(success_message=success_message)
Esempio n. 2
0
def run_demo(home):
    """Run the demo tracker instance from its ``home`` directory"""
    print("Demo Tracker Home:", home)

    cfg = configuration.CoreConfig(home)
    url = cfg["TRACKER_WEB"]
    hostname, port = urlparse.urlparse(url)[1].split(':')
    port = int(port)
    success_message = '''Server running - connect to:
    %(url)s
1. Log in as "demo"/"demo" or "admin"/"admin".
2. Hit Control-C to stop the server.
3. Re-start the server by running "%(script)s" again.
4. Reset the tracker by running "%(script)s nuke".

By default the demo tracker is set up to be accessed from "localhost".
If you want to run it on a server,
edit "%(datadir)s/config.ini"
and set the "web" option in section "[tracker]" to your host name,
then restart demo. If you want to change backend types, you must use "nuke".

''' % dict(url=url, script=sys.argv[0], datadir=TRACKER_HOME)

    # disable command line processing in roundup_server
    sys.argv = sys.argv[:1] + ['-p', str(port), '-n', hostname, 'demo=' + home]
    roundup_server.run(success_message=success_message)
Esempio n. 3
0
def run_demo(home):
    """Run the demo tracker installed in ``home``"""
    cfg = configuration.CoreConfig(home)
    url = cfg["TRACKER_WEB"]
    hostname, port = urlparse.urlparse(url)[1].split(':')
    port = int(port)
    success_message = '''Server running - connect to:
    %s
1. Log in as "demo"/"demo" or "admin"/"admin".
2. Hit Control-C to stop the server.
3. Re-start the server by running "roundup-demo" again.
4. Re-initialise the server by running "roundup-demo nuke".

Demo tracker is set up to be accessed by localhost browser.  If you
run demo on a server host, please stop the demo, open file
"demo/config.ini" with your editor, change the host name in the "web"
option in section "[tracker]", save the file, then re-run the demo
program.

''' % url

    # disable command line processing in roundup_server
    sys.argv = sys.argv[:1] + ['-p', str(port), 'demo=' + home]
    roundup_server.run(success_message=success_message)
Esempio n. 4
0
def run_demo(home):
    """Run the demo tracker installed in ``home``"""
    cfg = configuration.CoreConfig(home)
    url = cfg["TRACKER_WEB"]
    hostname, port = urlparse.urlparse(url)[1].split(':')
    port = int(port)
    success_message = '''Server running - connect to:
    %s
1. Log in as "demo"/"demo" or "admin"/"admin".
2. Hit Control-C to stop the server.
3. Re-start the server by running "roundup-demo" again.
4. Re-initialise the server by running "roundup-demo nuke".

Demo tracker is set up to be accessed by localhost browser.  If you
run demo on a server host, please stop the demo, open file
"demo/config.ini" with your editor, change the host name in the "web"
option in section "[tracker]", save the file, then re-run the demo
program.

''' % url

    # disable command line processing in roundup_server
    sys.argv = sys.argv[:1] + ['-p', str(port), 'demo=' + home]
    roundup_server.run(success_message=success_message)