def install(self, env): from params import params env.set_params(params) commands = ParserCommands(params) commands.setup_repo() Logger.info('Install RPM packages') self.install_packages(env)
def service_check(self, env): from params import params parsercommands = ParserCommands(params) indexingcommands = IndexingCommands(params) all_found = parsercommands.topologies_running(env) and indexingcommands.is_topology_active(env) if all_found: exit(0) else: exit(1)
def service_check(self, env): from params import params parsercommands = ParserCommands(params) indexingcommands = IndexingCommands(params) all_found = parsercommands.topologies_running( env) and indexingcommands.is_topology_active(env) if all_found: exit(0) else: exit(1)
def configure(self, env, upgrade_type=None, config_dir=None): from params import params env.set_params(params) metron_service.load_global_config(params) commands = ParserCommands(params) if not commands.is_configured(): commands.init_parsers() commands.init_kafka_topics() commands.set_configured()
def service_check(self, env): from params import params # check the parsers Logger.info("Performing Parser service check") parser_cmds = ParserCommands(params) parser_cmds.service_check(env) # check enrichment Logger.info("Performing Enrichment service check") enrichment_cmds = EnrichmentCommands(params) enrichment_cmds.service_check(env) # check indexing Logger.info("Performing Indexing service check") indexing_cmds = IndexingCommands(params) indexing_cmds.service_check(env) # check the profiler Logger.info("Performing Profiler service check") profiler_cmds = ProfilerCommands(params) profiler_cmds.service_check(env) # check the rest api Logger.info("Performing REST application service check") rest_cmds = RestCommands(params) rest_cmds.service_check(env) # check the management UI Logger.info("Performing Management UI service check") mgmt_cmds = ManagementUICommands(params) mgmt_cmds.service_check(env) # check the alerts UI Logger.info("Performing Alerts UI service check") alerts_cmds = AlertsUICommands(params) alerts_cmds.service_check(env) Logger.info("Metron service check completed successfully") exit(0)
def restart(self, env): from params import params env.set_params(params) self.configure(env) commands = ParserCommands(params) commands.restart_parser_topologies(env)
def status(self, env): from params import status_params env.set_params(status_params) commands = ParserCommands(status_params) if not commands.topologies_running(env): raise ComponentIsNotRunning()
def stop(self, env, upgrade_type=None): from params import params env.set_params(params) commands = ParserCommands(params) commands.stop_parser_topologies(env)
def start(self, env, upgrade_type=None): from params import params env.set_params(params) self.configure(env) commands = ParserCommands(params) commands.start_parser_topologies(env)
def configure(self, env, upgrade_type=None, config_dir=None): from params import params env.set_params(params) if not metron_service.is_zk_configured(params): metron_service.init_zk_config(params) metron_service.set_zk_configured(params) metron_service.refresh_configs(params) commands = ParserCommands(params) if not commands.is_configured(): commands.init_parsers() commands.init_kafka_topics() commands.set_configured() if params.security_enabled and not commands.is_acl_configured(): commands.init_kafka_acls() commands.set_acl_configured() Logger.info("Calling security setup") storm_security_setup(params)
def install(self, env): from params import params env.set_params(params) commands = ParserCommands(params) commands.setup_repo() self.install_packages(env)