def main():
    CONF(sys.argv[1:], project='delfin', version=version.version_string())
    connection = CONF.database.connection
    head_tail = os.path.split(connection)
    path = remove_prefix(head_tail[0], 'sqlite:///')
    if not os.path.exists(path):
        os.makedirs(path)
    db.register_db()
Example #2
0
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='delfin', version=version.version_string())
    log.setup(CONF, "delfin")
    utils.monkey_patch()

    launcher = service.process_launcher()
    api_server = service.WSGIService('delfin', coordination=True)
    launcher.launch_service(api_server, workers=api_server.workers or 1)
    launcher.wait()
Example #3
0
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='delfin', version=version.version_string())
    log.setup(CONF, "delfin")
    utils.monkey_patch()

    task_server = service.Service.create(binary='delfin-task',
                                         coordination=True)
    service.serve(task_server)
    service.wait()
Example #4
0
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='delfin',
         version=version.version_string())
    log.setup(CONF, "delfin")
    utils.monkey_patch()

    # Launch alert manager service
    alert_manager = service.AlertService.create(binary='delfin-alert')
    service.serve(alert_manager)
    service.wait()
Example #5
0
def main():
    log.register_options(CONF)
    CONF(sys.argv[1:], project='delfin', version=version.version_string())
    log.setup(CONF, "delfin")
    utils.monkey_patch()

    task_server = service.TaskService.create(binary='delfin-task',
                                             coordination=True)
    leader_election = service.LeaderElectionService.create()
    metrics_task_server = service. \
        TaskService.create(binary='delfin-task',
                           topic=CONF.host,
                           manager='delfin.'
                                   'task_manager.'
                                   'metrics_manager.'
                                   'MetricsTaskManager',
                           coordination=True)

    service.serve(task_server)
    service.serve(leader_election)
    service.serve(metrics_task_server)

    service.wait()
Example #6
0
 def service_version(self, context):
     return version.version_string()
Example #7
0
def main():

    CONF(sys.argv[1:], project='delfin', version=version.version_string())
    db.register_db()