示例#1
0
文件: worker.py 项目: jamesyli/solum
def main():
    cfg.CONF(sys.argv[1:], project='solum')
    logging.setup('solum')
    solum.TLS.trace = trace_data.TraceData()

    LOG.info(_('Starting server in PID %s') % os.getpid())
    LOG.debug(_("Configuration:"))
    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)

    cfg.CONF.import_opt('topic', 'solum.worker.config', group='worker')
    cfg.CONF.import_opt('host', 'solum.worker.config', group='worker')
    cfg.CONF.import_opt('handler', 'solum.worker.config', group='worker')

    handlers = {
        'noop': noop_handler.Handler,
        'shell': shell_handler.Handler,
    }

    endpoints = [
        handlers[cfg.CONF.worker.handler](),
    ]

    server = service.Service(cfg.CONF.worker.topic,
                             cfg.CONF.worker.host, endpoints)
    server.serve()
示例#2
0
文件: worker.py 项目: paulczar/solum
def main():
    cfg.CONF(sys.argv[1:], project='solum')
    logging.setup('solum')
    solum.TLS.trace = trace_data.TraceData()

    LOG.info(_('Starting server in PID %s') % os.getpid())
    LOG.debug("Configuration:")
    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)

    cfg.CONF.import_opt('topic', 'solum.worker.config', group='worker')
    cfg.CONF.import_opt('host', 'solum.worker.config', group='worker')
    cfg.CONF.import_opt('handler', 'solum.worker.config', group='worker')

    handlers = {
        'noop': noop_handler.Handler,
        'shell': shell_handler.Handler,
        'shell_nobuild': shell_nobuild_handler.Handler,
    }

    endpoints = [
        handlers[cfg.CONF.worker.handler](),
    ]

    server = service.Service(cfg.CONF.worker.topic,
                             cfg.CONF.worker.host, endpoints)
    server.serve()
示例#3
0
def main():
    CONF(sys.argv[1:], project='oslo')
    logging.setup("oslo")

    with contextlib.closing(impl_zmq.ZmqProxy(CONF)) as reactor:
        reactor.consume_in_thread()
        reactor.wait()
示例#4
0
def prepare_service(argv=[]):
    cfg.set_defaults(log.log_opts,
                     default_log_levels=[
                         'amqplib=WARN', 'qpid.messaging=INFO',
                         'sqlalchemy=WARN', 'keystoneclient=INFO',
                         'stevedore=INFO', 'eventlet.wsgi.server=WARN'
                     ])
    cfg.CONF(argv[1:], project='solum')
    log.setup('solum')
    objects.load()
示例#5
0
def prepare_service(argv=[]):
    cfg.set_defaults(log.log_opts,
                     default_log_levels=['amqplib=WARN',
                                         'qpid.messaging=INFO',
                                         'sqlalchemy=WARN',
                                         'keystoneclient=INFO',
                                         'stevedore=INFO',
                                         'eventlet.wsgi.server=WARN'
                                         ])
    cfg.CONF(argv[1:], project='solum')
    log.setup('solum')
    objects.load()
示例#6
0
def main():
    cfg.CONF(sys.argv[1:], project='solum')
    logging.setup('solum')

    LOG.info(_('Starting server in PID %s') % os.getpid())
    LOG.debug("Configuration:")
    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)

    cfg.CONF.import_opt('topic', 'solum.conductor.config', group='conductor')
    cfg.CONF.import_opt('host', 'solum.conductor.config', group='conductor')
    endpoints = [
        default_handler.Handler(),
    ]
    server = service.Service(cfg.CONF.conductor.topic, cfg.CONF.conductor.host,
                             endpoints)
    server.serve()
示例#7
0
def main():
    cfg.CONF(sys.argv[1:], project='solum')
    logging.setup('solum')

    LOG.info(_('Starting server in PID %s') % os.getpid())
    LOG.debug("Configuration:")
    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)

    cfg.CONF.import_opt('topic', 'solum.conductor.config', group='conductor')
    cfg.CONF.import_opt('host', 'solum.conductor.config', group='conductor')
    endpoints = [
        default_handler.Handler(),
    ]
    server = service.Service(cfg.CONF.conductor.topic,
                             cfg.CONF.conductor.host, endpoints)
    server.serve()
示例#8
0
文件: api.py 项目: calfonso/solum
def main():
    config.parse_args(sys.argv)
    logging.setup('solum')

    app = api_app.setup_app()

    # Create the WSGI server and start it
    host, port = cfg.CONF.api.host, cfg.CONF.api.port
    srv = simple_server.make_server(host, port, app)

    LOG.info('Starting server in PID %s' % os.getpid())

    if host == '0.0.0.0':
        LOG.info('serving on 0.0.0.0:%s, view at http://127.0.0.1:%s' %
                 (port, port))
    else:
        LOG.info("serving on http://%s:%s" % (host, port))

    srv.serve_forever()
示例#9
0
def main():
    cfg.CONF(sys.argv[1:], project='solum')
    logging.setup('solum')

    LOG.info(_('Starting server in PID %s') % os.getpid())
    LOG.debug("Configuration:")
    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)

    cfg.CONF.import_opt('topic', 'solum.deployer.config', group='deployer')
    cfg.CONF.import_opt('host', 'solum.deployer.config', group='deployer')
    cfg.CONF.import_opt('handler', 'solum.deployer.config', group='deployer')

    handlers = {
        'noop': noop_handler.Handler,
        'heat': heat_handler.Handler,
    }

    endpoints = [
        handlers[cfg.CONF.deployer.handler](),
    ]

    server = service.Service(cfg.CONF.deployer.topic, cfg.CONF.deployer.host,
                             endpoints)
    server.serve()
示例#10
0
def main():
    cfg.CONF(sys.argv[1:], project='solum')
    logging.setup('solum')

    LOG.info(_('Starting server in PID %s') % os.getpid())
    LOG.debug("Configuration:")
    cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)

    cfg.CONF.import_opt('topic', 'solum.deployer.config', group='deployer')
    cfg.CONF.import_opt('host', 'solum.deployer.config', group='deployer')
    cfg.CONF.import_opt('handler', 'solum.deployer.config', group='deployer')

    handlers = {
        'noop': noop_handler.Handler,
        'heat': heat_handler.Handler,
    }

    endpoints = [
        handlers[cfg.CONF.deployer.handler](),
    ]

    server = service.Service(cfg.CONF.deployer.topic,
                             cfg.CONF.deployer.host, endpoints)
    server.serve()
示例#11
0
def prepare_service(argv=[]):
    cfg.CONF(argv[1:], project='solum')
    logging.setup('solum')
    config.set_config_defaults()
    objects.load()
示例#12
0
文件: api.py 项目: pabelanger/solum
def main():
    config.parse_args(sys.argv)
    logging.setup('solum')

    raise NotImplemented('Solum API not yet implemented.')
示例#13
0
def prepare_service(argv=[]):
    cfg.set_defaults(logging.log_opts, default_log_levels=["sqlalchemy=WARN"])
    cfg.CONF(argv[1:], project="solum")
    logging.setup("solum")
    objects.load()
示例#14
0
def prepare_service(argv=[]):
    cfg.CONF(argv[1:], project='solum')
    logging.setup('solum')
    objects.load()