def main(): try: logging.register_options(cfg.CONF) cfg.CONF(project='senlin', prog='senlin-api', version=version.version_info.version_string()) config.set_config_defaults() logging.setup(cfg.CONF, 'senlin-api') objects.register_all() messaging.setup() app = wsgi.load_paste_app() host = cfg.CONF.senlin_api.bind_host port = cfg.CONF.senlin_api.bind_port LOG.info('Starting Senlin API on %(host)s:%(port)s', { 'host': host, 'port': port }) profiler.setup('senlin-api', host) server = wsgi.Server('senlin-api', cfg.CONF.senlin_api) server.start(app, default_port=port) systemd.notify_once() server.wait() except RuntimeError as ex: sys.exit("ERROR: %s" % six.text_type(ex))
def init_app(): config.parse_args(sys.argv, 'senlin-api') logging.setup(cfg.CONF, 'senlin-api') objects.register_all() messaging.setup() profiler.setup('senlin-api', cfg.CONF.host) return wsgi.load_paste_app()
def init_app(): logging.register_options(cfg.CONF) cfg.CONF(project='senlin', prog='senlin-api', version=version.version_info.version_string()) logging.setup(cfg.CONF, 'senlin-api') config.set_config_defaults() messaging.setup() profiler.setup('senlin-api', cfg.CONF.host) return wsgi.load_paste_app()
def main(): config.parse_args(sys.argv, 'senlin-engine') logging.setup(CONF, 'senlin-engine') logging.set_defaults() gmr.TextGuruMeditation.setup_autorun(version) objects.register_all() messaging.setup() from senlin.engine import service as engine profiler.setup('senlin-engine', CONF.host) srv = engine.EngineService(CONF.host, consts.ENGINE_TOPIC) launcher = service.launch(CONF, srv, workers=CONF.engine.workers, restart_method='mutate') launcher.wait()
def main(): config.parse_args(sys.argv, 'senlin-health-manager') logging.setup(CONF, 'senlin-health-manager') logging.set_defaults() gmr.TextGuruMeditation.setup_autorun(version) objects.register_all() messaging.setup() from senlin.health_manager import service as health_manager profiler.setup('senlin-health-manager', CONF.host) srv = health_manager.HealthManagerService(CONF.host, consts.HEALTH_MANAGER_TOPIC) launcher = service.launch(CONF, srv, workers=CONF.health_manager.workers, restart_method='mutate') launcher.wait()
def main(): logging.register_options(cfg.CONF) cfg.CONF(project='senlin', prog='senlin-engine') logging.setup(cfg.CONF, 'senlin-engine') logging.set_defaults() gmr.TextGuruMeditation.setup_autorun(version) objects.register_all() messaging.setup() from senlin.engine import service as engine profiler.setup('senlin-engine', cfg.CONF.host) srv = engine.EngineService(cfg.CONF.host, consts.ENGINE_TOPIC) launcher = service.launch(cfg.CONF, srv, workers=cfg.CONF.engine.workers, restart_method='mutate') launcher.wait()
def main(): logging.register_options(cfg.CONF) cfg.CONF(project='senlin', prog='senlin-engine') logging.setup(cfg.CONF, 'senlin-engine') logging.set_defaults() objects.register_all() messaging.setup() from senlin.engine import service as engine profiler.setup('senlin-engine', cfg.CONF.host) srv = engine.EngineService(cfg.CONF.host, consts.ENGINE_TOPIC) launcher = service.launch(cfg.CONF, srv, workers=cfg.CONF.num_engine_workers, restart_method='mutate') # the following periodic tasks are intended serve as HA checking # srv.create_periodic_tasks() launcher.wait()
def main(): logging.register_options(cfg.CONF) cfg.CONF(project='senlin', prog='senlin-health-manager') logging.setup(cfg.CONF, 'senlin-health-manager') logging.set_defaults() gmr.TextGuruMeditation.setup_autorun(version) objects.register_all() messaging.setup() from senlin.health_manager import service as health_manager profiler.setup('senlin-health-manager', cfg.CONF.host) srv = health_manager.HealthManagerService(cfg.CONF.host, consts.HEALTH_MANAGER_TOPIC) launcher = service.launch(cfg.CONF, srv, workers=cfg.CONF.health_manager.workers, restart_method='mutate') launcher.wait()
def main(): config.parse_args(sys.argv, 'senlin-conductor') logging.setup(CONF, 'senlin-conductor') logging.set_defaults() gmr.TextGuruMeditation.setup_autorun(version) objects.register_all() messaging.setup() from senlin.conductor import service as conductor profiler.setup('senlin-conductor', CONF.host) srv = conductor.ConductorService(CONF.host, consts.CONDUCTOR_TOPIC) launcher = service.launch(CONF, srv, workers=CONF.conductor.workers, restart_method='mutate') # the following periodic tasks are intended serve as HA checking # srv.create_periodic_tasks() launcher.wait()
def main(): config.parse_args(sys.argv, 'senlin-api') logging.setup(CONF, 'senlin-api') gmr.TextGuruMeditation.setup_autorun(version) objects.register_all() messaging.setup() app = wsgi.load_paste_app() host = CONF.senlin_api.bind_host port = CONF.senlin_api.bind_port LOG.info('Starting Senlin API on %(host)s:%(port)s', { 'host': host, 'port': port }) profiler.setup('senlin-api', host) server = wsgi.Server('senlin-api', CONF.senlin_api) server.start(app, default_port=port) systemd.notify_once() server.wait()