def start(container, starttype, *args, **kwargs): log.info('EPU Provisioner starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) proc = [{ 'name': 'provisioner', 'module': __name__, 'class': ProvisionerService.__name__, 'spawnargs': { 'query_period': conf.getValue('query_period'), 'store': get_provisioner_store(conf), 'site_drivers': get_site_drivers(conf.getValue('sites')), 'context_client': get_context_client(conf) } }] app_supv_desc = ProcessDesc(name='Provisioner app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs': proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Controller List service starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) controller_list_path = conf.getValue('controller_list_path', None) proc = [ { 'name': 'epu_controller_list', 'module': __name__, 'class': EPUControllerListService.__name__, 'spawnargs': { 'controller_list_path': controller_list_path } }, ] app_supv_desc = ProcessDesc(name='EPU Controller List supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs': proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Work Producer starting, startup type "%s"' % starttype) config_name = __name__ if os.environ.has_key("ION_CONFIGURATION_SECTION"): config_name = os.environ["ION_CONFIGURATION_SECTION"] conf = ioninit.config(config_name) spawnargs = { 'queue_name_work': conf['queue_name_work'], 'listen_port': conf['listen_port'], 'servicename': conf['servicename'] } proc = [{ 'name': 'epu_work_producer', 'module': __name__, 'class': EPUWorkProducer.__name__, 'spawnargs': spawnargs }] app_supv_desc = ProcessDesc(name='EPU Work Producer app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs': proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Work Producer starting, startup type "%s"' % starttype) config_name = __name__ if os.environ.has_key("ION_CONFIGURATION_SECTION"): config_name = os.environ["ION_CONFIGURATION_SECTION"] conf = ioninit.config(config_name) spawnargs = {'queue_name_work' : conf['queue_name_work'], 'listen_port' : conf['listen_port'], 'servicename': conf['servicename']} proc = [{'name': 'epu_work_producer', 'module': __name__, 'class': EPUWorkProducer.__name__, 'spawnargs': spawnargs }] app_supv_desc = ProcessDesc(name='EPU Work Producer app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs':proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): proc = [{'name': 'provisioner', 'module': __name__, 'class': ProvisionerQueryService.__name__, 'spawnargs': {}}] app_supv_desc = ProcessDesc(name='Provisioner Query app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs':proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): proc = [{ 'name': 'provisioner', 'module': __name__, 'class': ProvisionerQueryService.__name__, 'spawnargs': {} }] app_supv_desc = ProcessDesc(name='Provisioner Query app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs': proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, app_definition, *args, **kwargs): anf_services =[{ 'name':'attributestore', 'module':'ion.services.coi.attributestore', 'class':'AttributeStoreService'}, { 'name':'app_controller', 'module': 'anf.app_controller_service', 'class': 'AppControllerService'}] app_sup_desc = ProcessDesc(name="app-supervisor-" + app_definition.name, module=app_supervisor.__name__, spawnargs={'spawn-procs':anf_services}) supid = yield app_sup_desc.spawn() res = (supid.full, [app_sup_desc]) log.info("Started ANF App Controller") defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Controller List service starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) controller_list_path = conf.getValue('controller_list_path', None) proc = [{'name': 'epu_controller_list', 'module': __name__, 'class': EPUControllerListService.__name__, 'spawnargs': { 'controller_list_path': controller_list_path } }, ] app_supv_desc = ProcessDesc(name='EPU Controller List supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs':proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Worker starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) spawnargs = {'queue_name_work' : conf['queue_name_work']} # Required services. proc = [{'name': 'epu_worker', 'module': __name__, 'class': EPUWorkerService.__name__, 'spawnargs': spawnargs }] app_supv_desc = ProcessDesc(name='EPU Worker app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs':proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU DTRS starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) dt_dir = conf.getValue('registry_dir', '/opt/dt-data/dt') # Required services. proc = [{'name': 'dtrs', 'module': __name__, 'class': DeployableTypeRegistryService.__name__, 'spawnargs': {'registry_dir' : dt_dir} }] app_supv_desc = ProcessDesc(name='DTRS app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs':proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Queuestat starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) proc = [ { "name": "queuestat", "module": __name__, "class": QueueStatService.__name__, "spawnargs": {"interval_seconds": conf.getValue("interval_seconds")}, } ] app_supv_desc = ProcessDesc( name="Queuestat app supervisor", module=app_supervisor.__name__, spawnargs={"spawn-procs": proc} ) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Worker starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) spawnargs = {'queue_name_work': conf['queue_name_work']} # Required services. proc = [{ 'name': 'epu_worker', 'module': __name__, 'class': EPUWorkerService.__name__, 'spawnargs': spawnargs }] app_supv_desc = ProcessDesc(name='EPU Worker app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs': proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Provisioner starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) proc = [{'name': 'provisioner', 'module': __name__, 'class': ProvisionerService.__name__, 'spawnargs': { 'query_period' : conf.getValue('query_period'), 'store' : get_provisioner_store(conf), 'site_drivers' : get_site_drivers(conf.getValue('sites')), 'context_client' : get_context_client(conf)}}] app_supv_desc = ProcessDesc(name='Provisioner app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs':proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
def start(container, starttype, *args, **kwargs): log.info('EPU Queuestat starting, startup type "%s"' % starttype) conf = ioninit.config(__name__) proc = [ { 'name': 'queuestat', 'module': __name__, 'class': QueueStatService.__name__, 'spawnargs': { 'interval_seconds': conf.getValue('interval_seconds') } }, ] app_supv_desc = ProcessDesc(name='Queuestat app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs': proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res)
use_cassandra = conf.getValue('cassandra', True) if use_cassandra: try: spawnargs['cassandra'] = cassandra.get_config() except cassandra.CassandraConfigurationError,e: log.error("Problem loading Cassandra config: %s", e) raise # Required services. proc = [{'name': 'epu_controller', 'module': __name__, 'class': EPUControllerService.__name__, 'spawnargs': spawnargs }] app_supv_desc = ProcessDesc(name='EPU Controller app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs':proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res) def stop(container, state): log.info('EPU Controller stopping, state "%s"' % str(state)) supdesc = state[0] # Return the deferred return supdesc.terminate()
try: spawnargs['cassandra'] = cassandra.get_config() except cassandra.CassandraConfigurationError, e: log.error("Problem loading Cassandra config: %s", e) raise # Required services. proc = [{ 'name': 'epu_controller', 'module': __name__, 'class': EPUControllerService.__name__, 'spawnargs': spawnargs }] app_supv_desc = ProcessDesc(name='EPU Controller app supervisor', module=app_supervisor.__name__, spawnargs={'spawn-procs': proc}) supv_id = yield app_supv_desc.spawn() res = (supv_id.full, [app_supv_desc]) defer.returnValue(res) def stop(container, state): log.info('EPU Controller stopping, state "%s"' % str(state)) supdesc = state[0] # Return the deferred return supdesc.terminate()