def main(): # Parse config file and command line options, then start logging cyborg_service.prepare_service(sys.argv) # Build and start the WSGI app launcher = cyborg_service.process_launcher() server = cyborg_service.WSGIService('cyborg_api', CONF.api.enable_ssl_api) launcher.launch_service(server, workers=server.workers) launcher.wait()
def main(): # Parse config file and command line options, then start logging cyborg_service.prepare_service(sys.argv) mgr = cyborg_service.RPCService('cyborg.conductor.manager', 'ConductorManager', constants.CONDUCTOR_TOPIC) launcher = service.launch(CONF, mgr, restart_method='mutate') launcher.wait()
def main(): command_opt = cfg.SubCommandOpt('command', title='Command', help=_('Available commands'), handler=add_command_parsers) CONF.register_cli_opt(command_opt) service.prepare_service(sys.argv) CONF.command.func()
def main(): # Parse config file and command line options, then start logging cyborg_service.prepare_service(sys.argv) priv_context.init(root_helper=shlex.split('sudo')) mgr = cyborg_service.RPCService('cyborg.agent.manager', 'AgentManager', constants.AGENT_TOPIC) launcher = service.launch(CONF, mgr, restart_method='mutate') launcher.wait()
def init_application(): CONF = cfg.CONF i18n.install('cyborg') service.prepare_service(sys.argv) LOG = log.getLogger(__name__) LOG.debug("Configuration:") CONF.log_opt_values(LOG, log.DEBUG) return app.app_factory(CONF)
def init_application(): CONF = cfg.CONF # NOTE(hberaud): Call reset to ensure the ConfigOpts object doesn't # already contain registered options if the app is reloaded. CONF.reset() i18n.install('cyborg') service.prepare_service(sys.argv) LOG = log.getLogger(__name__) LOG.debug("Configuration:") CONF.log_opt_values(LOG, log.DEBUG) return app.load_app()