def status(self, env): from params import status_params env.set_params(status_params) commands = EnrichmentCommands(status_params) if not commands.is_topology_active(env): raise ComponentIsNotRunning()
def install(self, env): from params import params env.set_params(params) commands = EnrichmentCommands(params) commands.setup_repo() self.install_packages(env) self.configure(env)
def start(self, env, upgrade_type=None): from params import params env.set_params(params) commands = EnrichmentCommands(params) if not commands.is_configured(): commands.init_kafka_topics() commands.create_hbase_tables() commands.set_configured() commands.start_enrichment_topology()
def stop(self, env, upgrade_type=None): from params import params env.set_params(params) commands = EnrichmentCommands(params) if params.security_enabled: metron_security.kinit(params.kinit_path_local, params.metron_keytab_path, params.metron_principal_name, execute_user=params.metron_user) commands.stop_enrichment_topology()
def status(self, env): from params import status_params env.set_params(status_params) commands = EnrichmentCommands(status_params) if status_params.security_enabled: metron_security.kinit(status_params.kinit_path_local, status_params.metron_keytab_path, status_params.metron_principal_name, execute_user=status_params.metron_user) if not commands.is_topology_active(env): raise ComponentIsNotRunning()
def stop(self, env, upgrade_type=None): from params import params env.set_params(params) commands = EnrichmentCommands(params) if params.security_enabled: metron_security.kinit(params.kinit_path_local, params.metron_keytab_path, params.metron_principal_name, execute_user=params.metron_user) commands.stop_enrichment_topology(env)
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 start(self, env, upgrade_type=None): from params import params env.set_params(params) self.configure(env) commands = EnrichmentCommands(params) if params.security_enabled: metron_security.kinit(params.kinit_path_local, params.metron_keytab_path, params.metron_principal_name, execute_user=params.metron_user) metron_service.load_global_config(params) if not commands.is_kafka_configured(): commands.init_kafka_topics() if params.security_enabled and not commands.is_kafka_acl_configured(): commands.init_kafka_acls() if not commands.is_hbase_configured(): commands.create_hbase_tables() if params.security_enabled and not commands.is_hbase_acl_configured(): commands.set_hbase_acls() if not commands.is_geo_configured(): commands.init_geo() commands.start_enrichment_topology()
def restart(self, env): from params import params env.set_params(params) self.configure(env) commands = EnrichmentCommands(params) commands.restart_enrichment_topology(env)
def start(self, env, upgrade_type=None): from params import params env.set_params(params) self.configure(env) commands = EnrichmentCommands(params) if params.security_enabled: metron_security.kinit(params.kinit_path_local, params.metron_keytab_path, params.metron_principal_name, execute_user=params.metron_user) if not commands.is_kafka_configured(): commands.init_kafka_topics() if params.security_enabled and not commands.is_kafka_acl_configured(): commands.init_kafka_acls() if not commands.is_hbase_configured(): commands.create_hbase_tables() if params.security_enabled and not commands.is_hbase_acl_configured(): commands.set_hbase_acls() if not commands.is_geo_configured(): commands.init_geo() commands.start_enrichment_topology(env)
def kafkabuild(self, env, upgrade_type=None): from params import params env.set_params(params) commands = EnrichmentCommands(params) commands.init_kafka_topics()
def stop(self, env, upgrade_type=None): from params import params env.set_params(params) commands = EnrichmentCommands(params) commands.stop_enrichment_topology()
def start(self, env, upgrade_type=None): from params import params env.set_params(params) commands = EnrichmentCommands(params) metron_service.load_global_config(params) if not commands.is_kafka_configured(): commands.init_kafka_topics() if not commands.is_hbase_configured(): commands.create_hbase_tables() if not commands.is_geo_configured(): commands.init_geo() commands.start_enrichment_topology()