예제 #1
0
파일: run.py 프로젝트: todokku/DEEPaaS
def main():
    _shutdown.handle_signals()

    config.config_and_logging(sys.argv)
    log = oslo_log.getLogger("deepaas")

    if CONF.openwhisk_detect and os.environ.get('__OW_API_HOST', None):
        log.info("Starting DEEPaaS (OpenWhisk) version %s",
                 deepaas.__version__)

        proxy.main()
    else:
        base = "http://{}:{}".format(CONF.listen_ip, CONF.listen_port)
        spec = "{}/swagger.json".format(base)
        docs = "{}/ui".format(base)
        v2 = "{}/v2".format(base)

        print(INTRO)
        print(BANNER.format(docs, spec, v2))

        log.info("Starting DEEPaaS version %s", deepaas.__version__)

        app = api.get_app(doc="/ui")
        web.run_app(
            app,
            host=CONF.listen_ip,
            port=CONF.listen_port,
        )
예제 #2
0
def main():
    _shutdown.handle_signals()
    config.parse_args(sys.argv)
    logging.setup(CONF, "deepaas")
    log = logging.getLogger(__name__)

    log.info("Starting DEEPaaS (OpenWhisk) version %s", deepaas.__version__)

    proxy.main()
예제 #3
0
파일: wsk.py 프로젝트: todokku/DEEPaaS
def main():
    _shutdown.handle_signals()

    config.config_and_logging(sys.argv)
    log = oslo_log.getLogger("deepaas")

    log.info("Starting DEEPaaS (OpenWhisk) version %s", deepaas.__version__)

    proxy.main()
예제 #4
0
def main():
    _shutdown.handle_signals()
    config.parse_args(sys.argv)
    logging.setup(CONF, "deepaas")
    log = logging.getLogger(__name__)

    if CONF.openwhisk_detect and os.environ.get('__OW_API_HOST', None):
        log.info("Starting DEEPaaS (OpenWhisk) version %s",
                 deepaas.__version__)

        proxy.main()
    else:
        log.info("Starting DEEPaaS version %s", deepaas.__version__)

        app = api.get_app()
        app.run(
            host=CONF.listen_ip,
            port=CONF.listen_port,
            debug=CONF.debug,
        )