def main(): host = '0.0.0.0' port = 8899 config.parse_args(sys.argv) logging.setup(cfg.CONF, "report") logging.set_defaults(default_log_levels=logging.DEBUG) application = app.setup_app() srv = simple_server.make_server(host, port, application) LOG.debug("Report API is serving on http://%s:%d (PID=%d)" % (host, port, os.getpid())) srv.serve_forever()
def main(): config.parse_args(sys.argv) logging.setup(cfg.CONF, 'report') """ logging.setup(CONF, 'nova') utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) """ server = service.Service.create(binary='report-data', topic=CONF.data_topic) service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(cfg.CONF, 'report') """ logging.setup(CONF, 'nova') utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) """ server = service.Service.create(binary='rpt', topic='rpt') service.serve(server) service.wait()
def main(): config.parse_args(sys.argv) logging.setup(cfg.CONF, "report") """ config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() objects.register_all() gmr.TextGuruMeditation.setup_autorun(version) """ """ cfg_file = "/opt/stack/report/api-paste.ini" app = deploy.loadapp("config:" + cfg_file, 'report-api') s = make_server('0.0.0.0', 1111, app) s.serve_forever() """ launcher = service.process_launcher() server = service.WSGIService('reportapi', use_ssl=False) launcher.launch_service(server, workers=server.workers or 1) launcher.wait()