Esempio n. 1
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    log.setup("sahara")

    LOG.info(_LI('Starting Sahara %s'), service_name)

    # Validate other configurations (that may produce logs) here
    cinder.validate_config()

    messaging.setup()

    if service_name != 'all-in-one':
        LOG.warn(
            _LW("Distributed mode is in the alpha state, it's recommended to "
                "use all-in-one mode by running 'sahara-all' binary."))

    plugins_base.setup_plugins()
Esempio n. 2
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    common_config.set_config_defaults()
    log.setup(CONF, "sahara")

    # Validate other configurations (that may produce logs) here
    cinder.validate_config()
    keystone.validate_config()
    validate_castellan_config()

    messaging.setup(service_name)

    plugins_base.setup_plugins()

    ds_manager.setup_data_sources()
    jb_manager.setup_job_binaries()

    LOG.info('Sahara {service} started'.format(service=service_name))
Esempio n. 3
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    common_config.set_config_defaults()
    log.setup(CONF, "sahara")

    # Validate other configurations (that may produce logs) here
    cinder.validate_config()
    keystone.validate_config()
    validate_castellan_config()

    messaging.setup(service_name)

    plugins_base.setup_plugins()

    ds_manager.setup_data_sources()
    jb_manager.setup_job_binaries()

    LOG.info('Sahara {service} started'.format(service=service_name))
Esempio n. 4
0
File: main.py Progetto: a9261/sahara
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    log.setup("sahara")

    LOG.info(_LI('Starting Sahara %s'), service_name)

    # Validate other configurations (that may produce logs) here
    cinder.validate_config()

    messaging.setup()

    if service_name != 'all-in-one':
        LOG.warn(
            _LW("Distributed mode is in the alpha state, it's recommended to "
                "use all-in-one mode by running 'sahara-all' binary."))

    plugins_base.setup_plugins()
Esempio n. 5
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir, 'etc', 'sahara', 'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    log.setup("sahara")

    LOG.info('Starting Sahara %s' % service_name)

    plugins_base.setup_plugins()
Esempio n. 6
0
def main():
    dev_conf = os.path.join(possible_topdir, "etc", "sahara", "sahara.conf")
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(sys.argv[1:], config_files)
    logging.setup("sahara")

    app = server.make_app()

    wsgi.server(
        eventlet.listen((cfg.CONF.host, cfg.CONF.port), backlog=500), app, log=logging.WritableLogger(LOG), debug=False
    )
Esempio n. 7
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    log.setup("sahara")

    LOG.info('Starting Sahara %s' % service_name)

    plugins_base.setup_plugins()
Esempio n. 8
0
def main():
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(sys.argv[1:], config_files)
    logging.setup("sahara")

    app = server.make_app()

    wsgi.server(eventlet.listen((cfg.CONF.host, cfg.CONF.port), backlog=500),
                app, log=logging.WritableLogger(LOG), debug=False)
Esempio n. 9
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir, 'etc', 'sahara', 'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    log.setup(CONF, "sahara")

    # Validate other configurations (that may produce logs) here
    cinder.validate_config()

    if service_name != 'all-in-one' or cfg.CONF.enable_notifications:
        messaging.setup()

    plugins_base.setup_plugins()

    LOG.info(_LI('Sahara {service} started').format(service=service_name))
Esempio n. 10
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir, "etc", "sahara", "sahara.conf")
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    log.setup(CONF, "sahara")

    # Validate other configurations (that may produce logs) here
    cinder.validate_config()

    if service_name != "all-in-one" or cfg.CONF.enable_notifications:
        messaging.setup()

    plugins_base.setup_plugins()

    LOG.info(_LI("Sahara {service} started").format(service=service_name))
Esempio n. 11
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    log.setup("sahara")

    LOG.info('Starting Sahara %s' % service_name)

    if service_name != 'all-in-one':
        LOG.warn("Distributed mode is in the alpha state, it's recommended to "
                 "use all-in-one mode by running 'sahara-all' binary.")

    plugins_base.setup_plugins()
Esempio n. 12
0
def setup_common(possible_topdir, service_name):
    dev_conf = os.path.join(possible_topdir,
                            'etc',
                            'sahara',
                            'sahara.conf')
    config_files = None
    if os.path.exists(dev_conf):
        config_files = [dev_conf]

    config.parse_configs(config_files)
    common_config.set_config_defaults()
    log.setup(CONF, "sahara")

    # Validate other configurations (that may produce logs) here
    cinder.validate_config()
    castellan.validate_config()

    if (service_name != 'all-in-one' or
            CONF.oslo_messaging_notifications.enable):
        messaging.setup()

    plugins_base.setup_plugins()

    LOG.info(_LI('Sahara {service} started').format(service=service_name))