def init_application(): # Initialize the oslo configuration library and logging service.prepare_service(sys.argv) profiler.setup('zun-api', CONF.host) LOG.debug("Configuration:") CONF.log_opt_values(LOG, log.DEBUG) return app.load_app()
def main(): priv_context.init(root_helper=shlex.split(utils.get_root_helper())) zun_service.prepare_service(sys.argv) config.parse_args(sys.argv) # Initialize o.vo registry. os_vif.initialize() service.CNIDaemonServiceManager().run()
def init_application(): # Initialize the oslo configuration library and logging service.prepare_service(sys.argv) profiler.setup('zun-api', CONF.host) LOG.debug("Configuration:") CONF.log_opt_values(LOG, log.DEBUG) return app.load_app()
def main(): zun_service.prepare_service(sys.argv) config.parse_args(sys.argv) LOG.info("start websocket proxy") host = CONF.websocket_proxy.wsproxy_host port = CONF.websocket_proxy.wsproxy_port websocketproxy.ZunWebSocketProxy(listen_host=host, listen_port=port, file_only=True, RequestHandlerClass=websocketproxy. ZunProxyRequestHandler).start_server()
def init_application(): # NOTE(hberaud): Call reset to ensure the ConfigOpts object doesn't # already contain registered options if the app is reloaded. CONF.reset() # Initialize the oslo configuration library and logging service.prepare_service(sys.argv) profiler.setup('zun-api', CONF.host) LOG.debug("Configuration:") CONF.log_opt_values(LOG, log.DEBUG) return app.load_app()
def main(): # Parse config file and command line options, then start logging zun_service.prepare_service(sys.argv) # Enable object backporting via the conductor # TODO(yuanying): Uncomment after rpc services are implemented # base.zunObject.indirection_api = base.zunObjectIndirectionAPI() # Build and start the WSGI app launcher = zun_service.process_launcher() server = zun_service.WSGIService('zun_api', CONF.api.enable_ssl_api) launcher.launch_service(server, workers=server.workers) launcher.wait()
def main(): zun_service.prepare_service(sys.argv) config.parse_args(sys.argv) LOG.info("start websocket proxy") host = CONF.websocket_proxy.wsproxy_host port = CONF.websocket_proxy.wsproxy_port websocketproxy.ZunWebSocketProxy( listen_host=host, listen_port=port, cert=CONF.websocket_proxy.cert, key=CONF.websocket_proxy.key, ssl_only=CONF.websocket_proxy.ssl_only, file_only=True, RequestHandlerClass=websocketproxy.ZunProxyRequestHandler ).start_server()
def main(): zun_service.prepare_service(sys.argv) LOG.info('Starting server in PID %s', os.getpid()) CONF.log_opt_values(LOG, logging.DEBUG) CONF.import_opt('topic', 'zun.conf.compute', group='compute') endpoints = [ compute_manager.Manager(), ] server = rpc_service.Service.create(CONF.compute.topic, CONF.host, endpoints, binary='zun-compute') launcher = service.launch(CONF, server) launcher.wait()
def main(): priv_context.init(root_helper=shlex.split(utils.get_root_helper())) zun_service.prepare_service(sys.argv) LOG.info('Starting server in PID %s', os.getpid()) CONF.log_opt_values(LOG, logging.DEBUG) CONF.import_opt('topic', 'zun.conf.compute', group='compute') from zun.compute import manager as compute_manager endpoints = [ compute_manager.Manager(), ] server = rpc_service.Service.create(CONF.compute.topic, CONF.host, endpoints, binary='zun-compute') launcher = service.launch(CONF, server, restart_method='mutate') launcher.wait()
def main(): # Parse config file and command line options, then start logging zun_service.prepare_service(sys.argv) # Enable object backporting via the conductor # TODO(yuanying): Uncomment after rpc services are implemented # base.zunObject.indirection_api = base.zunObjectIndirectionAPI() # Setup OSprofiler for WSGI service profiler.setup('zun-api', CONF.api.host_ip) # Build and start the WSGI app launcher = zun_service.process_launcher() server = zun_service.WSGIService( 'zun_api', CONF.api.enable_ssl_api ) launcher.launch_service(server, workers=server.workers) launcher.wait()
def main(): priv_context.init(root_helper=shlex.split(utils.get_root_helper())) zun_service.prepare_service(sys.argv) LOG.info('Starting server in PID %s', os.getpid()) CONF.log_opt_values(LOG, logging.DEBUG) CONF.import_opt('topic', 'zun.conf.compute', group='compute') from zun.compute import manager as compute_manager endpoints = [ compute_manager.Manager(), ] server = rpc_service.Service.create(CONF.compute.topic, CONF.host, endpoints, binary='zun-compute') launcher = service.launch(CONF, server, restart_method='mutate') launcher.wait()